Light Combiner Editor Tool#235
Merged
Cameron-Micka merged 52 commits intomicrosoft:mainfrom Mar 14, 2025
Merged
Conversation
…in 0-1 space to have better resolution.
…ombines textures in lightmap space.
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new Unity Editor component, CustomProbe, to adjust ambient light settings for scenes where lightmaps have been removed.
- Adds a new CustomProbe class to set custom ambient light values via light probes.
- Configures material property blocks to update renderer properties accordingly.
Comments suppressed due to low confidence (1)
com.microsoft.mrtk.graphicstools.unity/Runtime/LightCombiner/CustomProbe.cs:23
- [nitpick] Consider renaming the local variable '_renderer' to 'renderer' since the underscore prefix is typically reserved for private fields, which may improve clarity.
var _renderer = GetComponent<Renderer>();
vmoras6699
approved these changes
Mar 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
LightCombinerWindow is an EditorWindow class for Unity that provides a user interface to combine light maps with albedo textures or hijack another texture for lightmaps. This is useful for exporting scenes to glTF (or other formats) where lightmaps are not supported.
For example, here is a glTF (.glb) of a scene exported without combining lightmaps:

an example of a glTF (.glb) after performing the "Merge With Albedo" technique:

A follow up to this PR will be docs and samples.
Verification