Original Post
is it possible to check the current value of depth buffer in a given pixel in pixel shader? and the z-value of the given pixel? thanks
Quote:
Render previous frame to a depth texture
Quote:
Original post by m4gnus Quote:
Render previous frame to a depth texture
why the previous frame? you can just render everything of this pass into as depth into a rendertarget and acces it in your shader
Quote:
Why previous? Because as I understand the OP question, he wants to compare the pixel's new depth with the pixel's old depth. And comparing a pixel's depth in a given frame to itself doesn't make sense.
Quote:
Original post by Mastaba Quote:
Original post by m4gnus Quote:
Render previous frame to a depth texture
why the previous frame? you can just render everything of this pass into as depth into a rendertarget and acces it in your shader
Why previous? Because as I understand the OP question, he wants to compare the pixel's new depth with the pixel's old depth. And comparing a pixel's depth in a given frame to itself doesn't make sense.
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more