Skip to content

Fix compatibility shadow size not being initialized#83141

Merged
akien-mga merged 1 commit into
godotengine:masterfrom
BastiaanOlij:fix_shadow_size
Oct 11, 2023
Merged

Fix compatibility shadow size not being initialized#83141
akien-mga merged 1 commit into
godotengine:masterfrom
BastiaanOlij:fix_shadow_size

Conversation

@BastiaanOlij

@BastiaanOlij BastiaanOlij commented Oct 11, 2023

Copy link
Copy Markdown
Contributor

Took me way too long to find but turned out that in a runtime build, we were never initialising our size for our directional shadow maps in the compatibility renderer, only the RD renderer.

In an editor build this was getting loaded through EditorNode::_update_from_settings so the issue was kind of hidden.

directional_shadow.size = GLOBAL_GET("rendering/lights_and_shadows/directional_shadow/size");
directional_shadow.use_16_bits = GLOBAL_GET("rendering/lights_and_shadows/directional_shadow/16_bits");

// lightmap_probe_capture_update_speed = GLOBAL_GET("rendering/lightmapping/probe_capture/update_speed");

@AThousandShips AThousandShips Oct 11, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// lightmap_probe_capture_update_speed = GLOBAL_GET("rendering/lightmapping/probe_capture/update_speed");
//lightmap_probe_capture_update_speed = GLOBAL_GET("rendering/lightmapping/probe_capture/update_speed");

Commented out code has no space

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No space ? I hate no space :P

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(but yes commented out code has no leading space but text does, for clarity)

directional_shadow.size = GLOBAL_GET("rendering/lights_and_shadows/directional_shadow/size");
directional_shadow.use_16_bits = GLOBAL_GET("rendering/lights_and_shadows/directional_shadow/16_bits");

// lightmap_probe_capture_update_speed = GLOBAL_GET("rendering/lightmapping/probe_capture/update_speed");

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this as a comment so we don't overlook this once we make the lightmapper work.

@akien-mga

Copy link
Copy Markdown
Member

Likely fixes #82503 too?

@BastiaanOlij

Copy link
Copy Markdown
Contributor Author

Likely fixes #82503 too?

That would seem logical

@akien-mga

Copy link
Copy Markdown
Member

Likely fixes #82503 too?

That would seem logical

Tested and confirmed.

@clayjohn clayjohn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aahhhh this is an embarrassing mistake.

Looks good

@Calinou Calinou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally (rebased on top of master 4b7cc99), it works as expected.

@akien-mga akien-mga merged commit 775ab4e into godotengine:master Oct 11, 2023
@akien-mga

Copy link
Copy Markdown
Member

Thanks!

@BastiaanOlij BastiaanOlij deleted the fix_shadow_size branch October 11, 2023 23:00
@akien-mga akien-mga changed the title Fix compatibility shadow size not being initialised Fix compatibility shadow size not being initialized Nov 29, 2023
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.

OpenGL stereo render issue on Quest when shadow is enabled OpenGL: Directional shadow rendering works in the editor, but not in the running project

5 participants