Skip to content

Commit

Permalink
fix: texture gamma correction
Browse files Browse the repository at this point in the history
  • Loading branch information
ww24 committed May 28, 2021
1 parent 4e910ed commit aee07ce
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gfx/shaders/basic.frag
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,10 @@ uniform sampler2D texture0;
void main()
{
color = texture(texture0, TexCoord);

// discard alpha
if (color.a < 1.0) discard;

// gamma correction
color = pow(color, vec4(0.4545));
}

0 comments on commit aee07ce

Please sign in to comment.