diff options
| author | Alejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com> | 2025-04-11 21:28:20 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-11 22:28:20 -0300 |
| commit | 4c3fc8fd76e4a63adcb3e4fdf6e4240a4a04b1be (patch) | |
| tree | 4c4246e463033fb20adb401cdc1763af61b11446 /port | |
| parent | 9fc9b3cf806b56c1a975d77dbc23c282e8304759 (diff) | |
Bump LUS (#190)
* Bump LUS
* Disabled shader-based linear conversion on metal
* Fixed missing mInterpolationIndex
* Bump LUS
---------
Co-authored-by: KiritoDv <kiritodev01@gmail.com>
Diffstat (limited to 'port')
| -rw-r--r-- | port/shaders/metal/default.shader.metal | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/port/shaders/metal/default.shader.metal b/port/shaders/metal/default.shader.metal index 63d89fd3..a771ba10 100644 --- a/port/shaders/metal/default.shader.metal +++ b/port/shaders/metal/default.shader.metal @@ -147,17 +147,6 @@ float random(float3 value) { return fract(sin(random) * 143758.5453); } -float4 fromLinear(float4 linearRGB) { - float3 threshold = float3(0.0031308); - float3 gamma = float3(1.0 / 2.4); - float3 scale = float3(12.92); - float3 offset = float3(1.055); - float3 subtract = float3(0.055); - float3 higher = offset * fast::pow(linearRGB.xyz, gamma) - subtract; - float3 lower = linearRGB.xyz * scale; - return float4(select(higher, lower, linearRGB.xyz < threshold), linearRGB.w); -} - fragment float4 fragmentShader(ProjectedVertex in [[stage_in]], constant FrameUniforms &frameUniforms [[buffer(0)]] @if(o_textures[0]) , texture2d<float> uTex0 [[texture(0)]], sampler uTex0Smplr [[sampler(0)]] @@ -288,8 +277,8 @@ fragment float4 fragmentShader(ProjectedVertex in [[stage_in]], constant FrameUn @if(o_invisible) texel.w = 0.0; @end - return fromLinear(texel); + return texel; @else - return fromLinear(float4(texel, 1.0)); + return float4(texel, 1.0); @end }
\ No newline at end of file |
