From 72e5a4110100f9c6f654b28027ade84d8cebcc2c Mon Sep 17 00:00:00 2001 From: Jeffery Myers Date: Thu, 24 Oct 2024 14:28:23 -0700 Subject: [PATCH] Use the vertex color as part of the base shader in GLSL330 --- examples/shaders/resources/shaders/glsl330/base.fs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/shaders/resources/shaders/glsl330/base.fs b/examples/shaders/resources/shaders/glsl330/base.fs index 6b500622..813f32b1 100644 --- a/examples/shaders/resources/shaders/glsl330/base.fs +++ b/examples/shaders/resources/shaders/glsl330/base.fs @@ -20,6 +20,9 @@ void main() // NOTE: Implement here your fragment shader code - finalColor = texelColor*colDiffuse; + // final color is the color from the texture + // times the tint color (colDiffuse) + // times the fragment color (interpolated vertex color) + finalColor = texelColor*colDiffuse*fragColor; }