Skip to content

Commit

Permalink
fix(color): fix bad linearFromSRGB helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
clshortfuse committed Mar 7, 2024
1 parent 191ab91 commit c739603
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/common/color.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -175,18 +175,18 @@ float linearFromSRGB(float channel) {

float3 linearFromSRGB(float3 color) {
return float3(
srgbFromLinear(color.r),
srgbFromLinear(color.g),
srgbFromLinear(color.b)
linearFromSRGB(color.r),
linearFromSRGB(color.g),
linearFromSRGB(color.b)
);
}

float4 linearFromSRGB(float4 color) {
return float4(
srgbFromLinear(color.r),
srgbFromLinear(color.g),
srgbFromLinear(color.b),
srgbFromLinear(color.a)
linearFromSRGB(color.r),
linearFromSRGB(color.g),
linearFromSRGB(color.b),
color.a
);
}

Expand Down

0 comments on commit c739603

Please sign in to comment.