Skip to content

Commit

Permalink
Update cImageProcessing.fxh
Browse files Browse the repository at this point in the history
  • Loading branch information
papadanku committed Jun 27, 2023
1 parent 022b3a8 commit 5f01867
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shaders/shared/cImageProcessing.fxh
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@
float SumRGB = length(Color.rgb);

float2 P = 0.0;
P.x = (DotRG == 0.0) ? White.x : atan2(Color.g, Color.r);
P.y = (SumRGB == 0.0) ? White.y : asin(SumRG / SumRGB);
P.x = (DotRG == 0.0) ? White.x : atan2(abs(Color.g), abs(Color.r));
P.y = (SumRGB == 0.0) ? White.y : asin(abs(SumRG / SumRGB));

return saturate(P * IHalfPi);
}
Expand Down

0 comments on commit 5f01867

Please sign in to comment.