Skip to content

fix: TranspileException (23: only float vectors are supported) #60

Description

@rutvik110

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

  1. Go to https://github.com/rutvik110/my_shader
  2. Build the project

Expected Behavior

Shader binaries compiled successfully on flutter side and shader is shown.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions