From 4bf89ec52be5d52bd6b45f8e60a98885df776bd1 Mon Sep 17 00:00:00 2001 From: Guy John Date: Thu, 20 May 2021 12:36:17 +0100 Subject: [PATCH] Simplifying texture material --- materials/texture.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/materials/texture.yaml b/materials/texture.yaml index d1641a7..b1723ee 100644 --- a/materials/texture.yaml +++ b/materials/texture.yaml @@ -22,12 +22,8 @@ fragmentShader: | uniform sampler2D Texture; uniform float TextureAlpha; - vec4 textureColours; - float alpha; out vec4 finalColour; void main() { - textureColours = texture(Texture, Texcoord); - alpha = textureColours.a; - finalColour = vec4(textureColours.rgb, alpha * TextureAlpha); + finalColour = texture(Texture, Texcoord) * vec4(1, 1, 1, TextureAlpha); }