From 2c6257a4460de7b0c75723aebf96cf265e078530 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 24 Feb 2023 19:29:27 +0000 Subject: Support for model colours mixed with textures --- gfx/gl/shaders/basicShader.vs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gfx/gl/shaders/basicShader.vs') diff --git a/gfx/gl/shaders/basicShader.vs b/gfx/gl/shaders/basicShader.vs index bc7ea5d..ff9a401 100644 --- a/gfx/gl/shaders/basicShader.vs +++ b/gfx/gl/shaders/basicShader.vs @@ -3,10 +3,12 @@ in vec3 position; in vec2 texCoord; in vec3 normal; +in vec4 colour; out vec3 FragPos; out vec2 TexCoords; out vec3 Normal; +out vec4 Colour; uniform mat4 viewProjection; uniform mat4 model; @@ -19,6 +21,7 @@ main() FragPos = worldPos.xyz; TexCoords = texCoord; Normal = (model * vec4(normal, 0.0)).xyz; + Colour = colour; gl_Position = viewProjection * worldPos; } -- cgit v1.2.3