mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-21 18:01:15 +00:00
Use 0.0 instead of 0.5 for t for palette lookups.
I realized it's pretty silly using colormap + palette when I can just combine the two into one and have a 2D palette. This is in preparation for that.
This commit is contained in:
parent
2425498479
commit
928dd92276
7 changed files with 8 additions and 8 deletions
|
@ -12,5 +12,5 @@ main (void)
|
|||
pix = texture2D (texture, st).r;
|
||||
if (pix == 1.0)
|
||||
discard;
|
||||
gl_FragColor = texture2D (palette, vec2 (pix, 0.5)) * color;
|
||||
gl_FragColor = texture2D (palette, vec2 (pix, 0.0)) * color;
|
||||
}
|
||||
|
|
|
@ -14,5 +14,5 @@ main (void)
|
|||
float col;
|
||||
|
||||
col = texture2D (colormap, vec2 (pix, light * 4.0)).r;
|
||||
gl_FragColor = texture2D (palette, vec2 (col, 0.5));
|
||||
gl_FragColor = texture2D (palette, vec2 (col, 0.0));
|
||||
}
|
||||
|
|
|
@ -21,5 +21,5 @@ main (void)
|
|||
light = 255.0 - light;
|
||||
light += d * shadelight;
|
||||
col = texture2D (colormap, vec2 (pix, light / 255.0)).r;
|
||||
gl_FragColor = texture2D (palette, vec2 (col, 0.5));
|
||||
gl_FragColor = texture2D (palette, vec2 (col, 0.0));
|
||||
}
|
||||
|
|
|
@ -6,5 +6,5 @@ main (void)
|
|||
{
|
||||
if (color == 1.0)
|
||||
discard;
|
||||
gl_FragColor = texture2D (palette, vec2 (pix, 0.5));
|
||||
gl_FragColor = texture2D (palette, vec2 (pix, 0.0));
|
||||
}
|
||||
|
|
|
@ -26,5 +26,5 @@ main (void)
|
|||
st = direction.xy * len + flow * realtime / 16.0;
|
||||
pix = texture2D (solid, st).r;
|
||||
}
|
||||
gl_FragColor = texture2D (palette, vec2 (pix, 0.5));
|
||||
gl_FragColor = texture2D (palette, vec2 (pix, 0.0));
|
||||
}
|
||||
|
|
|
@ -16,8 +16,8 @@ main (void)
|
|||
pixb = texture2D (spriteb, stb).r;
|
||||
if (pixa == 1.0 && pixb == 1.0)
|
||||
discard;
|
||||
cola = texture2D (palette, vec2 (pixa, 0.5)) * colora;
|
||||
colb = texture2D (palette, vec2 (pixb, 0.5)) * colorb;
|
||||
cola = texture2D (palette, vec2 (pixa, 0.0)) * colora;
|
||||
colb = texture2D (palette, vec2 (pixb, 0.0)) * colorb;
|
||||
col = mix (cola, colb, blend);
|
||||
if (col.a == 0.0)
|
||||
discard;
|
||||
|
|
|
@ -27,5 +27,5 @@ main (void)
|
|||
|
||||
st = turb_st (tst, realtime);
|
||||
pix = texture2D (texture, st).r;
|
||||
gl_FragColor = texture2D (palette, vec2 (pix, 0.5));
|
||||
gl_FragColor = texture2D (palette, vec2 (pix, 0.0));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue