feat(panels): allow a debug visualisation for offscreen textures - #1002
Open
seankmartin wants to merge 4 commits into
Open
feat(panels): allow a debug visualisation for offscreen textures#1002seankmartin wants to merge 4 commits into
seankmartin wants to merge 4 commits into
Conversation
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.
I've recently been debugging through some picking and depth buffer interactions, and I thought sharing the debug vis for the offscreen buffers could be helpful for future use. This adds a constant to both the slice view and projection panels that can be independently turned on. It's designed to extend pretty readily, since for example #993 adds a new offscreen buffer for normals. As an example of this vis (top left Color, top right Z, bottom left Pick, bottom right empty):
This could be further improved to show the debugs for each panel better by having a custom shader for each, but that's not likely worth it for the debug vis. If you need to see one panel better you can modify the default shader which is in
defineCopyFragmentShaderofoffscreen.ts. To try it, it has to be built locally since the debug flags are false by default.