]> git.tdb.fi Git - libs/gl.git/commit
Implement alpha cutoff for materials
authorMikko Rasa <tdb@tdb.fi>
Fri, 11 Mar 2022 09:55:49 +0000 (11:55 +0200)
committerMikko Rasa <tdb@tdb.fi>
Fri, 11 Mar 2022 10:06:02 +0000 (12:06 +0200)
commitae423e6ef278388f92802fbae34b1c7ec339292f
tree020913de7fdf5431f11bbb5f137ad8549206cacd
parent26b3d7bb741bf27468bfad7224a3d06a72579a68
Implement alpha cutoff for materials

Having to implement it separately in each material's shader is not
optimal, but since they each define their own uniform block, no better
solution is readily apparent.

The occluder shader also supports alpha cutoff so that objects with
such materials can cast proper shadows.
shaderlib/cooktorrance.glsl
shaderlib/occluder.glsl
shaderlib/phong.glsl
shaderlib/unlit.glsl
source/materials/material.cpp
source/materials/material.h