[vulkan] Double alias top/bottom color values

The bright end of the color map is actually twice the palette value, but
I didn't understand this when I came up with the shirt/pants color
scheme for vulkan. However, the skin texture can store only 0..1, so the
mapping to 0..2 needs to be done in the shader. It looks like it works
at least better: the gold key at the end of demo1 doesn't look as bleh,
though I do get some weird colors still on ogres etc.
This commit is contained in:
Bill Currie 2022-11-14 11:35:26 +09:00
parent 9f6c367fce
commit 053c2c47db

View file

@ -27,8 +27,8 @@ main (void)
int i;
vec3 light = vec3 (0);
c = texture (Skin, vec3 (st, 0)) * base_color;
c += texture (Skin, vec3 (st, 1)) * unpackUnorm4x8(colorA);
c += texture (Skin, vec3 (st, 2)) * unpackUnorm4x8(colorB);
c += texture (Skin, vec3 (st, 1)) * unpackUnorm4x8(colorA) * 2;
c += texture (Skin, vec3 (st, 2)) * unpackUnorm4x8(colorB) * 2;
e = texture (Skin, vec3 (st, 3));
frag_color = c;