[Patch] Composite material emissive in the TBDR light pass - #1121
Open
miogds wants to merge 1 commit into
Open
Conversation
The deferred TBDR light shader zeroed the G-buffer emissive before the final composite, so material emissive values never reached the screen. Emissive defaults to zero for all materials, so only entities that set it explicitly are affected. Kernels regenerated via buildkernels.sh.
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.
Split out of #1110 as requested, so the emissive question can be reviewed on its own.
What
The TBDR deferred light pass reads the G-buffer emissive but zeroes it before the final composite:
This removes the zeroing so
material.emissiveValuewritten by the model pass actually reaches the screen. Kernels regenerated withbuildkernels.sh.Why it should be safe
Material.emissiveValuedefaults to.zero, the native-format loader defaultsemissiveFactorto zero, and the MDL/usdz import path never sets it — so existing assets render identically. Only entities that explicitly callupdateMaterialEmmisive(or the scene-builder.emissive()modifier from Scene builder DSL: primitive, light, and camera nodes + TBDR emissive fix #1110) change appearance.fragmentLightShaderpath is untouched.Testing
Verified on macOS with small emissive marker spheres orbiting a PBR-textured cube (dark IBL, no directional light): before, the spheres rendered black on their unlit side; after, they glow with their emissive color. Non-emissive geometry in the same scene (the PBR cube, textured meshes) renders unchanged before/after.
I know emissive was zeroed over a bug you found — if you remember its shape, happy to try to reproduce it against this change; and if you'd rather fix it your own way, feel free to treat this PR as a reference and close it.