Jump to content
  • Advertisement
Sign in to follow this  

Screen Space Reflections

This topic is 2187 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've been working on screen space reflections, and I am struggling with "false" reflections with concave shapes, or shapes that are "floating" off the reflective surface.  For example, let's say I have a a reflective floor and an object O floating above it.  Some reflective rays will shoot under O and not intersect it.  However, they will eventually be occluded by O, which makes them "cross" the depth buffer, so it registers a false intersection.  I am having a hard time handling this case robustly.  I tried taking the distance between the ray sample point and the depth buffer value, and if it is too large, then don't register it as an intersection.  This works only part of the time, and I sometimes get noisy rendering artifacts as the test passes for some pixels but not neighboring pixels that are near the threshold distance.  It almost seems better to live with the false reflection as it is less distracting than the noise.  Does anyone have any tips?


Also, what is preferred: ray marching in view space and projecting the ray sample points to compare with the depth buffer, or just working completely in screen space marching pixel by pixel? 


I've tried both, and both have aliasing problems.  I sort of liked the view space approach because I could easily march along the reflection vector some fixed world space length (like support reflections 50 meters out) using a coarse linear search followed by a refinement bisection search.  Also, The problem with marching pixel by pixel in screen space, is that your might have to march across the screen to find the reflected pixel (very expensive).



Share this post

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