From ec95faad1b2d6b7a29831cbff64e7a62a415b23e Mon Sep 17 00:00:00 2001 From: myT <> Date: Fri, 24 Feb 2023 04:43:48 +0100 Subject: [PATCH] fixed the RB_CalcDiffuseColor color array offset --- changelog.txt | 3 +++ code/renderer/tr_shade_calc.cpp | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 57e237f..5be7647 100644 --- a/changelog.txt +++ b/changelog.txt @@ -97,6 +97,9 @@ chg: with r_backend GL3, depth fade with MSAA now requires GLSL 4.00 at a minimu chg: with r_backend GL3, alpha to coverage now requires GLSL 4.00 at a minimum +fix: in render batches with multiple shaders where the second or later surface had a shader using + "rgbGen lightingDiffuse", the colors would be wrong and crashes could occur + fix: the reported MSAA sample counts for the GL2 and GL3 back-ends could be wrong fix: registration of a read-only CVar would keep the existing value diff --git a/code/renderer/tr_shade_calc.cpp b/code/renderer/tr_shade_calc.cpp index e1b32b0..793c80b 100644 --- a/code/renderer/tr_shade_calc.cpp +++ b/code/renderer/tr_shade_calc.cpp @@ -993,7 +993,6 @@ static void RB_CalcDiffuseColor( unsigned char *colors, int firstVertex, int num float* v = tess.xyz[firstVertex]; float* normal = tess.normal[firstVertex]; - colors += firstVertex * 4; const float t = r_mapGreyscale->value; const float ti = 1.0f - t;