Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
vertex_stage={"module": vshader, "entry_point": "main"},
fragment_stage={"module": fshader, "entry_point": "main"},
primitive_topology=wgpu.PrimitiveTopology.triangle_strip,
rasterization_state={
"front_face": wgpu.FrontFace.ccw,
"cull_mode": wgpu.CullMode.none,
"depth_bias": 0,
"depth_bias_slope_scale": 0.0,
"depth_bias_clamp": 0.0,
},
color_states=[
{
"format": wgpu.TextureFormat.bgra8unorm_srgb,
"alpha_blend": (
wgpu.BlendFactor.one,
wgpu.BlendFactor.zero,
wgpu.BlendOperation.add,
),
"color_blend": (
wgpu.BlendFactor.one,
wgpu.BlendFactor.zero,
wgpu.BlendOperation.add,
),
"write_mask": wgpu.ColorWrite.ALL,
}
],
vertex_state={"index_format": wgpu.IndexFormat.uint32, "vertex_buffers": [],},
sample_count=1,
sample_mask=0xFFFFFFFF,
alpha_to_coverage_enabled=False,
)
"front_face": wgpu.FrontFace.ccw,
"cull_mode": wgpu.CullMode.none,
"depth_bias": 0,
"depth_bias_slope_scale": 0.0,
"depth_bias_clamp": 0.0,
},
color_states=[
{
"format": texture_format,
"alpha_blend": (
wgpu.BlendFactor.one,
wgpu.BlendFactor.zero,
wgpu.BlendOperation.add,
),
"color_blend": (
wgpu.BlendFactor.one,
wgpu.BlendFactor.zero,
wgpu.BlendOperation.add,
),
"write_mask": wgpu.ColorWrite.ALL,
}
],
depth_stencil_state=depth_stencil_state,
vertex_state={
"index_format": wgpu.IndexFormat.uint32,
"vertex_buffers": vbo_views,
},
sample_count=1,
sample_mask=0xFFFFFFFF,
alpha_to_coverage_enabled=False,
)
"front_face": wgpu.FrontFace.ccw,
"cull_mode": wgpu.CullMode.none,
"depth_bias": 0,
"depth_bias_slope_scale": 0.0,
"depth_bias_clamp": 0.0,
},
color_states=[
{
"format": wgpu.TextureFormat.bgra8unorm_srgb,
"alpha_blend": (
wgpu.BlendFactor.one,
wgpu.BlendFactor.zero,
wgpu.BlendOperation.add,
),
"color_blend": (
wgpu.BlendFactor.one,
wgpu.BlendFactor.zero,
wgpu.BlendOperation.add,
),
"write_mask": wgpu.ColorWrite.ALL,
}
],
vertex_state={"index_format": wgpu.IndexFormat.uint32, "vertex_buffers": [],},
sample_count=1,
sample_mask=0xFFFFFFFF,
alpha_to_coverage_enabled=False,
)
swap_chain = device.configure_swap_chain(
canvas,
device.get_swap_chain_preferred_format(canvas),
wgpu.TextureUsage.OUTPUT_ATTACHMENT,
layout=pipeline_layout,
vertex_stage={"module": vshader, "entry_point": "main"},
fragment_stage={"module": fshader, "entry_point": "main"},
primitive_topology=topology,
rasterization_state={
"front_face": wgpu.FrontFace.ccw,
"cull_mode": wgpu.CullMode.none,
"depth_bias": 0,
"depth_bias_slope_scale": 0.0,
"depth_bias_clamp": 0.0,
},
color_states=[
{
"format": wgpu.TextureFormat.bgra8unorm_srgb,
"alpha_blend": (
wgpu.BlendFactor.one,
wgpu.BlendFactor.zero,
wgpu.BlendOperation.add,
),
"color_blend": (
wgpu.BlendFactor.one,
wgpu.BlendFactor.zero,
wgpu.BlendOperation.add,
),
"write_mask": wgpu.ColorWrite.ALL,
}
],
depth_stencil_state=depth_stencil_state,
vertex_state={
"index_format": wgpu.IndexFormat.uint32,
"vertex_buffers": vbo_views,
},
layout=pipeline_layout,
vertex_stage={"module": vshader, "entry_point": "main"},
fragment_stage={"module": fshader, "entry_point": "main"},
primitive_topology=wgpu.PrimitiveTopology.triangle_list,
rasterization_state={
"front_face": wgpu.FrontFace.ccw,
"cull_mode": wgpu.CullMode.none,
"depth_bias": 0,
"depth_bias_slope_scale": 0.0,
"depth_bias_clamp": 0.0,
},
color_states=[
{
"format": wgpu.TextureFormat.bgra8unorm_srgb,
"alpha_blend": (
wgpu.BlendFactor.one,
wgpu.BlendFactor.zero,
wgpu.BlendOperation.add,
),
"color_blend": (
wgpu.BlendFactor.one,
wgpu.BlendFactor.zero,
wgpu.BlendOperation.add,
),
}
],
vertex_state={"index_format": wgpu.IndexFormat.uint32, "vertex_buffers": []},
sample_count=1,
sample_mask=0xFFFFFFFF,
alpha_to_coverage_enabled=False,
)
"front_face": wgpu.FrontFace.ccw,
"cull_mode": wgpu.CullMode.none,
"depth_bias": 0,
"depth_bias_slope_scale": 0.0,
"depth_bias_clamp": 0.0,
},
color_states=[
{
"format": wgpu.TextureFormat.bgra8unorm_srgb,
"alpha_blend": (
wgpu.BlendFactor.one,
wgpu.BlendFactor.zero,
wgpu.BlendOperation.add,
),
"color_blend": (
wgpu.BlendFactor.one,
wgpu.BlendFactor.zero,
wgpu.BlendOperation.add,
),
}
],
vertex_state={"index_format": wgpu.IndexFormat.uint32, "vertex_buffers": []},
sample_count=1,
sample_mask=0xFFFFFFFF,
alpha_to_coverage_enabled=False,
)
swap_chain = device.configure_swap_chain(
canvas,
device.get_swap_chain_preferred_format(canvas),
wgpu.TextureUsage.OUTPUT_ATTACHMENT,
)
"cull_mode": wgpu.CullMode.none,
"depth_bias": 0,
"depth_bias_slope_scale": 0.0,
"depth_bias_clamp": 0.0,
},
color_states=[
{
"format": wgpu.TextureFormat.bgra8unorm_srgb,
"alpha_blend": (
wgpu.BlendFactor.one,
wgpu.BlendFactor.zero,
wgpu.BlendOperation.add,
),
"color_blend": (
wgpu.BlendFactor.one,
wgpu.BlendFactor.zero,
wgpu.BlendOperation.add,
),
}
],
vertex_state={"index_format": wgpu.IndexFormat.uint32, "vertex_buffers": []},
sample_count=1,
sample_mask=0xFFFFFFFF,
alpha_to_coverage_enabled=False,
)
swap_chain = device.configure_swap_chain(
canvas,
device.get_swap_chain_preferred_format(canvas),
wgpu.TextureUsage.OUTPUT_ATTACHMENT,
)
vertex_stage={"module": vshader, "entry_point": "main"},
fragment_stage={"module": fshader, "entry_point": "main"},
primitive_topology=wgpu.PrimitiveTopology.triangle_list,
rasterization_state={
"front_face": wgpu.FrontFace.ccw,
"cull_mode": wgpu.CullMode.none,
"depth_bias": 0,
"depth_bias_slope_scale": 0.0,
"depth_bias_clamp": 0.0,
},
color_states=[
{
"format": wgpu.TextureFormat.bgra8unorm_srgb,
"alpha_blend": (
wgpu.BlendFactor.one,
wgpu.BlendFactor.zero,
wgpu.BlendOperation.add,
),
"color_blend": (
wgpu.BlendFactor.one,
wgpu.BlendFactor.zero,
wgpu.BlendOperation.add,
),
}
],
vertex_state={"index_format": wgpu.IndexFormat.uint32, "vertex_buffers": []},
sample_count=1,
sample_mask=0xFFFFFFFF,
alpha_to_coverage_enabled=False,
)
swap_chain = device.configure_swap_chain(
layout=pipeline_layout,
vertex_stage={"module": vshader, "entry_point": "main"},
fragment_stage={"module": fshader, "entry_point": "main"},
primitive_topology=wgpu.PrimitiveTopology.triangle_list,
rasterization_state={
"front_face": wgpu.FrontFace.ccw,
"cull_mode": wgpu.CullMode.back,
"depth_bias": 0,
"depth_bias_slope_scale": 0.0,
"depth_bias_clamp": 0.0,
},
color_states=[
{
"format": wgpu.TextureFormat.bgra8unorm_srgb,
"alpha_blend": (
wgpu.BlendFactor.one,
wgpu.BlendFactor.zero,
wgpu.BlendOperation.add,
),
"color_blend": (
wgpu.BlendFactor.one,
wgpu.BlendFactor.zero,
wgpu.BlendOperation.add,
),
}
],
vertex_state={
"index_format": wgpu.IndexFormat.uint32,
"vertex_buffers": [
{
"array_stride": 4 * 6,
"step_mode": wgpu.InputStepMode.vertex,
vertex_stage={"module": vshader, "entry_point": "main"},
fragment_stage={"module": fshader, "entry_point": "main"},
primitive_topology=wgpu.PrimitiveTopology.triangle_list,
rasterization_state={
"front_face": wgpu.FrontFace.ccw,
"cull_mode": wgpu.CullMode.back,
"depth_bias": 0,
"depth_bias_slope_scale": 0.0,
"depth_bias_clamp": 0.0,
},
color_states=[
{
"format": wgpu.TextureFormat.bgra8unorm_srgb,
"alpha_blend": (
wgpu.BlendFactor.one,
wgpu.BlendFactor.zero,
wgpu.BlendOperation.add,
),
"color_blend": (
wgpu.BlendFactor.one,
wgpu.BlendFactor.zero,
wgpu.BlendOperation.add,
),
}
],
vertex_state={
"index_format": wgpu.IndexFormat.uint32,
"vertex_buffers": [
{
"array_stride": 4 * 6,
"step_mode": wgpu.InputStepMode.vertex,
"attributes": [