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

26 lines
516 B
Plaintext
Raw Normal View History

2020-08-13 20:14:37 +02:00
#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);
}