Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing message: The shader doesn't have a uniform called "foo" #2593

Closed
SableRaf opened this issue Jun 13, 2014 · 1 comment
Closed

Confusing message: The shader doesn't have a uniform called "foo" #2593

SableRaf opened this issue Jun 13, 2014 · 1 comment
Assignees
Labels

Comments

@SableRaf
Copy link

Here's the minimal code to get that (non crashing) message.

PDE

PShader shader;

void setup() {
  size(100,100,P2D);
  shader = loadShader("shader.glsl");   
  shader.set("foo", 0);
}

GLSL

uniform int foo;

void main(void)
{
    gl_FragColor=vec4(1.0,0.0,0.0,1.0);
}

Console

The shader doesn't have a uniform called "foo"

The compiler removes "inactive" uniforms which explains why Processing can't find it, however, this message can be very confusing for beginners.

If there's no way to detect that case, how about replacing the message with The shader doesn't have a uniform called "foo" or the "foo" uniform is declared but not used ?

@codeanticode codeanticode self-assigned this Jun 14, 2014
codeanticode added a commit that referenced this issue Sep 24, 2014
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants