407 questions
0
votes
0
answers
18
views
How to handle negative texture coordinates in a CPU raytracer
Years ago I implemented a CPU raytracing software and things work properly. I then implemented a DirectX 12 viewer. I just found out there is some discrepancies between my 2 implementations when i t ...
2
votes
1
answer
39
views
Can RootConstants defined in HLSL have their visbility limited to more than 1 shader type but not all?
I want to define a root signature like the following
[RootSignature("
RootFlags( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT | DENY_HULL_SHADER_ROOT_ACCESS | DENY_DOMAIN_SHADER_ROOT_ACCESS ),
...
1
vote
1
answer
115
views
DirectX Agility SDK, guid symbols
I am using the DirectX Agility SDK to ship D3D12Core.dll and d3d12SDKLayers.dll along my exe.
Currently I use the Windows SDK, C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\dxguid.lib ...
-2
votes
1
answer
210
views
DirectX debug layer dll version mismatch
I was learning directx by https://github.com/d3dcoder/d3d12book, and at one point, it suddenly started not working in Debug mode like this.
So I asked github copilot and he said that the problem was ...
1
vote
0
answers
96
views
How to force allocated D3D12 resource to reside in VRAM and not be demoted to shared RAM?
For testing purposes I need a tool that will occupy some amount of VRAM, leaving a reduced available VRAM to the rest of the applications. I implemented a version that somewhat works using D3D12 API, ...
1
vote
0
answers
82
views
IDXGISwapChain::Present disables other drawing methods
When I use IDXGISwapChain::Present it places the rendered frame on the window surface.
But when I stop using this method and destroy the IDXGISwapChain instance the last frame still remains on the ...
1
vote
0
answers
131
views
Problem with root constants. Why is only "scale" set correctly?
I'm currently learning directx 12 and I have an issue with Root constants.
I'm trying to render mesh with custom color and scale and offset variables.
I declare these variables in hlsl shaders below:
/...
1
vote
0
answers
73
views
Circular artifacts when performing deferred shading
I finally managed to add realistic realtime rendering to my software. Now I am facing some "banding" artifacts when performing the actual shading. The test scene is straightforward. It ...
2
votes
0
answers
151
views
Why does my shadow mapping implementation gives wrong results?
I am adding shadow mapping to my renderer.
Algorithm overview:
Render shadow map(one directional light for now) --> DXGI_FORMAT_D32_FLOAT depth buffer
Render gbuffer
Bind (1) as an ...
2
votes
0
answers
128
views
SetGraphicsRootConstantBufferView: Pointer 190513344 is incorrectly aligned. How to fix that error?
The code:
void RenderShadowMaps::Render(D3D12_GPU_VIRTUAL_ADDRESS lightGPUVirtualAdress, ID3D12GraphicsCommandList* commandList)
{
commandList->SetGraphicsRootSignature(m_rootSignature);
...
1
vote
0
answers
117
views
D3D12 multiple textures
I'm having some trouble figuring out how to bind multiple textures to my shader in D3D12. I have a pixel shader which uses two textures:
Texture2D < uint > u_texture : register(t0);
Texture2D ...
2
votes
1
answer
200
views
How to draw a sphere in DirectX 12?
I want to draw spheres in my DirectX 12 application. I only support vertex and pixel shaders for now.
The idea is to generate a vertex and an index buffer to draw the sphere.
The sphere will have the ...
1
vote
0
answers
111
views
Microsoft.Direct3D.D3D12 and "MakeAppx.exe pack"
I develop an DirectX12 application. When I create a MSIX package with the nuget Microsoft.Direct3D.D3D12, MakeAppx.exe pack exists with an error 0x8007007b.
Publishing package without this nuget works ...
3
votes
0
answers
147
views
Using multiple direct-queues for gpu-side multi-threading in Direct3D 12
I know that we can populate multiple command lists with multiple threads, and after finish recording them we are sending those command list in a single queue, and gpu will execute them in the order of ...
3
votes
0
answers
123
views
How to create a minimal shadow map that covers the view frustum
I intend to implement a shadow map that fits the view frustum as follows.
My method is as follows:
Compute the coordinates of the view frustum in camera space.
Transform them into world space.
...