From 728ccc96bcbcd631f7523cff9c87e1b581db209a Mon Sep 17 00:00:00 2001 From: Jeffery Myers Date: Thu, 24 Oct 2024 14:49:30 -0700 Subject: [PATCH] Use the vertex color as part of the base shader in GLSL330 (#4431) --- 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 6b5006224961..813f32b1d325 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; }