In the D3D12Multithreading example, shadow map sampler shouldn't be using D3D11_TEXTURE_ADDRESS_CLAMP mode.
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- computer-graphics
Research direction
Open the D3D12Multithreading example and locate the shadow-map sampler descriptor shown in the issue. Change its U, V, and W address modes to BORDER while retaining the specified border color, then build or run the example to verify the sampler behavior.
Written by the indexing model from the issue text.
Description
Any objects outside the frustrum of light camera should be in shadow, and D3D12_TEXTURE_ADDRESS_MODE_BORDER should be used here otherwise its no use setting BorderColor for D3D11_TEXTURE_ADDRESS_CLAMP.
Original code:
D3D12_SAMPLER_DESC clampSamplerDesc = {};
clampSamplerDesc.Filter = D3D12_FILTER_MIN_MAG_MIP_POINT;
clampSamplerDesc.AddressU = D3D12_TEXTURE_ADDRESS_MODE_CLAMP;
clampSamplerDesc.AddressV = D3D12_TEXTURE_ADDRESS_MODE_CLAMP;
clampSamplerDesc.AddressW = D3D12_TEXTURE_ADDRESS_MODE_CLAMP;
clampSamplerDesc.MipLODBias = 0.0f;
clampSamplerDesc.MaxAnisotropy = 1;
clampSamplerDesc.ComparisonFunc = D3D12_COMPARISON_FUNC_ALWAYS;
clampSamplerDesc.BorderColor[0] = clampSamplerDesc.BorderColor[1] = clampSamplerDesc.BorderColor[2] = clampSamplerDesc.BorderColor[3] = 0;
clampSamplerDesc.MinLOD = 0;
clampSamplerDesc.MaxLOD = D3D12_FLOAT32_MAX;
m_device->CreateSampler(&clampSamplerDesc, samplerHandle);
Should be modified to:
D3D12_SAMPLER_DESC clampSamplerDesc = {};
clampSamplerDesc.Filter = D3D12_FILTER_MIN_MAG_MIP_POINT;
clampSamplerDesc.AddressU = D3D12_TEXTURE_ADDRESS_MODE_BORDER;
clampSamplerDesc.AddressV = D3D12_TEXTURE_ADDRESS_MODE_BORDER;
clampSamplerDesc.AddressW = D3D12_TEXTURE_ADDRESS_MODE_BORDER;
clampSamplerDesc.MipLODBias = 0.0f;
clampSamplerDesc.MaxAnisotropy = 1;
clampSamplerDesc.ComparisonFunc = D3D12_COMPARISON_FUNC_ALWAYS;
clampSamplerDesc.BorderColor[0] = clampSamplerDesc.BorderColor[1] = clampSamplerDesc.BorderColor[2] = clampSamplerDesc.BorderColor[3] = 0;
clampSamplerDesc.MinLOD = 0;
clampSamplerDesc.MaxLOD = D3D12_FLOAT32_MAX;
m_device->CreateSampler(&clampSamplerDesc, samplerHandle);
- Dominant language
- C++
- Stars
- 6.8k
- Forks
- 2.2k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/DirectX-Graphics-Samples
-
miniengine
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
bug samples
Difficulty 2/5 1-3 hours Newbie friendliness 60/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
All issues in microsoft/DirectX-Graphics-Samples
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100