jak-project/game/graphics/opengl_renderer/shaders/tfrag3.frag
ManDude 2e18cb605a
[runtime] optimize DirectRenderer for multiple textures + optimize sprite renderer (#1054)
* optimize sprite texture flush + update shaders

* fix bugs

* change logic a bit

* crunch PNGs

* hud size fix

* clang

* remove shaders from list

* use really small alpha cut-off point for sprites

* ad `flat` to vertex shaders too

* increase cut-off very slightly

* take *2 into account

* ok for real this should be good enough
2022-01-06 18:47:20 -05:00

25 lines
411 B
GLSL

#version 430 core
out vec4 color;
in vec4 fragment_color;
in vec3 tex_coord;
uniform sampler2D tex_T0;
uniform float alpha_min;
uniform float alpha_max;
void main() {
//vec4 T0 = texture(tex_T0, tex_coord);
vec4 T0 = texture(tex_T0, tex_coord.xy);
color = fragment_color * T0 * 2.0;
if (color.a < alpha_min) {
discard;
}
if (color.a > alpha_max) {
discard;
}
}