Original Post
I've been working on a lens flare shader recently (done entirely in post-processing). So far it looks great, but there's one thing I'm curious about, and that's "diffraction" (that's what it was called on wikipedia anyway). Basically, this is what it looks like (image from wikipedia).
Colors aren't important, but that's the basic idea. So here are my questions: What would it take to pull off this effect? Can it be done entirely in a pixel shader or do I also need to edit the vertex shader? Can it even be done in image-space? I think it can, but confirmation would be great. :) My lens flares are calculated the "Masaki Kawase" way, by taking a sample of a glow/bloom buffer and inverting it's coordinates with some scaling to produce a flare. I do this a few times to create the effect. I'm hoping I can do the same for this. I'd also like to know if there's a more performance-friendly way of achieving an anamorphic flare, using the same technique above (or something similar anyway). Something like this:
Currently I'm using Masaki's technique for streaks, but that's both hard on performance (I have no source code access, so I can't change the resolution of the render target I'm using), and doesn't produce results that I'm pleased with. Thoughts? [Edited by - Styves on February 4, 2010 9:04:29 PM]
Colors aren't important, but that's the basic idea. So here are my questions: What would it take to pull off this effect? Can it be done entirely in a pixel shader or do I also need to edit the vertex shader? Can it even be done in image-space? I think it can, but confirmation would be great. :) My lens flares are calculated the "Masaki Kawase" way, by taking a sample of a glow/bloom buffer and inverting it's coordinates with some scaling to produce a flare. I do this a few times to create the effect. I'm hoping I can do the same for this. I'd also like to know if there's a more performance-friendly way of achieving an anamorphic flare, using the same technique above (or something similar anyway). Something like this:
Currently I'm using Masaki's technique for streaks, but that's both hard on performance (I have no source code access, so I can't change the resolution of the render target I'm using), and doesn't produce results that I'm pleased with. Thoughts? [Edited by - Styves on February 4, 2010 9:04:29 PM]