SSR roughtness

Started by
4 comments, last by joeblack 5 years ago

Hi, im currently implementing SSR in my project and noticed that people are using cone tracing in SSR shader. My approach is to take current screen, convolute it, with same algorithm as im using for IBL and then sample it based on roughtness. Like for IBL. Im using same calculations for IBL and SSR, only for SSR i have one texture instead of entire cube map. I can think only about performance issues for calculation of convolution of entire screen (especially in 4k). Or is there any other reason of doing cone tracing in SSR instead of my approach ?

Thanks

Advertisement

With IBL you convolve lots of times (to different mips) so that you can handle varying roughness. If you only convolve once, you can only handle a single roughness value.

Also, convolution of cube maps is based on the angle of the rays, not just a 2D X/Y blur. If you convolve the screen before tracing any rays, that convolution will be wrong because the angluar difference from one pixel to its neighbours depends on the ray origin. Being wrong but still looking ok is part for the course with SSR though ?

hi, im doing convolution of all mips for every roughtness. Imagine cubemap with only one face. only difference to cubemap is that i need to transform sampling ray used for cube map from 3d to 2d.

The Call of Duty guys convolve the entire screen for GGX to use in both SSR and for GGX translucency refraction, a nice double win there I'd say, if that's your question?

 

Also your rays should just be cast a long a 2D heightfield for SSR, you have Z-depth to make your heightfield, which you just assume has a thickness of... some arbitrary number you choose for the sake of occlusion, maybe based upon apparent pixel width of the object or whatever. If that's your question?

hi, 

yes thats my question. good to know that Call of Duty is doing same thing :)

This topic is closed to new replies.

Advertisement