Skip to content

Commit eee6de5

Browse files
authored
Update Colorful.md
1 parent 50a620f commit eee6de5

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

Examples/Colorful/Colorful.md

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ float4 Pixel(Varying input) : SV_Target
2121

2222
## 2 LoadResources
2323
```cs
24-
// Convert semantic names to integer ids for easy comparison
25-
var SlotId_Position = Graphics.GetSlotId("Position");
26-
var SlotId_Color = Graphics.GetSlotId("Color");
27-
var SlotId_Uv = Graphics.GetSlotId("Uv");
28-
2924
var modules = await LoadShaderModules("Shader", [ShaderStage.Vertex, ShaderStage.Pixel]);
3025

3126
// Defines the shader layout.
@@ -45,27 +40,11 @@ Layout = Device.CreateShaderLayout(
4540
);
4641

4742
Shader = Device.CreateShader(modules, Layout);
43+
Pipeline = Device.CreateGraphicsShaderPipeline(... Omitted here);
4844

4945
// Shader Binding instance, maybe it's similar to webgpu's bindgroup, but allows dynamic changes
5046
ShaderBinding = Device.CreateShaderBinding(Layout, Name: Name);
5147

52-
Pipeline = Device.CreateGraphicsShaderPipeline(
53-
Shader, new()
54-
{
55-
DsvFormat = GraphicsFormat.Unknown,
56-
BlendState =
57-
{
58-
Rt0 =
59-
{
60-
Src = BlendType.SrcAlpha,
61-
Dst = BlendType.InvSrcAlpha,
62-
Op = BlendOp.Add,
63-
}
64-
},
65-
Topology = PrimitiveTopologyType.TriangleStrip,
66-
}, Name: Name
67-
);
68-
6948
// Create argument buffer
7049
ArgBuffer = Device.CreateBuffer(
7150
new()

0 commit comments

Comments
 (0)