[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] debugging a shaderLinkError
Title: Re: [Public WebGL] debugging a shaderLinkError
At 7:38 AM -0800 2/25/11, email@example.com wrote:
That's an awful lot of 'varying' parameters. Direct3D-9 for WinXP has a
horribly small limit on the number you can have (and probably there are
even less on some cellphone platforms).
I could easily believe you'd run out and that this would show up as a
linker error rather than a compilation error - so it all fits what you're
Some systems can automatically pack a 'varying float' and a 'varying vec3'
into a single 'vec4' - but that's not universally the case - so step one
would be to pack the vLightDist variables into the 'w' component of your
vLightVec's as a vec4 inside the vertex shader yourself...but even so, you
may be pushing the limits.
Steve, Thanks so much for the suggestion!
Here's how I was able to work around the issue for now.
Thinking about Steve's suggestion and looking at the the shader program I have been able to get around the Windows issue for now by removing some light sources for the earth-surface-indicator and the latitude-line
remove two light sources from latitude-line
use only one light source for earth surface indicator
There might be a better way to do what I wanted. I'd like the latitude-line visible on the dark side of the Earth.
In the screenshot below the Earth Surface Indicator is illuminated and shows San Francisco just after sunset but the latitude-line is dark.
I suspect that part of the problem is incorrect normals on the outer edge of the latitude-line disk -- which is code I developed so I'll take a look at that.