Jump to content

  • Log In with Google      Sign In   
  • Create Account


Simulate GL_depth_clamp in DX9 SM3.0


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
No replies to this topic

#1 skytiger   Members   -  Reputation: 258

Like
0Likes
Like

Posted 02 May 2012 - 01:48 AM

I think this can solve problems with shadow volumes and deferred light volumes

VS:

pass real perspective ZW to PS
set output POSITION Z = abs(W) * sign(Z)

this chucks pixel onto far plane whilst keeping sign intact (for near plane clipping) for both RH and LH projections

PS:

set output DEPTH = min(1.0, Z / W);

This clamps distant geometry to the far plane

Besides disabling early-z and friends can anybody see a problem with this approach?

Edited by skytiger, 02 May 2012 - 01:56 AM.


Sponsor:



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.



PARTNERS