fast-nuclear-sim/assets/shader/main.fsh

21 lines
322 B
Plaintext
Raw Normal View History

2024-01-31 00:12:14 +11:00
#version 460 core
#extension GL_ARB_bindless_texture : require
in float brightness;
in flat sampler2D tex;
in vec2 texPos;
out vec4 FragColour;
uniform mat4 tex_mat;
void main()
{
vec4 texdata = texture2D(tex, texPos);
FragColour = tex_mat * texdata * vec4(vec3(brightness), 1);
if(FragColour.a == 0) discard;
}