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

StencilParameters support on WebGPU #5243

Merged
merged 15 commits into from
Apr 17, 2023
Merged

StencilParameters support on WebGPU #5243

merged 15 commits into from
Apr 17, 2023

Conversation

mvaligursky
Copy link
Contributor

@mvaligursky mvaligursky commented Apr 14, 2023

  • Portal and ScrollView engine examples now work on WebGPU
  • StencilParameters file / class was moved from scene to platform/graphics, along BlendState and DepthState, as a data container for the main API allowing stencil parameters setup.
  • WebgpuGraphicsDevice now handles stencil buffer on the main framebuffer, specified by the creation options.
  • WebglGraphicsDevice construction now handles options.stencil. Before it was hardcoded to true.

new API

	GraphicsDevice.setStencilState(stencilFront, stencilBack);

deprecated API on WebglGraphicsDevice:

  • The functionality is still there, but no longer exposed / documented.
	setStencilTest
	setStencilFunc
	setStencilFuncFront
	setStencilFuncBack
	setStencilOperation
	setStencilOperationFront
	setStencilOperationBack

Possible future improvements: #5244

@mvaligursky mvaligursky marked this pull request as draft April 14, 2023 11:59
@mvaligursky mvaligursky self-assigned this Apr 14, 2023
@mvaligursky mvaligursky added the area: graphics Graphics related issue label Apr 14, 2023
@mvaligursky mvaligursky marked this pull request as ready for review April 14, 2023 16:23
@mvaligursky mvaligursky merged commit 88d2f92 into main Apr 17, 2023
@mvaligursky mvaligursky deleted the mv-webgpu-stencil branch April 17, 2023 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants