|
在源码中的片元着色器中
- static const char fragmentShaderSource_withBaseTexture[] =
- "uniform sampler2D osgShadow_baseTexture; \n"
- "uniform sampler2DShadow osgShadow_shadowTexture; \n"
- "uniform vec2 osgShadow_ambientBias; \n"
- "\n"
- "void main(void) \n"
- "{ \n"
- " vec4 color = gl_Color * texture2D( osgShadow_baseTexture, gl_TexCoord[0].xy ); \n"
- " gl_FragColor = color * (osgShadow_ambientBias.x + shadow2DProj( osgShadow_shadowTexture, gl_TexCoord[1] ) * osgShadow_ambientBias.y); \n"
- "}\n";
复制代码 gl_TexCoord[1]是怎么求到得呢?没有找到顶点着色器啊,还有shadow2DProj的使用要打开深度比较函数setShadowCompareFunc怎么也没找到在哪就打开的啊,没弄明白,哪位大师麻烦讲一下啊 |
|