umbra
umbra copied to clipboard
fix: TranspileException (23: only float vectors are supported)
I'm trying to compare two floats here as seen in below glsl code, y
is pre-calculated or assigned.
vec4 fragment(in vec2 uv,in vec2 fragCoord){
float y=1.;
vec3 finalColor=y==1.?vec3(.5176,.3059,.3059):vec3(0.);
return vec4(finalColor.xyx,1.);
}
The glsl code is compiled properly and binaries are generated but when trying to execute the shader in Flutter, it's throwing the following exception
Exception has occurred.
TranspileException (23: only float vectors are supported)
I know the error is very straightforward but I'm not sure why it's throwing this error, seems like the portion where it's comparing this two values is not compiled properly or something else I'm not aware of. This is really messing with my head for some time, would love to get idea of what's going in here.
Steps To Reproduce
- Go to https://github.com/rutvik110/my_shader
- Build the project
Expected Behavior
Shader binaries compiled successfully on flutter side and shader is shown.