25 lines
No EOL
422 B
GLSL
25 lines
No EOL
422 B
GLSL
#version 330 core
|
|
|
|
in vec4 outPos;
|
|
in vec3 outNormal;
|
|
in vec3 outTangent;
|
|
in vec3 outBitangent;
|
|
in vec2 outTextCoords;
|
|
|
|
out vec4 outAlbedo;
|
|
|
|
struct Material
|
|
{
|
|
vec4 diffuse;
|
|
};
|
|
|
|
uniform sampler2D textureSampler;
|
|
uniform Material material;
|
|
|
|
void main()
|
|
{
|
|
vec4 texColor = texture(textureSampler,outTextCoords);
|
|
if(texColor.a < 0.4){discard;}
|
|
outAlbedo = texColor;
|
|
texColor = texColor + material.diffuse;
|
|
} |