Frontcannon Posted June 5, 2010 Share Posted June 5, 2010 Yes, they do now thatI've checked. Maybe he should update the first post. ------ Ported to WHAT, Rick? Also, your post strangely matches that picture of you.. :beer: cheers! Quote Night Vision Text Effect Tutorial Gallery reddit.com/r/futurebeats | My Mixcloud Link to comment Share on other sites More sharing options...
Rick Brewster Posted June 6, 2010 Share Posted June 6, 2010 Wow, the reference driver is slow. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Bruce Bowyer-Smyth Posted June 6, 2010 Author Share Posted June 6, 2010 Slow would be a generous term I would say. It is promoted as being optimized for correctness rather than speed but I don’t know how you could use it as a reference with that performance. I guess that’s why WARP was developed for the rendering side of things. This is fine for a specialised plugin like this one but like you said if you wanted to use it for core functionality you would probably need a C# fallback version. The viability of that would depend on how often those things needed to be modified I suppose and how much performance benefit you could get. That can be an impressive amount in some ideal situations. Playing around with the thread count and the MaximumRegionWidth now has the large image processing at 22,098% faster. Starting to look at packaging and was wondering about the V4 plugin manager. Will it handle prerequisites/dependencies? If not will it be possible to run an msi? Quote GPU Blur Plugin | WMF File Plugin Link to comment Share on other sites More sharing options...
Rick Brewster Posted June 6, 2010 Share Posted June 6, 2010 Starting to look at packaging and was wondering about the V4 plugin manager. Will it handle prerequisites/dependencies? If not will it be possible to run an msi? Don't know yet. As for the MSI, doubtful. I would encourage you to figure out how to use SlimDX without having to install it, however. Otherwise plugins could end up installing all sorts of things. Paint.NET v4 will provide access to Direct2D, DirectWrite, and WIC. However I haven't added support for Direct3D simply because it's enormous and I'm not using it in the main app. If I were to add it, then you could use that instead of SlimDX. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Simon Brown Posted June 6, 2010 Share Posted June 6, 2010 As for the MSI, doubtful. I would encourage you to figure out how to use SlimDX without having to install it, however. It's licensed under MIT, in fact. Quote Link to comment Share on other sites More sharing options...
Bruce Bowyer-Smyth Posted June 13, 2010 Author Share Posted June 13, 2010 I would encourage you to figure out how to use SlimDX without having to install it, however. I believe that is possible by just having it in the effect folder and a separate redist for x86 and x64. If that is the case I will probably create a custom build with just the dx11 parts and a new namespace to avoid conflicts. I haven't added support for Direct3D simply because it's enormous No doubt. However only a small part of it would be relevant to image post processing. Unlike D2D where you would want most of it, an additive approach to D3D might work better where support is added on demand. At least it can set a baseline and avoid version conflicts between plugins. Maybe compute and pixel shaders and the supporting functions around that. Drawing of primitives probably would want to stay in the realm of 2D. Maybe that could be handled by the plugin manager? Only downloads D3D support when a plugin needs it. Quote GPU Blur Plugin | WMF File Plugin Link to comment Share on other sites More sharing options...
Rick Brewster Posted June 13, 2010 Share Posted June 13, 2010 Well, and the other reason I haven't added D3D support is that Paint.NET won't be using it. Otherwise there's no "living" test case for the interop layer and there could be bugs. I've already found several bugs in my interop layer implementation but they've been easy to find (and fix) since I'm actually using it. So for now, and for v4, you'll be on your own for D3D. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Bruce Bowyer-Smyth Posted June 13, 2010 Author Share Posted June 13, 2010 Understandable position. I'm not releasing this yet but the zoom blur came along really quickly. Now I just need to figure out a radial blur and we will be right to go. Quote GPU Blur Plugin | WMF File Plugin Link to comment Share on other sites More sharing options...
Frontcannon Posted June 13, 2010 Share Posted June 13, 2010 The speed improvement possibilities on Radial Blur could be HUGE, it takes incredibly long on the highest quality settings.. Quote Night Vision Text Effect Tutorial Gallery reddit.com/r/futurebeats | My Mixcloud Link to comment Share on other sites More sharing options...
Bruce Bowyer-Smyth Posted June 19, 2010 Author Share Posted June 19, 2010 Yes I would have thought so too but it seems to be capped between about 2500% and 3500%. I've got some kind of bottle neck going on there but thats a good start. Didn't bother with the quality setting and just used the equivalent of the high-quality "5" option in Paint.net's radial blur. The algorithms are not the same but the final image is pretty close. New version posted, includes the zoom blur as well. Quote GPU Blur Plugin | WMF File Plugin Link to comment Share on other sites More sharing options...
Rick Brewster Posted June 19, 2010 Share Posted June 19, 2010 Radial blur will probably be gated by memory performance. Even video cards have limits! Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Bruce Bowyer-Smyth Posted June 22, 2010 Author Share Posted June 22, 2010 Yes that was my thinking as well due to the huge amount of sampling and the scattered reads. Also when the radius increased the performance went down even though the same amount of work was being done. Probably thrashing the limited cache. But every roadblock has a detour and this one's name is... Texture2D and the texture cache. If what I have read is correct then StructuredBuffer doesn't use the texture cache. Treating the source image as a texture has meant that caching is better and I could remove the calculations to convert a point to a position in a 1D array and also the manual bit shifting on the pixel read. The performance is now a more respectable constant 4400% when the radius is increased so this definitely looks like the way to go. The same technique on the large image motion blur takes it up to 27K%. After implementing the code for proper alpha averaging that comes back down to 25K% but still a win there. Quote GPU Blur Plugin | WMF File Plugin Link to comment Share on other sites More sharing options...
Bruce Bowyer-Smyth Posted July 7, 2010 Author Share Posted July 7, 2010 Well I'm back from my dependency squashing expedition with some pretty favourable results. Apart from the Vista platform update there is now nothing to install. I’ve created a custom build of SlimDX that just contains D3D11 and is repointed to the DirectX11 RTM version so that neither it nor the DirectX February update needs to be installed. The custom build can just be copied to the effects folder. The package now includes the effect dll, and 2 SlimDX dll’s (x86 and x64). Extract all of them into your Paint.NET Effects folder. I have also fixed up the channel blur alpha handling and removed the reference driver fall back as that was basically not an option. Let me know if you have any issues with this build and I will release it to the general population if all is well. Quote GPU Blur Plugin | WMF File Plugin Link to comment Share on other sites More sharing options...
Rick Brewster Posted July 7, 2010 Share Posted July 7, 2010 Very cool. Maybe I should just get this built-in to PDN 4 anyway Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Bruce Bowyer-Smyth Posted July 8, 2010 Author Share Posted July 8, 2010 I knew you’d be back Rick. Let me know if you decide to go ahead with it and want to trial anything. With point-and-click cameras now averaging about 12 megapixels and climbing it may be soon become a requirement for some types of effects seeing that CPU’s haven’t been keeping up with that race. I did actually check out how installation would go but pretty quickly ran into all the troubles that Promit from SlimDX goes on about in this rant. It would have been nice to pre-check a few things like driver versions and display a "<Product Name> could perform faster on your computer" type message but that is one of the trade-offs. Here's hoping that the installer team have resolved this already and we can expect a "Web Deployment Package" style installer in the future? Quote GPU Blur Plugin | WMF File Plugin Link to comment Share on other sites More sharing options...
Rick Brewster Posted July 8, 2010 Share Posted July 8, 2010 Well if I integrate it into Paint.NET proper, I would simply write my own D3D interop layer. Then installation would be no issue. I would also probably make it so that an effect can use HLSL without needing any of the D3D goop: just give me an HLSL fragment in place of OnRender(). Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Rick Brewster Posted July 8, 2010 Share Posted July 8, 2010 All of the effects are giving me an E_INVALIDARG error in a message box when I try to apply them to this image (15204 x 4620 px): http://en.wikipedia....rn_Sky_edit.jpg Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Bruce Bowyer-Smyth Posted July 9, 2010 Author Share Posted July 9, 2010 Just give me an HLSL fragment in place of OnRender(). If you can figure out an generic way to pass parameters then that would be a great setup. All of the effects are giving me an E_INVALIDARG error in a message box when I try to apply them to this image (15204 x 4620 px) Hmm DX11 has a texture dimension limit of 16k but it turns out that when running on DX10 hardware the limit is still 8k. I may have to bring back the StructuredBuffer for large images... Quote GPU Blur Plugin | WMF File Plugin Link to comment Share on other sites More sharing options...
Bruce Bowyer-Smyth Posted July 9, 2010 Author Share Posted July 9, 2010 Ok new build is up. Not wanting to give up the texture performance for the most common scenarios I have made it switch to the StructuredBuffer only when the width or height is greater than 8k. This can certainly be done a lot better but for a V1 release it's workable. Let me know how it goes as I don't have enough video memory to process the full 70 megapixel image. Quote GPU Blur Plugin | WMF File Plugin Link to comment Share on other sites More sharing options...
Rick Brewster Posted July 9, 2010 Share Posted July 9, 2010 Paint.NET "supports" up to 65535 x 65535 pixels, so any effect should also work that high. Normally this isn't a problem because even at such a small value there isn't much probability of oveflowing an Int32. However, I should point out that if you are doing your own pointer arithmetic, e.g. get the Scan0 pointer then multiply Y and Stride, that you should not. Use GetRowAddress() instead, as it does need to do some bouncing with 64-bit ints in order to ensure an overflow doesn't happen. I found this only late in the v3.5 release cycle and fixed this. v3.36 won't actually work with images over a certain size because of silent overflows when calculating pointer offsets. I put supports in quotes because the memory requirements would be 12GB to start, plus 4GB per layer. Not very feasible with the current architecture. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Bruce Bowyer-Smyth Posted July 10, 2010 Author Share Posted July 10, 2010 The StructuredBuffer has a 32bit index so it will handle that dimension but similarly the problem is memory which of course there is a lot less of on the video card. There would be ways around that (virtual texturing?, streaming?) but it might be one for the pro's rather than my level of creating a "Hello Massively Parallel World" effect Quote GPU Blur Plugin | WMF File Plugin Link to comment Share on other sites More sharing options...
Bruce Bowyer-Smyth Posted July 10, 2010 Author Share Posted July 10, 2010 Just noticed I had a typo in the filename of that last build so you would have got the previous version. Effect has now been published. Hardware Accelerated Blur Pack Thanks for everyones help in getting it this far. Quote GPU Blur Plugin | WMF File Plugin Link to comment Share on other sites More sharing options...
W@@dy Posted July 17, 2010 Share Posted July 17, 2010 Has anyone benchmarked this with SLI/CrossFire yet? Quote Link to comment Share on other sites More sharing options...
Bruce Bowyer-Smyth Posted July 18, 2010 Author Share Posted July 18, 2010 Has anyone benchmarked this with SLI/CrossFire yet? Not that I know of. Would be interesting to know but probably not your average designer's setup. Quote GPU Blur Plugin | WMF File Plugin Link to comment Share on other sites More sharing options...
Bruce Bowyer-Smyth Posted July 18, 2010 Author Share Posted July 18, 2010 I have released a new version over on the published thread. For the motion and gaussian blur I have implemented a completely custom region slicing if the effect is being run against a whole image. With just this change the 960x1280 image goes from 426ms to 189ms. So very important to keep the GPU pipeline full and avoid stalls by copying the results back too often. Large image is up to 31,725% faster. Quote GPU Blur Plugin | WMF File Plugin Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.