-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Improving scissor usage #668
Comments
I suggest we push this post I am not sure about adding |
glTF declares itself as a "JPEG for 3D", so interoperability of the base spec must be one the top format's priorities. Current state of handling If we don't have enough time to collect people's feedback, I'd prefer to remove it (afair, stencil support was removed from 1.0 for similar reasons). |
I am having a hard time coming up with a real use case for the current form other than if an app knows it will have a fixed viewport, e.g., as an embed, not a fullscreen app. I suppose since no one is using this AFAIK if it would be fine to remove and add back when full support is thought through. Can you open a PR to update the spec and check the sample models? |
Sample models are clean. |
See #681. |
Updated in #826 |
Currently,
states.functions.scissor
is defined asAt the same time, there is no way in glTF to define window and/or viewport dimensions, so
scissor
state is almost useless (since it uses window coordinates) especially in the WebGL context, because HTML canvas can have any random dimensions (and they change with window resizing and full-screen toggling).VIEWPORT
uniform parameter can't help with this, because it has the opposite purpose: provide viewport info to shader.I can see two possible solutions for this issue:
viewport
property tostates.functions
dictionary and make it required whenscissor
is present.Add also
width
andheight
toasset
and/orscene
to declare desired window size (of course, runtime can scale everything to actual canvas dimensions). Such approach will align glTF with other multimedia formats (think of image or video) and will also make embedding glTF assets into web pages more predictable.scissor
fromstates.functions
(andSCISSOR_TEST
fromstates.enable
).For more flexible viewport / scissor positioning (relative, absolute, fixed, etc) something like "window layout" extension could be proposed later.
The text was updated successfully, but these errors were encountered: