mirror of
https://github.com/w23/xash3d-fwgs
synced 2024-12-17 14:59:57 +01:00
rtx: add qrad light intensity scaling
This commit is contained in:
parent
1b71237279
commit
4935340432
@ -244,6 +244,12 @@ static unsigned parseEntPropClassname(const string value, class_name_e *out, uns
|
||||
return bit;
|
||||
}
|
||||
|
||||
static void weirdGoldsrcLightScaling( vec3_t intensity ) {
|
||||
float l1 = Q_max( intensity[0], max( intensity[1], intensity[2] ) );
|
||||
l1 = l1 * l1 / 10;
|
||||
VectorScale( intensity, l1, intensity );
|
||||
}
|
||||
|
||||
static void parseStaticLightEntities( void ) {
|
||||
const model_t* const world = gEngine.pfnGetModelByIndex( 1 );
|
||||
char *pos;
|
||||
@ -284,6 +290,8 @@ static void parseStaticLightEntities( void ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
weirdGoldsrcLightScaling(values._light);
|
||||
|
||||
{
|
||||
vk_light_entity_t *le = g_light_entities.lights + g_light_entities.num_lights++;
|
||||
VectorCopy(values.origin, le->origin);
|
||||
@ -853,6 +861,9 @@ static qboolean addDlight( const dlight_t *dlight ) {
|
||||
dlight->color.g * scaler,
|
||||
dlight->color.b * scaler,
|
||||
1.f);
|
||||
|
||||
weirdGoldsrcLightScaling( light->color );
|
||||
|
||||
Vector4Set(
|
||||
light->origin,
|
||||
dlight->origin[0],
|
||||
|
Loading…
Reference in New Issue
Block a user