mirror of
https://github.com/ZDoom/ZDRay.git
synced 2024-11-26 05:41:42 +00:00
Merge remote-tracking branch 'nash/master'
This commit is contained in:
commit
3b57fa7f79
1 changed files with 2 additions and 2 deletions
|
@ -221,8 +221,8 @@ Vec3 LightmapBuilder::LightTexelSample(const Vec3 &origin, Surface *surface)
|
||||||
float negPitch = -radians(tl->mapThing->pitch);
|
float negPitch = -radians(tl->mapThing->pitch);
|
||||||
float xyLen = std::cos(negPitch);
|
float xyLen = std::cos(negPitch);
|
||||||
Vec3 spotDir;
|
Vec3 spotDir;
|
||||||
spotDir.x = std::sin(radians(tl->mapThing->angle)) * xyLen;
|
spotDir.x = -std::cos(radians(tl->mapThing->angle)) * xyLen;
|
||||||
spotDir.y = std::cos(radians(tl->mapThing->angle)) * xyLen;
|
spotDir.y = -std::sin(radians(tl->mapThing->angle)) * xyLen;
|
||||||
spotDir.z = -std::sin(negPitch);
|
spotDir.z = -std::sin(negPitch);
|
||||||
float cosDir = Vec3::Dot(dir, spotDir);
|
float cosDir = Vec3::Dot(dir, spotDir);
|
||||||
spotAttenuation = smoothstep(tl->outerAngleCos, tl->innerAngleCos, cosDir);
|
spotAttenuation = smoothstep(tl->outerAngleCos, tl->innerAngleCos, cosDir);
|
||||||
|
|
Loading…
Reference in a new issue