Questions tagged [directx]
DirectX is a set of multimedia APIs from Microsoft aimed primarily at game developers. Popular APIs within the DirectX collection include Direct3D, XInput, and XAudio.
1,075 questions
1
vote
1
answer
54
views
D3D11 type conversion rules
My understanding is that, in general, we can supply data to the GPU in some format (in D3D, as defined by DXGI_FORMAT_xxx) and it will be implicitly converted to ...
0
votes
1
answer
212
views
Decompiling a DXBC - why is an integer operation working with a massive float?
I'm decompiling a game's shaders with RenderDoc in an effort to understand them, and I encountered this segment:
...
0
votes
0
answers
49
views
How to rotate the "top" sky texture with Directx9?
I'm working on designing and animating the sky with a cubemap. The surfaces except for the "TOP" move in a way that follows each other. However, I could never figure out how to adapt the &...
0
votes
1
answer
82
views
Generate Frustum from Clip Rectangle after Projection
I have an arbitrary Clip Rectangle, ranging from -1 to 1 which was obtained by min/maxing vertices after projection.
I want to cull triangles in a compute shader against this particular rectangle.
...
0
votes
1
answer
120
views
Issues rendering a cube in Direct3D11
I started studying DirectX recently and I'm developing an "game engine". For now I just want to draw a cube, but for some reason that I don't know why, it doesn't draw it at all. It's ...
1
vote
0
answers
41
views
1
vote
0
answers
79
views
Incorrect Screen Space Reflection help
I'm leaving a question because I ran into a problem while implementing screen space reflection.
The way I do it is by sampling the position and normal map saved with deferred rendering, changing it to ...
1
vote
0
answers
63
views
I can't create a cube with mine vertaxes
i need some help with mine vertexes. when i long story short when i implemented mine class for projection matrix. i got a shape that is not cube that i had. I have googled little bit and i find it out ...
2
votes
2
answers
649
views
Why do a lot of games use DirectX9
A lot of older games use DirectX9 which makes sense, however several modern games such as Sonic Mania, Terraria and Undertale all use DirectX9. Is there some benefit to using an older version of the ...
1
vote
0
answers
41
views
Some of the assignment operations in the directx11 compute shader are getting skipped, even though the assigned values are used later
I'm implementing an algorithm called Fast3x3 SVD on my compute shader. However, while I was debugging my compute shader in RenderDoc, I noticed some assignment operators were completely getting ...
2
votes
1
answer
465
views
How to deal with different version of Direct3D12 interfaces?
Let's say I want to enable debug layers for a Direct3D 12 renderer, for which I need to create a ID3D12Debug object. Problem is, there are 6 different version of ...
1
vote
0
answers
113
views
How to transform correctly shadow cascades?
I think I got the main idea of shadow cascades but I have misunderstanding of transforming shadow cascades using matrices for getting correct a result. I understand it this so
Define shadow cascade ...
0
votes
1
answer
152
views
Screen position in Deferred Shading
I am trying to implement a program in Direct3D 11 which uses techniques like deferred shading and shadowmapping, but when I create my gBuffers, the position looks strange. After researching a bit I ...
-1
votes
2
answers
238
views
Can I use DirectXTK12 commercially?
This question is about the licensing of DirectXTK.
Is DirectXTK12 free for commercial use? I ask because I use it in my project, and I may want to go commercial in the future. If it is not, I'll ...
0
votes
1
answer
501
views
"An ID3D12Resource object is referenced by GPU operations in-flight on Command Queue": When Should I Create my Buffers?
When trying to re-create my vertex buffers, my app crashes and I get this error:
D3D12 ERROR: ID3D12Resource2::: CORRUPTION: An ID3D12Resource object (0x000001DDEBA98FC0:'Vertex Buffer Default ...
1
vote
1
answer
323
views
Creating RTV for each array slice of a Texture2DArray
I'm trying to implement depth peeling onto a 2D texture array, where each array slice corresponds to a depth layer. In order to do this, I'd like to draw to subsequent array slices of this texture, ...
0
votes
0
answers
611
views
Message pump and D3D11 DXGI in separate threads
I have read:
https://learn.microsoft.com/en-us/windows/win32/direct3darticles/dxgi-best-practices#multithreading-and-dxgi
https://learn.microsoft.com/en-us/windows/win32/direct3ddxgi/d3d10-graphics-...
0
votes
2
answers
1k
views
0
votes
1
answer
496
views
Is there any performance difference between Draw() and DrawInstanced(1)?
The background of the question is, does it make sense to introduce an if case when drawing a mesh for whether there is instancing or not?
This is using DirectX 11 ...
1
vote
1
answer
1k
views
Would you ever need multiple D3D11 devices?
I'm programming a rendering engine, and I'm considering whether on not I would need to implement the availability to call D3D11CreateDevice() multiple times to get ...
0
votes
1
answer
567
views
What would be a correct ID3D11Query design for occlusion testing?
I've tried looking for tutorials or samples related to the topic - but all that I could find are either scientific papers or vague posts on forums.
As I understand it - I need to dedicate a whole pass ...
0
votes
1
answer
306
views
contentexporter FBX->SDKMESH warning and bad output
I am using the directxtk contentexporter to convert a a fbx file with animation to sdkmesh. The fbx file is exported from blender, it includes an animation using model bones. After exporting to fbx, I ...
0
votes
1
answer
439
views
Cascaded Shadow Maps - Handling shadows that cast into different cascades
For example I have 3 shadow cascades. A shadow is cast by a hill in my 2nd cascade, but the shadow itself is cast into not only the 2nd cascade but also the 1st. In the shader program, in order to ...
1
vote
1
answer
96
views
Physics and unit size to feet
I'm dropping a object 1353 feet from a building. I can get the time(t) it lands with manipulating the total displacement of a object(/\x).
Gravity is 32 feet/s^2
While doing physics, kinematics or ...
0
votes
1
answer
179
views
What is wrong with my terrain lighting?
I've just implemented a simple algorithm to calculate terrain vertex normals and I'm using diffuse and ambient light currently, but for some reason the squares that make up my terrain are visible when ...