We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
fn hard_light(cb: vec3<f32>, cs: vec3<f32>) -> vec3<f32> { return select( screen(cb, 2.0 * cs - 1.0), cb * 2.0 * cs, cs <= vec3(0.5) ); }
gets translated into
float3 hard_light(float3 cb_3, float3 cs_3) { const float3 _e7 = screen(cb_3, ((2.0 * cs_3) - (1.0).xxx)); return ((cs_3 <= (0.5).xxx) ? ((cb_3 * 2.0) * cs_3) : _e7); }
and you get this error:
condition for short-circuiting ternary operator must be scalar, for non-scalar types use 'select'
here is the explanation https://github.com/microsoft/DirectXShaderCompiler/wiki/HLSL-2021#logical-operation-short-circuiting-for-scalars.
The text was updated successfully, but these errors were encountered:
closing as duplicate of #4498
Sorry, something went wrong.
No branches or pull requests
gets translated into
and you get this error:
here is the explanation https://github.com/microsoft/DirectXShaderCompiler/wiki/HLSL-2021#logical-operation-short-circuiting-for-scalars.
The text was updated successfully, but these errors were encountered: