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

Shader error message #778

Open
Vrixyz opened this issue Aug 9, 2024 · 0 comments
Open

Shader error message #778

Vrixyz opened this issue Aug 9, 2024 · 0 comments

Comments

@Vrixyz
Copy link

Vrixyz commented Aug 9, 2024

(using reimagine branch 27337b2 )

I tried to add a Color float4 uniform to a shader, and was greated by:

thread 'main' panicked at /home/tb/.cargo/git/checkouts/quad-gl-1aa8a433fbda0b88/5af1722/src/scene.rs:115:33:
Failed to load shader: CompilationError { shader_type: Fragment, error_message: "0:4(9): preprocessor warning: Macro names containing \"__\" are reserved for use by the implementation.\n\n0:8(16): error: syntax error, unexpected NEW_IDENTIFIER, expecting '{'" }

Now I guess that a color is already present (from shader meta) so I shouldn´t have to add it, but the error message could be improved (and the list of existing uniforms communicated somewhere).

image

edit: my error actually originated from a mistake in the shader code:
uniform float3 MyColor; which should have been uniform vec3 MyColor;.

@Vrixyz Vrixyz changed the title shader error message Shader error message Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant