Having left it alone for some time I thought today would be a good day to go back and hack away at my GLSL Shadow Mapping code in an attempt to make it a bit more sane than I left it, so i fired up my old project and poked at it a bit so instead of using the 1.00 GLSL interface it was now using the new GLSL1.10 interface via GL2.0.
I ran the program it was reduced to a crawl, with my FPS counter reporting 1 => 2fps… “Odd”, thinks I, “I havent touched the shaders and my X800XT should be faster than my 9800XT was… whats going on”.
So, I poked and fiddled and in the end found that it was infact my shadow map program which was causing the problems as it was spitting out the following error :
Link successful. The GLSL vertex shader will run in hardware. The GLSL fragment shader will run in hardware. Validation failed - samplers of different types are bound to the same texture image unit.
Now, I’ve no idea what that means So I was wondering if anyone can shead any light on the problem? As I said, the code worked fine on my 9800xt via the 1.00GLSL extension and i havent touched it in months;
uniform sampler2DShadow shadowMap;
uniform sampler2D lightTex;
varying vec4 projCoord;
const vec4 ambient = vec4(0.13), boost = vec4(1.06);
void main()
{
vec4 lightValue = texture2DProj(lightTex, projCoord);
vec4 shadowValue = shadow2DProj(shadowMap, projCoord);
gl_FragColor = boost * gl_Color * lightValue * shadowValue + ambient;
}
The error is thrown up after I load the shaders, compile and link them but before I start my main loop so i’ve not tried to supply values to the uniforms or owt
Hardware details;
gfx : X800XT PE
driver : Cat5.3
ogl version : 2.0.4955
OS : WinXP