Relief Mapping + Deffered Shading

Started by
5 comments, last by MJP 12 years, 3 months ago
I know it's not hard to implement basic relief mapping in a deffered shading renderer, but I'm interested in implementing relief mapping with correct silhouettes, intersections, and shadowing to and from other surfaces. I have heard about "depth correction", but I'm not really sure how it works or whether or not it would work with deffered shading.
Advertisement
Pixel shaders can explicitly output a depth value, which means you can output an adjusted depth value based on your relief mapping calculations. It works fine with deferred rendering, since with deferred rendering you typically sample the depth buffer to reconstruct pixel positions during your lighting pass. Then to get silhouettes you can use clip() or discard. The downside is that both outputting depth and discard can mess with early z-cull optimizations, which can make your G-Buffer pass less efficient.
Significantly less? If so, whats a good way to deal with it?
Check out this article. it includes code as well

http://upcommons.upc.edu/pfc/bitstream/2099.1/7717/1/Roi%20Mendez%20Fernandez.pdf
Wisdom is knowing when to shut up, so try it.
--Game Development http://nolimitsdesigns.com: Reliable UDP library, Threading library, Math Library, UI Library. Take a look, its all free.

Significantly less? If so, whats a good way to deal with it?


It could be...it depends on your hardware, and what you're doing. Profiling is the only way to know for sure.

You can also improve the situation a bit if you use conservative depth output, which is available on DX11-class hardware.

[quote name='Chris_F' timestamp='1325562841' post='4899171']
Significantly less? If so, whats a good way to deal with it?


It could be...it depends on your hardware, and what you're doing. Profiling is the only way to know for sure.

You can also improve the situation a bit if you use conservative depth output, which is available on DX11-class hardware.
[/quote]

I found your depth sprite example online. Conservative depth had a pretty considerable impact on performance. Also, I notice that OpenGL has had conservative depth since version 3, so is this a DX11 hardware feature, or a DX10 hardware feature?
It was added for feature level 11, so I would assume it's only available on DX11 hardware. It's possible it's available on some DX10/10.1 hardware through OpenGL, I haven't checked myself.

This topic is closed to new replies.

Advertisement