mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-30 08:51:08 +00:00
New def tokens for "tint": "shadered" or "sr", "shadeblue" or "sb", "shadegreen" or "sg"
tint { pal <pal> shadered <0-255> shadegreen <0-255> shadeblue <0-255> } Make shade apply a tint based on the RGB. Default values for shade are zero (black). Patch from Fox. git-svn-id: https://svn.eduke32.com/eduke32@6557 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
756fa2bbd8
commit
ae47d2f11d
6 changed files with 50 additions and 27 deletions
|
@ -1892,7 +1892,12 @@ static void polymost_drawpoly(vec2f_t const * const dpxy, int32_t const n, int32
|
|||
pc[0] = pc[1] = pc[2] = 1.0f;
|
||||
else
|
||||
#endif
|
||||
pc[0] = pc[1] = pc[2] = getshadefactor(globalshade);
|
||||
{
|
||||
polytint_t const & tint = hictinting[globalpal];
|
||||
pc[0] = (1.f-(tint.sr*(1.f/255.f)))*getshadefactor(globalshade)+(tint.sr*(1.f/255.f));
|
||||
pc[1] = (1.f-(tint.sg*(1.f/255.f)))*getshadefactor(globalshade)+(tint.sg*(1.f/255.f));
|
||||
pc[2] = (1.f-(tint.sb*(1.f/255.f)))*getshadefactor(globalshade)+(tint.sb*(1.f/255.f));
|
||||
}
|
||||
|
||||
// spriteext full alpha control
|
||||
pc[3] = float_trans(method & DAMETH_MASKPROPS, drawpoly_blend) * (1.f - drawpoly_alpha);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue