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 a TSL code contains select(...,remap,remap) the generated shader code uses null as a type of one of the variables. This fails the shader compilation.
The issue does not appear if:
only one remap is used
or both remap-s are used outside select
or the second remap is wrapped in float(select(...)).
The error message (when WebGL2 is used) is:
THREE.WebGLProgram: Shader Error 0 - VALIDATE_STATUS false
Program Info Log: Must have a compiled fragment shader attached:
SHADER_INFO_LOG:
ERROR: 0:48: 'null' : undeclared identifier
ERROR: 0:48: 'nodeVar1' : syntax error
FRAGMENT
ERROR: 0:48: 'null' : undeclared identifier
ERROR: 0:48: 'nodeVar1' : syntax error
43:
44: void main() {
45:
46: // vars
47: vec4 DiffuseColor;
> 48: null nodeVar1;
49: vec4 Output;
50: vec4 nodeVar3;
51:
52: // flow
53: // code
54:
For WebGPU the error is conceptually the same, but explained with different words.
Description
When a TSL code contains
select(...,remap,remap)
the generated shader code usesnull
as a type of one of the variables. This fails the shader compilation.The issue does not appear if:
remap
is usedremap
-s are used outsideselect
remap
is wrapped infloat(select(...))
.The error message (when WebGL2 is used) is:
For WebGPU the error is conceptually the same, but explained with different words.
Reproduction steps
remap(0, 0, 0, 0, 0)
in line 21 usefloat(remap(0, 0, 0, 0, 0))
Note: the demo program is not meaningful. It is only to demonstrate the compilation error.
Code
Live example
https://codepen.io/boytchev/pen/vEBJaLa?editors=0011
Screenshots
Version
r171
Device
Desktop
Browser
Chrome
OS
Windows
The text was updated successfully, but these errors were encountered: