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

Errors viewing shader file #257

Open
JVimes opened this issue Aug 24, 2023 · 1 comment
Open

Errors viewing shader file #257

JVimes opened this issue Aug 24, 2023 · 1 comment

Comments

@JVimes
Copy link

JVimes commented Aug 24, 2023

I have errors viewing a default shader from Unity. Any ideas?

Visual Studio 2022 versions:

  • 17.7.2
  • 17.8.0 Preview 1.0.

image

HLSL0029  Cannot resolve type: 'Shader'.                                 C:\NewSurfaceShader.shader 1
HLSL0009  Found '"Custom/NewSurfaceShader"' but expected '<identifier>'. C:\NewSurfaceShader.shader 1
HLSL0009  Found '"Custom/NewSurfaceShader"' but expected ';'.            C:\NewSurfaceShader.shader 1
HLSL0010  Unexpected token '"Custom/NewSurfaceShader"'.                  C:\NewSurfaceShader.shader 1
HLSL0029  Cannot resolve type: 'LOD'.                                    C:\NewSurfaceShader.shader 13
HLSL0010  Unexpected token '200'.                                        C:\NewSurfaceShader.shader 13
HLSL0009  Found 'sampler2D' but expected ';'.                            C:\NewSurfaceShader.shader 15
HLSL0029  Cannot resolve type: 'fixed4'.                                 C:\NewSurfaceShader.shader 31
HLSL0010  Unexpected token 'UNITY_INSTANCING_BUFFER_START'.              C:\NewSurfaceShader.shader 36
HLSL0029  Cannot resolve type: 'SurfaceOutputStandard'.                  C:\NewSurfaceShader.shader 40
HLSL0029  Cannot resolve type: 'fixed4'.                                 C:\NewSurfaceShader.shader 43
HLSL0010  Unexpected token 'ENDCG'.                                      C:\NewSurfaceShader.shader 50
HLSL0029  Cannot resolve type: 'FallBack'.                               C:\NewSurfaceShader.shader 52
HLSL0009  Found '"Diffuse"' but expected '<identifier>'.                 C:\NewSurfaceShader.shader 52
HLSL0009  Found '"Diffuse"' but expected ';'.                            C:\NewSurfaceShader.shader 52
HLSL0010  Unexpected token '"Diffuse"'.                                  C:\NewSurfaceShader.shader 52
HLSL0045  Redefinition of ''.                                            C:\NewSurfaceShader.shader 52
@pyrokraken
Copy link

pyrokraken commented Sep 6, 2023

I have HLSL0029 cannot resolve type: 'uint16_t' and 'uint16_t3' live errors, even with '/enable-16bit-types' in my shaders. I mean, everything runs fine (shaders compiled, linked, run without any errors). It's only HLSL Tools live error reporting... I use Visual Studio 2022 v.17.7.3.
Ref: https://github.com/microsoft/DirectXShaderCompiler/wiki/16-Bit-Scalar-Types

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

2 participants