Fix the fragment shader to work with any background color

There now some dither to avoid banding in the gradients.
This commit is contained in:
luisangelsm
2026-01-19 19:23:57 +01:00
parent 41b02725d7
commit 720d58533c
6 changed files with 47 additions and 27 deletions

View File

@ -112,14 +112,14 @@ protected:
// Uniform buffer data structure (must match shader layout)
struct UniformData {
QMatrix4x4 viewProjectionMatrix;
QVector3D backgroundColor;
float _pad0;
QVector3D shadingColor;
float _pad1;
float viewProjectionMatrix[16]; // column-major 4x4
float backgroundColor[3];
float _pad0; // pad to vec4
float shadingColor[3];
float _pad1; // pad to vec4
float reflectionUp;
float reflectionDown;
int isReflection;
float isReflection;
float _pad2;
};