question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support stencilOpSeparate & stencilFuncSeparate?

See original GitHub issue

Now the properties of Material only support gl.stencilOp & gl.stencilFunc. Can we add some properties to Material like stencilZFailBack to support separated stencil settings in webgl2 ?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
WestLangleycommented, Aug 22, 2020

This would prevent the Back stencil properties from defaulting to null which isn’t consistent with any of the other Material properties

.blendSrcAlpha is null by default, so in that regard, adding 6 stencil Back variants that default to null seems reasonable.

and prevent the case where only a portion of the Back properties are set.

If that would be too logistically complex, then yes, a Material.separateStencil flag may be necessary.

0reactions
shawn0326commented, Aug 23, 2020

Yes, this is very similar to blendAlpha, it might be more reasonable to keep the API consistent.

Read more comments on GitHub >

github_iconTop Results From Across the Web

WebGLRenderingContext.stencilFuncSeparate() - Web APIs
stencilFuncSeparate () method of the WebGL API sets the front and/or back function and reference value for stencil testing.
Read more >
WebGLRenderingContext.stencilFuncSeparate - Web APIs ...
Stencilling enables and disables drawing on a per-pixel basis. It is typically used in multipass rendering to achieve special effects. Syntax. void gl....
Read more >
WebGLRenderingContext.stencilOpSeparate()
The WebGLRenderingContext.stencilOpSeparate() method of the WebGL API sets the front and/or back-facing stencil test actions.
Read more >
stencilFuncSeparate method - dart:web_gl library
API docs for the stencilFuncSeparate method from the RenderingContext class, for the Dart programming language.
Read more >
StencilTestTwoSideEnable - NVIDIA
Support for extension EXT_stencil_two_side. ... StencilFunc, StencilFuncSeparate, StencilMask, StencilMaskSeparate, StencilOp, StencilOpSeparate, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found