Repository navigation
Conversation
PbrSurfaceRenderer gains a debug_channel (Final, base colour, alpha, metallic, roughness, occlusion, emissive, shading/geometry normal, tangent, bitangent, texture coordinates 0/1), as in the Khronos glTF Sample Viewer, chosen with a "Debug View" control. The channel is per renderer rather than on the shared Material, so debugging one layer leaves others drawing the same material alone. It is passed in the unused w of the material block's options and selected by a uniform branch in pbr.frag, so changing it needs no new pipeline. Data channels are decoded from sRGB before output so the sRGB swapchain shows their raw values; vectors are mapped from [-1, 1] to [0, 1].
Owner
Author
|
Superseded by the generalized debug views on feature/debug-views (reviewed and merged locally). |
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.
Step 10 of the PBR plan: debug channel views for
balsa.pbr_surface.PbrDebugChannel+pbr_debug_channel_names();PbrSurfaceRenderer::debug_channelwith a Debug View control.Material, so other layers drawing the same material are unaffected.options.wof the material block and picked with a uniform branch inpbr.frag, so switching channels builds no new pipeline.Tests:
pbr_surface_debug_channelcovers the control, the uniform value, and that the setting is per renderer and copied by clones. The existing shader-permutation test compilespbr.frag.Not yet done: checking the channels visually in the viewer (e.g. NormalTangentTest, DamagedHelmet).