Discard small alpha values in fragment shader
This commit is contained in:
@@ -83,6 +83,11 @@ vec3 calculate_spot_light(SpotLight light, vec3 normal, vec3 frag_position, vec3
|
|||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
|
vec4 texture_color = texture(u_material.diffuse, texture_coords);
|
||||||
|
if (texture_color.a < 1e-2) {
|
||||||
|
discard;
|
||||||
|
}
|
||||||
|
|
||||||
vec3 norm = normalize(normal);
|
vec3 norm = normalize(normal);
|
||||||
|
|
||||||
vec3 view_pos = vec3(inverse(view)[3]);
|
vec3 view_pos = vec3(inverse(view)[3]);
|
||||||
|
|||||||
Reference in New Issue
Block a user