WebGL implementations are becoming more strict with respect to standard compliance. The spec says that "while" loop support is not mandatory. Chrome and now also Firefox (both using ANGLE to convert shaders to DirectX) don't allow while loops.
You have to convert them into "for" loops, but not any loop is allowed. They have to have a known maximum number of iterations at compile time. They have to have this form e.g:
for (int i=0; i<CONSTANT; i++) { … if(EXIT_CONDITION) break; …}
or similar (for (float x=0.0; x<100.0; x+=1.4) )
and use a conditional "break" inside to exit in less iterations.
In the second case I still don't understand what is wrong (seems OK to me).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2010-12-12
I downloaded Firefox Minefield 4.0b8pre 12 december 2010 and the example 8 still does not run with the same error.
However, the terrain example works beautifully! I am really impressed.
I'll see if I can get the support files off the site so I can try to fix the shader in example 8. It looks like there is a tree.txt and a bunch of png files in the examples/data/multires128. If I can figure out the names I should be able to grab them from spidergl.org since they don't seem to be in the SVN repo.
-Kevin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Greetings: SpiderGL is very impressive! Excellent work.
Just to let you know, two of the demos in the gallery did not work properly for me.
I am using Chrome 10.0.605.0 canary build running on WIndows 7 64bit on a laptop with a GeForce 260M GTX
Here are the log messages I got:
Example 5: Ray-Casting with BlockMaps
Example 8: Streaming LoD Terrain
WebGL implementations are becoming more strict with respect to standard compliance. The spec says that "while" loop support is not mandatory. Chrome and now also Firefox (both using ANGLE to convert shaders to DirectX) don't allow while loops.
You have to convert them into "for" loops, but not any loop is allowed. They have to have a known maximum number of iterations at compile time. They have to have this form e.g:
for (int i=0; i<CONSTANT; i++) { … if(EXIT_CONDITION) break; …}
or similar (for (float x=0.0; x<100.0; x+=1.4) )
and use a conditional "break" inside to exit in less iterations.
In the second case I still don't understand what is wrong (seems OK to me).
I downloaded Firefox Minefield 4.0b8pre 12 december 2010 and the example 8 still does not run with the same error.
However, the terrain example works beautifully! I am really impressed.
I'll see if I can get the support files off the site so I can try to fix the shader in example 8. It looks like there is a tree.txt and a bunch of png files in the examples/data/multires128. If I can figure out the names I should be able to grab them from spidergl.org since they don't seem to be in the SVN repo.
-Kevin
for the blockmap render demo I fix it in file "blockmap.f.glsl" like this:
Last edit: DJLinux 2016-10-23