[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Restricting WebGL exposure of OES_depth_texture
On Wed, Jun 6, 2012 at 4:25 AM, Gregg Tavares (社用) <email@example.com> wrote:
Fine, then I ask others reading this list? are depth textures useful without stencils? If you can't use a stencil buffer while using a depth texture will that limit what you can do? It would certainly make the last 2 games I personally shipped impossible but hey, that's just one anecdote. If no one else cares then I'm fine with WEBGL_depth_texture supporting depth only.
I see these use-cases for depth textures:
1) Deferred shading requires at least 2 passes (albedo and byte packed depth/normal). If a floating point texture is used to capture depth/normal, that may be unsupported and/or slow. Depth textures could help to improve the precision attained for depth information while freeing more bytes on the color attachment to use for other things and not consume 4x the amount of bandwidth.
2) Post process blur would benefit from being possible to do with just one pass instead of two.
3) Particle fading for sprites near to scene surfaces would become possible with just one pass instead of two
4) Depth estimation of objects for reasons of subsurface scattering or translucency will require fewer passes.
None of the above relies on stenciling.
What use-cases are you thinking of that would be impossible without stenciling?