sky_simple: different array size in fragment and vertex shader

classic Classic list List threaded Threaded
2 messages Options
Andreas Roth Andreas Roth
Reply | Threaded
Open this post in threaded view
|

sky_simple: different array size in fragment and vertex shader

The file osgEarthDrivers/sky_simple/SimpleSky.Ground.ONeil.frag.glsl contains the line:

uniform osg_LightSourceParameters osg_LightSource[OE_NUM_LIGHTS];

The osgEarthDrivers/sky_simple/SimpleSky.Ground.ONeil.vert.glsl contains the line:
uniform osg_LightSourceParameters osg_LightSource[1];

If OE_NUM_LIGHTS becomes != 1 the vertex shader fails to load. As a quick fix i changed the line in fragment shader to use a fixed array size of 1 instead of OE_NUM_LIGHTS.
I'm not sure if this the correct/best fix.

Regards,
Andreas
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: sky_simple: different array size in fragment and vertex shader

Andreas,
Probably makes the most sense to change the vertex shader to use OE_NUM_LIGHTS. I think it just needs to be consistent across all shaders. I will push that fix. Thanks.
Glenn Waldron / Pelican Mapping