spooky-game/assets/shaders/model-default-depth-fragmen...

26 lines
516 B
GLSL

#version 450
layout (location = 0) in vec3 vertexViewSpacePosition;
layout (location = 1) in vec2 vertexTexCoords;
layout (location = 0) out vec4 fragAlbedo;
layout (binding = 0) uniform sampler2D albedoTextureID;
uniform vec3 albedoColor;
void main()
{
// Texturing
vec4 texelColor = texture(albedoTextureID, vertexTexCoords);
// Discard fragment if transparent
if (texelColor.a < 0.5f)
{
discard;
}
// Final color
fragAlbedo = vec4(albedoColor.rgb, 1);
}