Fix D3D12 final color shader keyword collision

This commit is contained in:
2026-04-06 16:33:50 +08:00
parent 2ec24666c0
commit be4c43f11e

View File

@@ -13,10 +13,10 @@ struct PSInput {
};
float SRGBEncodeChannel(float value) {
const float linear = max(value, 0.0f);
return linear <= 0.0031308f
? linear * 12.92f
: 1.055f * pow(linear, 1.0f / 2.4f) - 0.055f;
const float linearValue = max(value, 0.0f);
return linearValue <= 0.0031308f
? linearValue * 12.92f
: 1.055f * pow(linearValue, 1.0f / 2.4f) - 0.055f;
}
float3 ApplyLinearToSRGB(float3 color) {