[Public WebGL] debugging a shaderLinkError

Stephen Bannasch [email protected]
Fri Feb 25 16:20:41 PST 2011


At 7:38 AM -0800 2/25/11, [email protected] 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
>seeing.
>
>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
https://github.com/stepheneb/seasons/commit/c9125625ba1d7816a4e75b3030fac4bf34211f94

use only one light source for earth surface indicator
https://github.com/stepheneb/seasons/commit/86db665d2fa395e851100de77b32f6d90c5f1d39

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://khronos.org/pipermail/public_webgl_khronos.org/attachments/20110225/2aab9bf6/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: P0F5F991C.png
Type: image/png
Size: 47851 bytes
Desc: not available
URL: <http://khronos.org/pipermail/public_webgl_khronos.org/attachments/20110225/2aab9bf6/attachment.png>


More information about the public_webgl mailing list