From 37151f8b33ba2dfa83d7f387492d203a5a13d1c6 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Mon, 10 May 2021 17:18:52 -0400 Subject: graphics: pbr: Add comments to fragment shader. --- data/shaders/pbr-frag.glsl | 6 +++--- 1 file 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 { -- cgit v1.2.3