Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Commit 9c34127

Browse files
committed
Fix for color grading always appearing monochrome on Vita
Fixed ApplyCommonGradingSteps for PSP2, the PSP2 cg compiler was using the incorrect version of max(), passing a float as the first parameter caused it to use the single component version of max instead of up-casting to float3 as happens on other platforms, it looks like PSP2 cg is missing the required overload for this function, explicitly casting the first parameter to float3 fixes this.
1 parent 3119900 commit 9c34127

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PostProcessing/Shaders/Builtins/Lut2DBaker.shader

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Shader "Hidden/PostProcessing/Lut2DBaker"
4242
colorLinear = LiftGammaGainHDR(colorLinear, _Lift, _InvGamma, _Gain);
4343

4444
// Do NOT feed negative values to RgbToHsv or they'll wrap around
45-
colorLinear = max(0.0, colorLinear);
45+
colorLinear = max((float3)0.0, colorLinear);
4646

4747
float3 hsv = RgbToHsv(colorLinear);
4848

0 commit comments

Comments
 (0)