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

const inside of a C style cast seen as invalid expression term. #262

Open
zxz41 opened this issue Jan 1, 2024 · 0 comments
Open

const inside of a C style cast seen as invalid expression term. #262

zxz41 opened this issue Jan 1, 2024 · 0 comments

Comments

@zxz41
Copy link

zxz41 commented Jan 1, 2024

I'm currently working on some pre-existing shaders running on ps_3_0 and lower. Which are known to compile on Microsoft (R) Direct3D Shader Compiler 10.1

Currently I'm experiencing an issue where a C style cast containing const is causing the extension to throw errors saying:

Severity	Code		Description
Error		HLSL0022	Invalid expression term 'const'.	
Error		HLSL0009	Found 'const' but expected '<identifier>'.	
Error		HLSL0009	Found 'const' but expected ')'.	
Error		HLSL0009	Found 'const' but expected ')'.	
Error		HLSL0009	Found 'const' but expected ';'.
...

This is the line throwing the error.

worldNormal = mul3x3( modelNormal, ( const float3x3 )cModel[0] );
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