| 1647 | } |
| 1648 | |
| 1649 | void Renderer::AddDynamicPointLight(const Vector3& pos, float radius, const Color& color, bool castShadows, int hash) |
| 1650 | { |
| 1651 | if (_isLocked || g_GameFlow->LastFreezeMode != FreezeMode::None) |
| 1652 | return; |
| 1653 | |
| 1654 | if (radius <= EPSILON) |
| 1655 | return; |
| 1656 | |
| 1657 | auto dynamicLight = RendererLight{}; |
| 1658 | |
| 1659 | dynamicLight.Color = Vector3(color.x, color.y, color.z); |
| 1660 | if (radius < BLOCK(2)) |
| 1661 | dynamicLight.Color *= (radius / BLOCK(2)); |
| 1662 | |
| 1663 | dynamicLight.RoomNumber = NO_VALUE; |
| 1664 | dynamicLight.Intensity = 1.0f; |
| 1665 | dynamicLight.Position = pos; |
| 1666 | dynamicLight.In = 1.0f; |
| 1667 | dynamicLight.Out = radius; |
| 1668 | dynamicLight.Type = LightType::Point; |
| 1669 | dynamicLight.CastShadows = castShadows; |
| 1670 | dynamicLight.BoundingSphere = BoundingSphere(pos, radius); |
| 1671 | dynamicLight.Luma = Luma(dynamicLight.Color); |
| 1672 | dynamicLight.Hash = hash; |
| 1673 | |
| 1674 | PrepareDynamicLight(dynamicLight); |
| 1675 | } |
| 1676 | |
| 1677 | void Renderer::AddDynamicFogBulb(const Vector3& pos, float radius, float density, const Color& color, int hash) |
| 1678 | { |
no test coverage detected