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

Invalid vector comparisons in HLSL shader code #2108

Open
rplatikanovCG opened this issue Dec 12, 2024 · 0 comments
Open

Invalid vector comparisons in HLSL shader code #2108

rplatikanovCG opened this issue Dec 12, 2024 · 0 comments

Comments

@rplatikanovCG
Copy link

In some cases OCIO generates invalid HLSL code like this:
if ( gamma != float3(1., 1., 1.) )

This fails compilation with the following error:
error X3019: if statement conditional expressions must evaluate to a scalar

The correct code should be:
if ( any( gamma != float3(1., 1., 1.) ) )

This is essentially the same issue as #1810 but for HLSL. There's already a fix in GpuShaderText::vectorCompareExpression() but it's only for Metal.

Can be reproduced using the OCIO config shipped with recent Blender versions, with some of the AgX looks. In our case we're creating a LegacyViewingPipeline containing a DisplayViewTransform and a looks override, similarly to the ociodisplay app.

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