Skip to content

Commit

Permalink
fix d3d11 samples
Browse files Browse the repository at this point in the history
  • Loading branch information
floooh committed Oct 30, 2024
1 parent b756f03 commit fbfa2d3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion d3d11/blend-d3d11.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _
" float c = xy.x * xy.y;\n"
" return float4(c, c, c, 1.0);\n"
"};\n",
.vertex_attrs[0].hlsl_sem_name = "POS",
.attrs[0].hlsl_sem_name = "POS",
.uniform_blocks[0] = {
.stage = SG_SHADERSTAGE_FRAGMENT,
.size = sizeof(fs_params_t),
Expand Down
6 changes: 3 additions & 3 deletions d3d11/imgui-d3d11.cc
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _
"float4 main(float2 uv: TEXCOORD0, float4 color: COLOR0): SV_Target0 {\n"
" return tex.Sample(smp, uv) * color;\n"
"}\n";
shd_desc.vertex_attrs[0].hlsl_sem_name = "POSITION";
shd_desc.vertex_attrs[1].hlsl_sem_name = "TEXCOORD";
shd_desc.vertex_attrs[2].hlsl_sem_name = "COLOR";
shd_desc.attrs[0].hlsl_sem_name = "POSITION";
shd_desc.attrs[1].hlsl_sem_name = "TEXCOORD";
shd_desc.attrs[2].hlsl_sem_name = "COLOR";
shd_desc.uniform_blocks[0].stage = SG_SHADERSTAGE_VERTEX;
shd_desc.uniform_blocks[0].size = sizeof(vs_params_t);
shd_desc.uniform_blocks[0].hlsl_register_b_n = 0;
Expand Down
4 changes: 2 additions & 2 deletions d3d11/mrt-d3d11.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _
" float4 c = float4(c0 + c1 + c2, 1.0);\n"
" return c;\n"
"}\n",
.vertex_attrs[0].hlsl_sem_name = "POSITION",
.attrs[0].hlsl_sem_name = "POSITION",
.uniform_blocks[0] = {
.stage = SG_SHADERSTAGE_VERTEX,
.size = sizeof(params_t),
Expand Down Expand Up @@ -331,7 +331,7 @@ int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _
"float4 main(float2 uv: TEXCOORD0): SV_Target0 {\n"
" return float4(tex.Sample(smp, uv).xyz, 1.0);\n"
"}\n",
.vertex_attrs[0].hlsl_sem_name = "POSITION",
.attrs[0].hlsl_sem_name = "POSITION",
.images[0] = { .stage = SG_SHADERSTAGE_FRAGMENT, .hlsl_register_t_n = 0 },
.samplers[0] = { .stage = SG_SHADERSTAGE_FRAGMENT, .hlsl_register_s_n = 0 },
.image_sampler_pairs[0] = { .stage = SG_SHADERSTAGE_FRAGMENT, .image_slot = 0, .sampler_slot = 0 },
Expand Down

0 comments on commit fbfa2d3

Please sign in to comment.