| 624 | } |
| 625 | |
| 626 | void ShadowsPass::SetupLight(ShadowsCustomBuffer& shadows, RenderContext& renderContext, RenderContextBatch& renderContextBatch, RenderLightData& light, ShadowAtlasLight& atlasLight) |
| 627 | { |
| 628 | // Copy light properties |
| 629 | atlasLight.Sharpness = light.ShadowsSharpness; |
| 630 | atlasLight.Fade = light.ShadowsStrength; |
| 631 | atlasLight.NormalOffsetScale = light.ShadowsNormalOffsetScale * NormalOffsetScaleTweak * (1.0f / (float)atlasLight.Resolution); |
| 632 | atlasLight.Bias = light.ShadowsDepthBias; |
| 633 | atlasLight.FadeDistance = Math::Max(light.ShadowsFadeDistance, 0.1f); |
| 634 | atlasLight.Distance = Math::Min(renderContext.View.Far, light.ShadowsDistance); |
| 635 | atlasLight.Bounds.Center = light.Position + renderContext.View.Origin; // Keep bounds in world-space to properly handle DirtyStaticBounds |
| 636 | atlasLight.Bounds.Radius = 0.0f; |
| 637 | |
| 638 | // Adjust bias to account for lower shadow quality |
| 639 | if (shadows.MaxShadowsQuality == 0) |
| 640 | atlasLight.Bias *= 1.5f; |
| 641 | } |
| 642 | |
| 643 | bool ShadowsPass::SetupLight(ShadowsCustomBuffer& shadows, RenderContext& renderContext, RenderContextBatch& renderContextBatch, RenderLocalLightData& light, ShadowAtlasLight& atlasLight) |
| 644 | { |
nothing calls this directly
no test coverage detected