mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-19 07:20:50 +00:00
[client] Reverse the direction of sunlight
Maps specify sunlight as shining in a specific direction, but the lighting system wants the direction to the sun as it's used directly in shading calculations. Direction correctness confirmed by disabling other lights and checking marcher's outside scene (ensuring the flat ground was lit). As a bonus, I've finally confirmed I actually have the skybox in the correct orientation (sunlight vector more or less matched the position of the sun in marcher's sky).
This commit is contained in:
parent
d60602421b
commit
b2928b5ed7
1 changed files with 1 additions and 1 deletions
|
@ -120,7 +120,7 @@ parse_sun (lightingdata_t *ldata, plitem_t *entity)
|
|||
}
|
||||
VectorSet (1, 1, 1, light.color);
|
||||
light.color[3] = sunlight;
|
||||
light.position = sun_vector (sunangle);
|
||||
light.position = -sun_vector (sunangle);
|
||||
light.direction = light.position;
|
||||
light.direction[3] = 1;
|
||||
light.attenuation = (vec4f_t) { 0, 0, 1, 0 };
|
||||
|
|
Loading…
Reference in a new issue