Jump to content

  • Log In with Google      Sign In   
  • Create Account

Relief Mapping + Deffered Shading


Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
6 replies to this topic

#1   Members   

3018
Like
0Likes
Like

Posted 02 January 2012 - 09:14 AM

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.

#2   Moderators   

18218
Like
0Likes
Like

Posted 02 January 2012 - 04:15 PM

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.

#3   Members   

3018
Like
0Likes
Like

Posted 02 January 2012 - 09:54 PM

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

#4   Members   

568
Like
0Likes
Like

Posted 03 January 2012 - 09:14 AM

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.

#5   Moderators   

18218
Like
0Likes
Like

Posted 03 January 2012 - 01:19 PM

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.

#6   Members   

3018
Like
0Likes
Like

Posted 03 January 2012 - 05:49 PM

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.


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?

#7   Moderators   

18218
Like
0Likes
Like

Posted 03 January 2012 - 08:23 PM

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.




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.