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

Support arbitrary clip/transform stacks #154

Closed
pcwalton opened this issue Jan 27, 2016 · 2 comments
Closed

Support arbitrary clip/transform stacks #154

pcwalton opened this issue Jan 27, 2016 · 2 comments

Comments

@pcwalton
Copy link
Collaborator

@pcwalton pcwalton commented Jan 27, 2016

The idea here is to have a compressed matrix/transform palette and clip out in the fragment shader. This is somewhat slow in that it could have a lot of unnecessary FS invocations, but it's on-GPU instead of on-CPU and doesn't mandate batch breaks unlike stencil-based solutions, and that seems like a win. The common cases are handled in the VS, so this should only happen in uncommon situations.

gw: pcwalton: my tentative plan was to add support to the shader to handle clips as either a simple rect (as now) or a compressed set of 4 clip plans with arbitrary transform. I haven't checked that this idea will actually work yet :) But yes, you're right - if it works, that could handle gradients.
gw: pcwalton: Yes, a palette like the rects. I think they could be compressed a lot in the uniforms too - since there is only one normal you need (two planes have the same normal, the other two are perpendicular). I think we could just specify one normal and 4 d values perhaps or something like that...
@pcwalton
Copy link
Collaborator Author

@pcwalton pcwalton commented Feb 3, 2016

I think we won't need heterogeneous clip/transform stacks per se if we just have a list of clip quads (or parallelograms? maybe not in 3D) transformed into world space.

@kvark kvark mentioned this issue Oct 28, 2016
4 of 4 tasks complete
@kvark
Copy link
Member

@kvark kvark commented Nov 28, 2016

I suppose #498 covers that. Please feel free to re-open.

@kvark kvark closed this Nov 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.