Skip to content

Fix volumetric fog with XR single-pass #2823

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 15, 2020
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
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 @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed wrong coat normal space in shader graph
- Fixed issue with faulty shadow transition when view is close to an object under some aspect ratio conditions
- Fixed NullPointerException when baking probes from the lighting window (case 1289680)
- Fixed volumetric fog with XR single-pass rendering.

### Changed
- Removed the material pass probe volumes evaluation mode.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,9 @@ static internal Vector3Int ComputeVolumetricViewportSize(HDCamera hdCamera, ref

int w = Mathf.RoundToInt(viewportWidth * screenFraction);
int h = Mathf.RoundToInt(viewportHeight * screenFraction);
int d = sliceCount;

// Round to nearest multiple of viewCount so that each views have the exact same number of slices (important for XR)
int d = hdCamera.viewCount * Mathf.CeilToInt(sliceCount / hdCamera.viewCount);

return new Vector3Int(w, h, d);
}
Expand Down