[x3d-public] How is a shader chosen in X_ITE? Looks like it works (at least at first, and then disappears?)

Holger Seelig holger.seelig at yahoo.de
Sun Jul 4 04:40:49 PDT 2021


The shaders are loaded asynchronously, and until they are loaded the default shader (Gouraud) will be used, that’s why you do see something at the beginning sometimes, depending on how fast the web browser is.

There is an error in the console 'Missing »in vec4 x3d_Vertex;«.‘, which probably means that the shader is not properly converted to WebGL2, which is no rocket science. To convert, have a look at the flowers shader, which actually do work now, this should help you.

Also have a look at here, (the shaders part):
https://webgl2fundamentals.org/webgl/lessons/webgl1-to-webgl2.html

Best regards,
Holger

> Am 04.07.2021 um 05:49 schrieb John Carlson <yottzumm at gmail.com>:
> 
> X_ITE has disappearing problems with
> 
> https://coderextreme.net/X3DJSONLD/src/main/html/bubbles.html
> 
> The included ../data/bubbles.x3d should be cross-platform--potentially any X3D browser, but only X3DOM and X_ITE are supported.  Please try yours and contribute fixes!
> 
> Problems: scene and geometry show up initially, then disappear, or don't appear at all. I will try removing X3DOM shaders to see what happens.
> 
> There's a small "flower" in the middle of the bubble in Chromium on Linux, which seems to indicated that a fragment shader got invoked which is returns white frag_color. If associated vertex shader doesn't load, I don't think the fragment shader shouldn't, IMO, but others can weigh in.  Others can report seeing this?
> 
> I will try to go over the shaders with a fine-tooth comb tomorrow.
> 
> I'll also run the XML file through validators!
> 
> John
> 




More information about the x3d-public mailing list