mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-01 16:41:09 +00:00
- fix decal color bug
This commit is contained in:
parent
f3897e26f0
commit
75248cffd0
1 changed files with 3 additions and 3 deletions
|
@ -640,7 +640,7 @@ static void RunShader(int x0, int x1, PolyTriangleThreadData* thread)
|
||||||
|
|
||||||
if (streamdata.uObjectColor2.a == 0.0f)
|
if (streamdata.uObjectColor2.a == 0.0f)
|
||||||
{
|
{
|
||||||
if (streamdata.uObjectColor.r != 0.0f || streamdata.uObjectColor.g != 0.0f || streamdata.uObjectColor.b != 0.0f)
|
if (streamdata.uObjectColor.r != 1.0f || streamdata.uObjectColor.g != 1.0f || streamdata.uObjectColor.b != 1.0f)
|
||||||
{
|
{
|
||||||
uint32_t r = (int)(streamdata.uObjectColor.r * 256.0f);
|
uint32_t r = (int)(streamdata.uObjectColor.r * 256.0f);
|
||||||
uint32_t g = (int)(streamdata.uObjectColor.g * 256.0f);
|
uint32_t g = (int)(streamdata.uObjectColor.g * 256.0f);
|
||||||
|
@ -661,8 +661,8 @@ static void RunShader(int x0, int x1, PolyTriangleThreadData* thread)
|
||||||
float t = thread->mainVertexShader.gradientdist.Z;
|
float t = thread->mainVertexShader.gradientdist.Z;
|
||||||
float inv_t = 1.0f - t;
|
float inv_t = 1.0f - t;
|
||||||
uint32_t r = (int)((streamdata.uObjectColor.r * inv_t + streamdata.uObjectColor2.r * t) * 256.0f);
|
uint32_t r = (int)((streamdata.uObjectColor.r * inv_t + streamdata.uObjectColor2.r * t) * 256.0f);
|
||||||
uint32_t g = (int)((streamdata.uObjectColor.g * inv_t + streamdata.uObjectColor2.r * t) * 256.0f);
|
uint32_t g = (int)((streamdata.uObjectColor.g * inv_t + streamdata.uObjectColor2.g * t) * 256.0f);
|
||||||
uint32_t b = (int)((streamdata.uObjectColor.b * inv_t + streamdata.uObjectColor2.r * t) * 256.0f);
|
uint32_t b = (int)((streamdata.uObjectColor.b * inv_t + streamdata.uObjectColor2.b * t) * 256.0f);
|
||||||
for (int x = x0; x < x1; x++)
|
for (int x = x0; x < x1; x++)
|
||||||
{
|
{
|
||||||
uint32_t texel = fragcolor[x];
|
uint32_t texel = fragcolor[x];
|
||||||
|
|
Loading…
Reference in a new issue