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

Do not reset scissorTest in WEBGLRenderPass #2045

Merged
merged 1 commit into from
Mar 19, 2024
Merged

Conversation

Pessimistress
Copy link
Collaborator

This is causing a regression in deck.gl's picking and collision filter. Calling device.beginRenderPass() or renderPass.setParameters() will always set scissorTest to false.

It could be argued that beginRenderPass is expected to reset the state (questionable because it doesn't do this to any other parameter), however setParameters() as a public method should never affect a value not present in the argument.

Alternatively we can allow scissorRect to accept null on which we disable scissor test.

Change List

  • Only sets scissorTest if scissorRect is present

Copy link
Collaborator

@ibgreen ibgreen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I think it makes sense. We want to emulate WebGPU parameter semantics in WebGL but WebGPU doesn't support inheriting a dirty context so WebGL module has some freedom to define how this works.

Some comments may be appropriate and maybe even a short section in the parameters page or separate about attaching to existing WebGL contexts

@Pessimistress Pessimistress merged commit 12675c6 into master Mar 19, 2024
2 checks passed
@Pessimistress Pessimistress deleted the x/scissor-test branch March 19, 2024 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants