fix(viewport): clip text to stencil

This commit is contained in:
Hakan Seven committed 2026-08-04 11:34:32 +03:00
1 parent f6b9d6514e
commit 1955e022bf
2 files changed
+10 -2

No files matched your search

+2 -1
View File
@@ -260,6 +260,7 @@ pub fn create_pipelines(
atlas_bgl: &wgpu::BindGroupLayout,
color_format: wgpu::TextureFormat,
sample_count: u32,
content_stencil: &wgpu::StencilState,
) -> (wgpu::RenderPipeline, wgpu::RenderPipeline) {
let shader = device.create_shader_module(wgpu::ShaderModuleDescriptor {
label: Some("text.wgsl"),
@@ -298,7 +299,7 @@ pub fn create_pipelines(
format: wgpu::TextureFormat::Depth24PlusStencil8,
depth_write_enabled,
depth_compare,
stencil: wgpu::StencilState::default(),
stencil: content_stencil.clone(),
bias: wgpu::DepthBiasState::default(),
}),
multisample: wgpu::MultisampleState {