yasirkula / UnityRuntimeInspector

Runtime Inspector and Hierarchy solution for Unity for debugging and runtime editing purposes
MIT License
1.75k stars 139 forks source link

Shader error on PS4/PS5 builds #56

Closed tour1st closed 4 months ago

tour1st commented 5 months ago

Description of the bug

When building on Unity PS4 or PS5, the following error is reported : Shader error in 'UI/ColorWheel': Program 'frag', ambiguous call to 'lerp'. Found 91 possible candidates: at line 115 (on ps5_cggc)

Reproduction steps

Platform specs

Available fix

In file ExternalResources/ColorWheel/Visuals/ColorWheelShader.shader file, at line 115, replace fixed4 cBox = lerp(1, _Color, bGrad.x) * bGrad.y; by fixed4 cBox = lerp(c, _Color, bGrad.x) * bGrad.y;

Tested on PS4 and PS5 : shader error doesn't show anymore.

yasirkula commented 4 months ago

Learnt something new today lol. I've changed the line as fixed4 cBox = lerp(fixed4(1, 1, 1, 1), _Color, bGrad.x) * bGrad.y; because in the future, if we modify the value of c before reaching this line, then the lerp's result would be affected from this change.

I won't create a new release for this fix alone but it'll be included in the next release.