Skip to content

Issues with shadowing/scopes and variable with same name. #524

@wrightwriter

Description

@wrightwriter

Issue

I can't reproduce this reliably! Have had this happen at least 4-5 times now.
It usually does not happen.

void main(){
  // code
  float t = 0.;
  // code
  { // some inner scope
    // code
    vec3 t = vec3(0);
    // code
    // usually fails if i use t here.
  }
}

Last time this happened, the shader was compiling, but producing wrong result.

Preventing this

I have to actively avoid shadowing variables with same name in inner scopes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions