Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,12 @@ static public void DoLensFlareDataDrivenCommon(Material lensFlareShader, LensFla
}

Vector3 diffToObject = positionWS - cameraPositionWS;
// Check if the light is forward, can be an issue with,
// the math associated to Panini projection
if (Vector3.Dot(cam.transform.forward, diffToObject) < 0.0f)
{
continue;
}
float distToObject = diffToObject.magnitude;
float coefDistSample = distToObject / comp.maxAttenuationDistance;
float coefScaleSample = distToObject / comp.maxAttenuationScale;
Expand Down
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed light unit conversion after changing mid gray value.
- Fixed Focus distance in path traced depth of field now takes into account the focus mode setting (volume vs camera).
- Fixed stencil buffer resolve when MSAA is enabled so that OR operator is used instead of picking the last sample.
- Fixed Lens Flare visible when being behind a camera with Panini Projection on (case 1370214);

### Changed
- Use RayTracingAccelerationStructure.CullInstances to filter Renderers and populate the acceleration structure with ray tracing instances for improved CPU performance on the main thread.
Expand Down