Jump to content
  • Advertisement
Sign in to follow this  
joeblack

DX11 SSR roughtness

Recommended Posts

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

Share this post


Link to post
Share on other sites
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 😅

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

hi, 

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!