Skip to content
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

Disable lights for objects with baked lighting #41629

Merged
merged 1 commit into from
Oct 19, 2020

Conversation

JFonS
Copy link
Contributor

@JFonS JFonS commented Aug 30, 2020

Don't apply lighting to objects when they have a lightmap texture and the light is set to BAKE_ALL. This prevents applying the same direct light twice on the same object and makes setting up scenes with mixed lighting much easier.

Addresses godotengine/godot-proposals#1306.

Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

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

Implementation looks great! Just make sure to fill in all the docs before it is merged.

doc/classes/VisualServer.xml Show resolved Hide resolved
@lawnjelly
Copy link
Member

Looks good to me too (with clayjohn's amendments)! 😄 👍

@JFonS
Copy link
Contributor Author

JFonS commented Sep 13, 2020

Updated the PR to add more docs. If the added docs are fine, this should be good to merge for 3.2.4 :)

doc/classes/VisualServer.xml Outdated Show resolved Hide resolved
Don't apply lighting to objects when they have a lightmap texture and
the light is set to BAKE_ALL. This prevents applying the same direct
light twice on the same object and makes setting up scenes with mixed
lighting much easier.
@reduz reduz merged commit 388ebfb into godotengine:3.2 Oct 19, 2020
@Janders1800
Copy link

Janders1800 commented Oct 21, 2020

For the sake of consistency I'll report that DirectionalLights still double illuminate backed objects, even wen setup to Bake Mode All. But I can already work with this, great enhancement!

I can open a bug report if you want to track it there.

@mindinsomnia
Copy link

For the sake of consistency I'll report that DirectionalLights still double illuminate backed objects, even wen setup to Bake Mode All. But I can already work with this, great enhancement!

I can open a bug report if you want to track it there.

It sounds like a bug to me. I think it'd be worth reporting it.

@Calinou
Copy link
Member

Calinou commented Jan 16, 2021

For the sake of consistency I'll report that DirectionalLights still double illuminate backed objects, even wen setup to Bake Mode All. But I can already work with this, great enhancement!

I can open a bug report if you want to track it there.

@Janders1800 Can you still reproduce this DirectionalLight issue in 3.2.4beta6?

@Janders1800
Copy link

No, it seems to work OK

@Calinou
Copy link
Member

Calinou commented Jan 19, 2021

@Janders1800 Actually, I was able to reproduce this since I last commented:

test_lightmap.zip

Try making the DirectionalLight visible in main scene included in the above project.

@Janders1800
Copy link

Weird, I can reproduce on your project but in mine works ok.
LightMaps.zip

@Calinou
Copy link
Member

Calinou commented Feb 22, 2021

@Janders1800 Looking at your test project, it seems this feature works as expected in GLES2 but not GLES3. I'll open a new issue about this.

@JFonS JFonS deleted the disable_baked_lights branch May 4, 2021 07:46
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.

8 participants