The shader is displaying a solid yellow color instead of gradient color for some unknown reason. I even tried the shader in the Babylon Cyos editor (https://cyos.babylonjs.com/), and it still showed the yellow color. Is there something that I might have overlooked? Babylonjs playground for reference: Babylon.js Playground
1 Like
“resolution” is not a standard variable know by ShaderMaterial
, you have to pass it explicitely:
1 Like
Thank you very much for fixing the issue. I would be grateful if you could provide me with a link to the documentation of shaders in the context of Babylon.js. Because you know, I was unaware of the fact that Babylon.js uses different conventions for passing variables to shaders; for example, u_time
(uniform float u_time;
) had to be changed to time
for the shader to work."
All the built-in variables known by ShaderMaterial
are listed here:
1 Like
I want to express my heartfelt gratitude for the documentation you shared with me. Thanks again.