summaryrefslogtreecommitdiff
path: root/data/shaders/pbr-frag.glsl
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2021-05-10 17:18:52 -0400
committerDavid Thompson <dthompson2@worcester.edu>2021-05-10 17:18:52 -0400
commit37151f8b33ba2dfa83d7f387492d203a5a13d1c6 (patch)
treefbc33e53d137c486c49654efbd69a1597cbbc816 /data/shaders/pbr-frag.glsl
parent8b6e1945f14fa48208076139060c53ac332b3f0d (diff)
graphics: pbr: Add comments to fragment shader.
Diffstat (limited to 'data/shaders/pbr-frag.glsl')
-rw-r--r--data/shaders/pbr-frag.glsl6
1 files changed, 3 insertions, 3 deletions
diff --git a/data/shaders/pbr-frag.glsl b/data/shaders/pbr-frag.glsl
index 4573eaf..4c569fc 100644
--- a/data/shaders/pbr-frag.glsl
+++ b/data/shaders/pbr-frag.glsl
@@ -52,15 +52,15 @@ vec4 sampleTexture(sampler2D tex, bool enabled, int texcoord, vec3 factor, vec4
vec4 applyAlpha(vec4 color) {
// Apply alpha mode.
- if(material.alphaMode == 0) {
+ if(material.alphaMode == 0) { // opaque
return vec4(color.xyz, 1.0);
- } else if(material.alphaMode == 1) {
+ } else if(material.alphaMode == 1) { // mask
if(color.a >= material.alphaCutoff) {
return vec4(color.xyz, 1.0);
} else {
discard;
}
- } else if(material.alphaMode == 2) {
+ } else if(material.alphaMode == 2) { // blend
if(color.a <= 0.005) {
discard;
} else {