Hi,
I am implementing some shadows at the moment and have come unstuck with my
understanding of how to sample a shadow texture.
To test my understanding, I implemented what I though shadow2D() would do using
'standard' sampling and a few calculations. This lead to the following code
which
Hi Brad -- Is your texture a depth format texture? That is, on the host side, do
you have something like this:
_depthTex = new osg::Texture2D;
_depthTex-setInternalFormat( GL_DEPTH_COMPONENT );
According to the GLSL spec, results from shadow2D and friends is undefined if
the texture
On 7/7/2011 11:02 AM, Paul Martz wrote:
According to the GLSL spec, results from shadow2D and friends is undefined if
the texture is not a depth format.
Another thought is what version of GLSL you're invoking. If you use shadow2D()
to sample the texture, that's good for GLSL 1.20, but is
-Oryginalna wiadomość-
From: Paul Martz
Sent: Thursday, July 07, 2011 7:13 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] GLSL shadow2D / shadow2DProj question
On 7/7/2011 11:02 AM, Paul Martz wrote:
According to the GLSL spec, results from shadow2D and friends is undefined
5:59 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] GLSL shadow2D / shadow2DProj question
Hi Brad,
Did you forget to call
texture-setShadowComparison(true) ?
Its neccessary for shadow2D and shadow2DProj to work.
setShadowComparison( true ) is equivalent to OpenGL
5 matches
Mail list logo