Skip to content

Remove redundant Z rescaling in multiview VoxelGI reconstruct_position#116436

Closed
luzader wants to merge 1 commit into
godotengine:masterfrom
luzader:patch-1
Closed

Remove redundant Z rescaling in multiview VoxelGI reconstruct_position#116436
luzader wants to merge 1 commit into
godotengine:masterfrom
luzader:patch-1

Conversation

@luzader
Copy link
Copy Markdown
Contributor

@luzader luzader commented Feb 18, 2026

Fix for #116409
This is a draft because it works on the MRP, and "almost" works on a real XR headset.

After 4.3-dev6, the * 2.0 - 1.0 in the shader would seem to be double-correcting: set_depth_correction in gi.cpp should already be accounting for this.

MRP on Linux (MobileVR)

Fully fixes the issue, even if the camera is at arbitrary positions and angles.

MRP on Windows 11 (Bigscreen Beyond 2)

The scene actually has lighting now, but the lighting projection is distorted. I'm not sure how to describe the distortion, but (as you might expect) it varies with camera position.

Question

Is this flip_y really meant to be hardcoded to false, or should it be parameterized to use render_data->scene_data->flip_y, as it is in some other places in the codebase?

correction.set_depth_correction(false);

@luzader
Copy link
Copy Markdown
Contributor Author

luzader commented Feb 19, 2026

Tried parameterizing the y_flip to use the scene_data flip_y, it didn't change the behavior. There's some other problem connected to voxel GI sampling that I haven't found.

@BastiaanOlij
Copy link
Copy Markdown
Contributor

This is correct however it's only part of the solution, I did some more work in making GI work properly for stereo rendering here: #117303

@BastiaanOlij
Copy link
Copy Markdown
Contributor

This fix was included in #117619 and should be resolved. Closing this PR.

@luzader luzader deleted the patch-1 branch April 17, 2026 00:18
@AThousandShips AThousandShips removed this from the 4.x milestone Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants