The concurrent projection is now sorted “from-bottom-to-top” and the source pixel locations stored in the projection hash are now the ones closest to the water plane thus the closest to the camera in the reflection view. InterlockedMax(ProjectionHashUAV, projectionHash, dontCare)
Uint projectionHash = SrcPosPixel.y << 16 | SrcPosPixel.x Read-write max when accessing the projection hash UAV By using the intrinsic InterlockedMax when writing on the UAV, two hashes are going to be sorted first by their high bytes and so by their PixelY value. That’s where the Projection hash texture and the hashing function we chose eventually make sense. There are gaps in the reflection caused by the occlusion in the main view that prevents valid pixels in the reflection to be projected.The projection of the source positions into the reflection is an injective transformation, which means that two different pixels from the main view can be merged in the reflection and become “reflective concurrents” without knowing which one of them should prevail.That was pretty straightforward, but at this point the results can be disappointing:Ĭoncurrent reflective candidates resulting in blinking pixels In practice, we encode the projected pixel location on a single R32_UINT following the simple hash formulaįloat4 SrcColor = MainColorTex We write the screen location of the source pixel at the reflected screen position in the projection hash buffer via an UAV write.This world position is reflected with a known water plane and projected in screen space.The pixel is reprojected in world space.To this end, for every pixel in the main depth buffer: This screen-space texture will hold information about the location where the pixels from the main view should be projected in the reflection view. The concept on which the Screen Space Planar Reflections (SSPR) is based on is the Projection Hash Buffer.
It aims to provide multiple high-quality reflection surfaces from close to far distances with little performance impact, for the specific case of planar reflectors. Here we’re going to talk about another form of SSR that has been developed to support the water rendering ambitions of Ghost Recon Wildlands. However, on specific – controlled – situations, these flaws can be alleviated and SSR can deliver astonishing results. Still, this technology isn’t that affordable in a realtime application and it suffers from a lot of graphic caveats: SSR isn’t the final solution to the reflection inputs. They are expected to be less expensive than actual reflection rendering and more accurate than cubemap-based reflections, as long as the reflection source is present on the screen. The screen space reflections algorithm (SSR) is a technology now used in numerous video games to provide the reflection visuals.