Просмотр исходного кода

Use the vertex color as part of the base shader in GLSL330 (#4431)

Jeffery Myers 10 месяцев назад
Родитель
Сommit
728ccc96bc
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      examples/shaders/resources/shaders/glsl330/base.fs

+ 4 - 1
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;
 }