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

[Feature] Mesh preview scale and bias #162

Open
moradin opened this issue Oct 12, 2015 · 2 comments
Open

[Feature] Mesh preview scale and bias #162

moradin opened this issue Oct 12, 2015 · 2 comments
Labels
Feature An improvement or feature Unresolved Waiting for a fix or implementation

Comments

@moradin
Copy link
Contributor

moradin commented Oct 12, 2015

Since I'm compressing all my vertices I have a hard time previewing them in the VS Input view. The decompression is just a MAD with 2 vectors that are stored in a mesh specific constant buffer. It would be great if the mesh preview would support adding a scale and bias. If I will have some free time I will try to make this myself but that might take a few weeks before I get there so I'm just adding this here if anyone can help out.

@baldurk
Copy link
Owner

baldurk commented Oct 12, 2015

I like the idea of this but the only thing is I'd want to be careful that the feature isn't too particularly specific to a narrow set of use-cases. It seems reasonable to me that most vertex compression would just be a linear transform, but I don't know for sure.

Possibly the more flexible version of this would be to allow you to write custom unpack shaders - exactly like the texture viewer has custom visualisation shaders, except for this case you'd write a vertex shader. You'd get all the constant buffers and resources bound from the drawcall's vertex shader, plus an extra constant buffer that contains the data for the MeshViewer's current camera.

That way you can do whatever crazy stuff you like - including if there's some secondary data you want to visualise that isn't just a straight component, might be useful for visual debugging rather than stepping through a single vertex for debug.

@baldurk baldurk added Feature An improvement or feature Unresolved Waiting for a fix or implementation labels Oct 12, 2015
@moradin
Copy link
Contributor Author

moradin commented Oct 12, 2015

Both sound good to me. I would imagine most people try to keep the unpack overhead minimal and going above a simple mad doesn't necessarily pay off in quality or precision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature An improvement or feature Unresolved Waiting for a fix or implementation
Projects
None yet
Development

No branches or pull requests

2 participants