Page 1 of 1
[2.6] renderclient() lighting
Posted: October 23rd, 2010, 5:57 am
by Protagores
It seems that all client (player/bot/etc.) models are rendered fullbright (with lightcolor(1,1,1) and lightdir(0,0,1); since the call of render() routine is done with NULL light parameter) Does anyone have any idea to fix this issue?
Thanks.
Re: [2.6] renderclient() lighting
Posted: October 23rd, 2010, 8:12 am
by Hirato
it's done irregardless of the light parameter
you should see a line like this inside iengine.h
Code: Select all
extern void lightreaching(const vec &target, vec &color, vec &dir, bool fast = false, extentity *e = 0, float ambient = 0.4f);
simply change the default value for ambient - typically to something lower like 0.1 or even 0 if you want pitch black models
Re: [2.6] renderclient() lighting
Posted: October 23rd, 2010, 12:00 pm
by Protagores
The thing I actually need is lighting that depends on location, e.g. in a bright place models are lighted more, in a dark one - lighted less, and the direction of lighting not being from camera, but from actual sources.
Mapmodels seem to be lighted properly, but not client models. And everything was working in 2.5 version, but now broken for some reason.
Re: [2.6] renderclient() lighting
Posted: October 23rd, 2010, 8:33 pm
by Hirato
it was always like that; now just do what I told you to