Author Topic: using depth buffer as a texture of another object3d, possible?  (Read 80 times)

Offline MichaelJPCT

  • long
  • ***
  • Posts: 234
    • View Profile
using depth buffer as a texture of another object3d, possible?
« on: November 19, 2020, 07:57:11 am »
i don't mean using it in shadow mapping, but in other situations.
although i haven't found a use of this , but i think it has special use.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12111
    • View Profile
    • http://www.jpct.net
Re: using depth buffer as a texture of another object3d, possible?
« Reply #1 on: November 20, 2020, 10:57:02 am »
You can assign the texture with the rendered depth buffer to another object and do something with it in the shader. That said, jPCT's shadow mapper doesn't do this but it's encoding the depth values in the actual pixel data for reasons that I can't remember anymore. Some compatibility issues, I guess...