mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 06:53:43 +00:00
Add ICC profile option
This commit is contained in:
@@ -29,7 +29,7 @@ SDrawQuadPixelOutput PSMain(SDrawQuadPixelInput input)
|
||||
if (result.color.a <= 0.0)
|
||||
discard;
|
||||
|
||||
result.color.rgb = AppleRGBToSRGBLinear(result.color.rgb);
|
||||
result.color.rgb = ApplyColorSpaceTransform(result.color.rgb);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ SDrawQuadPixelOutput PSMain(SDrawQuadPixelInput input)
|
||||
if (result.color.a <= 0.0)
|
||||
discard;
|
||||
|
||||
result.color.rgb = AppleRGBToSRGBLinear(result.color.rgb);
|
||||
result.color.rgb = ApplyColorSpaceTransform(result.color.rgb);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@@ -68,3 +68,12 @@ float3 AppleRGBToSRGBLinear(float3 color)
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
float3 ApplyColorSpaceTransform(float3 color)
|
||||
{
|
||||
#ifdef USE_ICC_PROFILE
|
||||
return saturate(AppleRGBToSRGBLinear(color));
|
||||
#else
|
||||
return SRGBToLinear(color);
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user