Jump to content

View more

View more

Image of the Day

雑魚は多めにして、爽快感重視にしつつ・・・(´・ω・`)
早いとこ、ベースを作って、完成にもっていかないとね。
タイトルもまだ迷ってるだよなぁ。 
#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Sampling from a depth texture bound to the FBO

4: Adsense

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 myers   Members   

143
Like
0Likes
Like

Posted 10 August 2013 - 11:19 AM

On DX11, disabling depth writes allows you simultaneously to sample and depth-test against the same depth texture. This feature is useful, for example, for soft particles: without it, you'd either have to make a copy of the depth texture, or disable depth testing and lose early-z culling.

 

Is this supported in OpenGL 4+? If I call glDepthMask(0), is it safe to assume that I can sample from the depth texture bound as an attachment of the FBO I'm rendering to? I see nothing in the specs to indicate that it is. I don't notice any problems on my hardware, but I've found that a lot of off-spec behaviour works ok on Nvidia.


Edited by myers, 10 August 2013 - 11:21 AM.





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.