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
56
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 ...
1
vote
1
answer
64
views
D3D11 batching with texture arrays
When employing texture arrays how does typically communicate the associated indices when rendering to batch as much work as possible per draw? The only approaches I can think of are:
Supply texture ...
0
votes
1
answer
219
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
1
answer
113
views
What is the proper way to write a pixel shader that only outputs depth?
I have an effect that I want to only write to depth.
commandList->OMSetRenderTargets(0, nullptr, FALSE, &m_mainDepthStencilDescriptorHandle.getCpuHandle());
...
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 &...
1
vote
0
answers
46
views
Horizontal Lines artifacts on Direct3D 9 Render
I'm encountering an issue in my Direct3D 9 application where horizontal lines appear at fixed 16-pixel intervals on a render target surface. Here's the setup:
Environment: Direct3D 9, Windows, ...
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
0
answers
60
views
How to build directional light view / proj matrices in DirectX11?
I think I built my matrices wrong:
...
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 ...
0
votes
0
answers
97
views
How to add an HTML + CSS overlay to a DirectX app?
I'm looking for a way to render html and css elements within an executable as an overlay.
There are programs today made in electron such as Blitz or even the best known Discord. They do overlay within ...
1
vote
0
answers
41
views
1
vote
0
answers
55
views
DirectX/SlimDX Alpha Blending
Hoping someone might be able to offer some advice for an issue i am having.
I am working on abit of a project, mainly for learning, which is loading and rendering graphics from an old mmorpg i used to ...
1
vote
0
answers
80
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
2
answers
620
views
How do you handle shaders/graphics while remaining cross-platform?
I'm building a C++ based game engine, and I have my ECS complete as well as some basic components for stuff like graphics & audio. However, I'm currently using a custom interface on top of SFML ...
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 ...
1
vote
0
answers
32
views
DirectX 9 specular component of vert and alpha channel
Suppose I locked DX9 mesh vertex buffer, and took one vertex:
...
2
votes
2
answers
661
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 ...
2
votes
1
answer
166
views
How should I bind various types of material data to the ray tracing rendering pipeline in DirectX12?
My problem is a bit complicated. When doing ray tracing rendering, all data in the scene needs to be prepared. In addition to texture resources, each object to be rendered will also have its own ...
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 ...
1
vote
1
answer
379
views
How does planar shadow projection interact with perspective projection?
This question is about planar shadows as explained in Frank Luna's DX11 book. The author presents the 4x4 shadow matrix, whose bottom right element is n\$\cdot\$L (where n is the plane's normal and L ...
2
votes
1
answer
474
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 ...
0
votes
1
answer
86
views
why One big texture frames is consuming more RAM compared to be divided into single frame ones [closed]
I noticed that composing frames in a big texture will consume more RAM rather than having 1 frame per texture (or sprite if you would like).
The renderer is SDL2 backed by Direct3D.
Is there any ...
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
84
views
Blending in 3D graphics
I studying DirectX blending. Please explain what is Src and Dest. For example I have drawn scene - it's Src as I suppose. And on this scene I now puting box - it's Dest in blending, as I guess. And I ...
0
votes
1
answer
153
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 ...
0
votes
1
answer
163
views
DirectX 9 D3DFVF_XYZRHW and texturing
This code is DirectX 9, software rendering. I have next piece of code to simple draw textured cube (see below). Cube geometry draws correctly, but texturing is affine - with distortions (my cube is ...
-1
votes
2
answers
243
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 ...
1
vote
1
answer
1k
views
Difference between Command Lists and Deferred context
I'm new to DirectX and I feel like I killed Google search but still cannot find information about the difference between these:
Immediate context + Command Lists
Immediate context + Deferred context (...
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
394
views
D3D11 ERROR ("invalid arguments") from HLSL shader
I am using MonoGame 3.8.1.303 with Windows/DirectX.
I am just rendering a TriangleList using DrawIndexedPrimitives, but I am ...
1
vote
1
answer
325
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
1
answer
1k
views
Calculate the Right and Up vectors using yaw and pitch in right-handed coordinates
I have an assignment where they ask me to calculate Vector Right and Vector Up, it's for a camera creation using C++ and DirectX. For the Vector Right, they specify I should use 90-yaw, so I got:
\$ ...
0
votes
0
answers
614
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
1
answer
183
views
Texture does not draw with ATI Radeon RX, but does with NVIDIA/no GPU
I am getting a problem when trying to draw a texture on the following hardware (configuration 1):
ATi Radeon RX 6600 XT
Screen (OS Windows 11):
I have other hardware (configuration 2):
nVidia Geforce ...
0
votes
2
answers
1k
views
0
votes
1
answer
135
views
I cannot understand this change of basis problem
I know we need to get the inverse of transformation matrix first to get the coordinate relative to other frames. Explanation is in this video.
I am reading directx11 book. And the following ones are ...
0
votes
1
answer
498
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 ...
0
votes
1
answer
823
views
Can I purchase Xbox One XDK in 2022?
My gf has an Xbox One, and I wanted to surprise her with a custom Xbox One game.
Are XDKs still being retailed?
How much do you estimate the cost?
How old do you have to be to purchase one?
I'd ...
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
167
views
Remaining artifacts in SSR methods
I a previous post (Scaling and offset problems with screen space reflexion in DX11) I was fnally able to produce SSR with several methods (ray marching/McGuire/Mirror like). These techniques have all ...
0
votes
1
answer
569
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
732
views
D3D11 CreateInputLayout error: CREATEINPUTLAYOUT_UNPARSEABLEINPUTSIGNATURE
I created a simple shader, and it compiled, but when using the vs as input layout, it failed with CREATEINPUTLAYOUT_UNPARSEABLEINPUTSIGNATURE. I don't know why.
...
0
votes
1
answer
307
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
759
views
where is D3D11.h/lib for direcxt11.3
I'm starting to see how to do multiview rendering from different view in one pass. This needs D3D11_FEATURE_DATA_D3D11_OPTIONS3 to be checked but the D11 sdk 11_0 don't know this flag and after a web ...
0
votes
1
answer
442
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 ...
0
votes
1
answer
126
views
Wrong uv parsed from obj
I have written an obj parsing function and the result of his parsing can be drawn correctly. But if the uv is not generated by default by the modelling software, he will have problems with the uv. I ...
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 ...
2
votes
2
answers
1k
views
D3D11 wrong full screen resolution
I am currently writing a Directx 11 engine and have problems with the resolution when switching to exclusive fullscreen on my 1440p monitor. If i call SetFullscreenState(TRUE, NULL), the screen ...
0
votes
1
answer
182
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 ...
0
votes
0
answers
70
views
shader can't read data except position, texcoord, normal
i want to read bone's weight but shader can't read data
this is my vertex type
...