Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
21 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 ...
user179368's user avatar
1 vote
2 answers
103 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 ...
Spencer Rosas-Gunn's user avatar
1 vote
0 answers
51 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 ...
mueoc mueoc's user avatar
1 vote
0 answers
20 views

DirectX 9 specular component of vert and alpha channel

Suppose I locked DX9 mesh vertex buffer, and took one vertex: ...
black4's user avatar
  • 205
1 vote
2 answers
163 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 ...
Auxy's user avatar
  • 13
2 votes
1 answer
90 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 ...
AshenvaleZX's user avatar
1 vote
0 answers
28 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 ...
ThisAccountIsForGameDev's user avatar
1 vote
1 answer
278 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 ...
Daniel's user avatar
  • 131
2 votes
1 answer
143 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 ...
marked-off-topic's user avatar
0 votes
1 answer
57 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 ...
Raffaello's user avatar
  • 125
1 vote
0 answers
72 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 ...
Andrey Klimenko's user avatar
0 votes
1 answer
47 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 ...
black4's user avatar
  • 205
0 votes
1 answer
82 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 ...
Charlie.Q's user avatar
0 votes
1 answer
80 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 ...
black4's user avatar
  • 205
-1 votes
2 answers
157 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 ...
Preciado's user avatar
1 vote
1 answer
480 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 (...
Sergey Sharpov's user avatar
0 votes
1 answer
283 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 ...
coulomb's user avatar
  • 150
1 vote
1 answer
218 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 ...
codymanix's user avatar
  • 364
1 vote
1 answer
164 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, ...
user722227's user avatar
0 votes
1 answer
708 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: \$ ...
Nicoalejo's user avatar
0 votes
0 answers
379 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-...
Peter's user avatar
  • 1
0 votes
1 answer
133 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 ...
Range's user avatar
  • 159
0 votes
2 answers
643 views

DirectX11 creating input layout throws error on input signature not matching shader (instancing)

The input layout ...
koreus737's user avatar
  • 131
0 votes
1 answer
93 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 ...
yldbear77's user avatar
0 votes
1 answer
298 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 ...
thalm's user avatar
  • 227
0 votes
1 answer
420 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 ...
Landen Ty's user avatar
1 vote
1 answer
750 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 ...
Gijahara's user avatar
0 votes
1 answer
85 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 ...
philB's user avatar
  • 139
0 votes
1 answer
283 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 ...
krz's user avatar
  • 1
0 votes
1 answer
459 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. ...
Xinggang Li's user avatar
0 votes
1 answer
186 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 ...
r m's user avatar
  • 11
0 votes
1 answer
390 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 ...
philB's user avatar
  • 139
0 votes
1 answer
316 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 ...
T. Elliott's user avatar
0 votes
1 answer
85 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 ...
BoomBac's user avatar
1 vote
1 answer
67 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 ...
terry's user avatar
  • 11
1 vote
2 answers
968 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 ...
Kyto's user avatar
  • 31
0 votes
1 answer
127 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 ...
Rafael Ferreira's user avatar
0 votes
0 answers
44 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 ...
문형준's user avatar
0 votes
0 answers
43 views

Why my output image is not seamless?

I offset a region of an image but when I tried to restore it using same method it doesn't look right. here is my input and output: And this is the code I used to restore : ...
Mary Jane's user avatar
0 votes
1 answer
93 views

Relocate texture regions with pixel shader

I'm new to DirectX and pixel shader development. I want to know how to relocate region of input image in post processing. What I want to achieve is to divide my image into 4 pieces and then relocate ...
Mary Jane's user avatar
5 votes
1 answer
1k views

How is this lantern glow effect achieved?

I was wondering if anyone knows how this lighting effect is achieved. It's clearly not a bloom shader. My best guess right now is that it's a billboarded transparent sprite, which is animated to give ...
Krythic's user avatar
  • 790
0 votes
1 answer
1k views

How to create a texture SRV with different sRGB format from a render target in DX11?

Is it possible to bind a texture with a different format as render target and as shader resource view? Specifically with a different _SRGB suffix. My goal is to render a shader into an R8G8B8A8_UNORM ...
thalm's user avatar
  • 227
0 votes
1 answer
409 views

Compile shader and root signature of a ray tracing shader into a single binary using DXC

I'm new to DXR, so please If I got it right, when we want to compile a ray tracing shader using the DirectX Shader Compiler, we need to specify lib_6_* as the ...
0xbadf00d's user avatar
0 votes
1 answer
1k views

Specifying a root signature in the HLSL code of a DXR shader

I've noticed that I cannot specify a root signature in the HLSL code of a DXR shader. For example, if I got a ray generation shader with the following declaration ...
0xbadf00d's user avatar
1 vote
0 answers
77 views

Blue color instead of alpha using Alpha Blending

I am testing rendering with alpha blending state according to this guide. The aim is to add snow on terrain grass texture. Finally, I got the wrong result -- the blue color fillings up all alpha = 0 ...
Dmitry Kozlov's user avatar
1 vote
1 answer
743 views

Apply multiple Shaders to one texture with DirectX

I'm beginning with DirectX development and I'm quite confused by the documentation about how to do the following: I have 1 image (Texture2D), I'd like to apply 2 independent HLSL, one after the other, ...
Veler's user avatar
  • 11
0 votes
1 answer
78 views

Correct way to set up camera buffer [DirectX]

I would like to play with two different implementation of particle system in my project (ok, actually not mine, but I am working on it). I copied the particle system successfully, however, faced the ...
Dmitry Kozlov's user avatar
2 votes
0 answers
120 views

How to get struct layouts from vertex shader input using ID3D12Reflection

I am attempting to write a code generator that builds C++ structs/classes from D3D12 reflection data built using DXC. Given a simple vertex shader signature: ...
MSinger's user avatar
  • 21
0 votes
1 answer
152 views

How does the InsideTessFactor affect points of a triangle in a DirectX11 domain shader?

I found this example in this Chinese language document. In the image above, I can understand the value of SV_TessFactor because for every side of this triangle, ...
Mark Peter's user avatar
0 votes
1 answer
284 views

DX12 - how to update part of a buffer?

I'm just getting started in DX12 after a bit of time in Vulkan, I am trying to update a part of a dynamically indexed buffer I'm using to hold mesh transforms. I'm using the MSFT MiniEngine examples ...
mike's user avatar
  • 103

1
2 3 4 5
22