mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-05-31 09:11:43 +00:00
- Added spot light support to gl_SetDynSpriteLight
This commit is contained in:
parent
f398286162
commit
bae3620540
2 changed files with 26 additions and 6 deletions
|
@ -141,10 +141,10 @@ void gl_AddLightToList(int group, ADynamicLight * light, FDynLightData &ldata)
|
|||
spotOuterAngle = light->SpotOuterAngle.Cos();
|
||||
|
||||
DAngle negPitch = -light->Angles.Pitch;
|
||||
float xyLen = negPitch.Cos();
|
||||
spotDirX = -light->Angles.Yaw.Cos() * xyLen;
|
||||
spotDirY = -light->Angles.Yaw.Sin() * xyLen;
|
||||
spotDirZ = -negPitch.Sin();
|
||||
double xzLen = negPitch.Cos();
|
||||
spotDirX = -light->Angles.Yaw.Cos() * xzLen;
|
||||
spotDirY = -negPitch.Sin();
|
||||
spotDirZ = -light->Angles.Yaw.Sin() * xzLen;
|
||||
}
|
||||
|
||||
float *data = &ldata.arrays[i][ldata.arrays[i].Reserve(16)];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue