[Bug?Report Bug case IN-93966 - poly] InvalidTypeFound when custom shader for UGUI Image

Hi,

I’m make a custom shader for UGUI Image via ShaderGraph. But It’s failed when I run on actual device.

Report Bug Case Id: IN-93966 - poly

Environment:

  • Unity 6000.0.34
  • Polyspatial 2.1.2
  • visionOS 2.3

Log:


[Platform] Could not load ShaderGraph 'Shader Graphs/IndependentRoundedCorners': invalidTypeFound

Thanks.

Thanks for the repro case! There were a couple of expressions in SDFUtils.hlsl that caused issues with the custom HLSL parser that we use for PolySpatial. We’ll get those fixed in a future release, but for now there are easy workarounds:

For line 50, change:

float2 r2Position = rotate(translate(samplePosition, rect2props.xy), .125);

to

float2 translated = translate(samplePosition, rect2props.xy);
float2 r2Position = rotate(translated, .125);

And on line 65 (after the above change), change:

float minValue = min(min(min(min(r2, c0), c1), c2), c3.x);

to

float minValue = min(min(min(min(r2, c0), c1), c2), c3);