mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 15:02:01 +00:00
- fixed: non-SSE2 drawers still had SSE2 intrinsics for light calculations, preventing successful compilation on ARM.
This commit is contained in:
parent
fc3cb01029
commit
4110f34139
2 changed files with 2 additions and 2 deletions
|
@ -329,7 +329,7 @@ namespace swrenderer
|
|||
float Lyz2 = light_y; // L.y*L.y + L.z*L.z
|
||||
float Lx = light_x - viewpos_x;
|
||||
float dist2 = Lyz2 + Lx * Lx;
|
||||
float rcp_dist = _mm_cvtss_f32(_mm_rsqrt_ss(_mm_set_ss(dist2)));
|
||||
float rcp_dist = 1.f/sqrt(dist2);
|
||||
float dist = dist2 * rcp_dist;
|
||||
float distance_attenuation = 256.0f - MIN(dist * light_radius, 256.0f);
|
||||
|
||||
|
|
|
@ -249,7 +249,7 @@ namespace swrenderer
|
|||
float Lxy2 = light_x; // L.x*L.x + L.y*L.y
|
||||
float Lz = light_z - viewpos_z;
|
||||
float dist2 = Lxy2 + Lz * Lz;
|
||||
float rcp_dist = _mm_cvtss_f32(_mm_rsqrt_ss(_mm_set_ss(dist2)));
|
||||
float rcp_dist = 1.f/sqrt(dist2);
|
||||
float dist = dist2 * rcp_dist;
|
||||
float distance_attenuation = 256.0f - MIN(dist * light_radius, 256.0f);
|
||||
|
||||
|
|
Loading…
Reference in a new issue