You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I am using headless-gl,
I'm trying to pass an array with variable 'h' into the fragment shader, but the rendering result is not working.
But if I write the variable 'h' in the fragment shader, there is no problem.
The code is effective in the browser.
Activity
army8735 commentedon Jun 25, 2024
+1
army8735 commentedon Jun 26, 2024
https://github.com/stackgl/headless-gl/blob/master/src/javascript/webgl-rendering-context.js#L2661
It looks like the
infovariable returned null, causing the value obtained by thegl.getUniformLocationmethod to be also null.Try this way:
gl.getUniformLocation(xxxProgram, 'h[0]'), it also works well on WEBGL.Accept array uniform names without [0] in getUniformLocation