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
1 answer
34 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 ...
user avatar
  • 185
0 votes
1 answer
86 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 ...
user avatar
0 votes
0 answers
33 views

d3d Convert 1 descriptor table (2 cbvs) to 2 descriptor table (each one cbv) get screen flicker

I am learning d3d develpoment recently. For the triangle example, I add code about model, view matrix setting. Here I set model, view seperate. There are 3 methods to do this. root constants root ...
user avatar
0 votes
1 answer
90 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 ...
user avatar
0 votes
1 answer
32 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 ...
user avatar
  • 47
0 votes
1 answer
47 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 ...
user avatar
  • 1
0 votes
0 answers
28 views

How to cut a texture created with DirectX9?

I created two textures in DirectX9 with CreateTexture method (one little HQ and one big LQ), and for some reason my shadow textures are blending. Is there any way to stop that blending ? I want my ...
user avatar
0 votes
0 answers
22 views

DirectX 8 Win32 GUI Not Appearing/Flickering While Running

I am programming a game with DirectX 8, and I am trying to use the GUI options that are provided by the Win32 window that I am using. However, when I try to render a button or, in this case, a textbox ...
user avatar
0 votes
1 answer
53 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. ...
user avatar
0 votes
0 answers
35 views

How do I create a texture from a surface in DirectX 8?

I am making a game in DirectX 8 for a retrocomputing game contest. I am creating a Real Time Strategy game, and I am trying to make a minimap, which is merely an orthographic view of the terrain. When ...
user avatar
0 votes
0 answers
19 views

Problem of lights in mirrored scene

I've achieved foward or deferred rendering of mirrored scene but I have a small trouble with the ambient directional lighting (both forward and deferred). I'm using a worldobjectmatrix * ...
user avatar
  • 47
0 votes
1 answer
41 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 ...
user avatar
  • 11
0 votes
0 answers
33 views

How do I get Win32 GUI to render while rendering with DirectX?

I am trying to make a Map Editor for my RTS game in DirectX 8. Everything worked properly until I started drawing with DirectX, and now, everything is drawn after the main scene, preventing the ...
user avatar
0 votes
0 answers
19 views

Trouble calculating position from depth buffer

Position can be reconstructed from depth but I did not succeed in achieving the correct calculation. I've found these two pieces of code for view/world pos, but can't make it work. For getting view ...
user avatar
  • 47
0 votes
1 answer
38 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 ...
user avatar
  • 47
0 votes
0 answers
118 views

Is there any debugging facility for DXR ray tracing shaders available?

Quick question: Is there currently any debugging facility for DXR ray tracing shaders available? Neither PIX, nor RenderDoc do currently support debugging of such shaders ...
user avatar
0 votes
1 answer
55 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 ...
user avatar
0 votes
1 answer
27 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 ...
user avatar
1 vote
1 answer
53 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 ...
user avatar
  • 11
1 vote
2 answers
211 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 ...
user avatar
  • 21
0 votes
1 answer
65 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 ...
user avatar
0 votes
0 answers
26 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 ...
user avatar
0 votes
0 answers
37 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 : ...
user avatar
0 votes
1 answer
42 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 ...
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 ...
user avatar
  • 800
0 votes
1 answer
439 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 ...
user avatar
  • 185
0 votes
1 answer
176 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 ...
user avatar
0 votes
1 answer
298 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 ...
user avatar
1 vote
0 answers
60 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 ...
user avatar
1 vote
1 answer
245 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, ...
user avatar
0 votes
1 answer
51 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 ...
user avatar
2 votes
0 answers
64 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: ...
user avatar
  • 21
0 votes
1 answer
75 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, ...
user avatar
0 votes
1 answer
77 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 ...
user avatar
  • 103
1 vote
1 answer
384 views

How do I prevent my game from being detected as a virus?

I developed my own game engine and I'll refer to it as a Software Development Kit (SDK) here, for making a specific type of game. The SDK encapsulates low level DirectX APIs. It's written in C++ and ...
user avatar
0 votes
1 answer
478 views

Creating Sphere Triangles from Vertices

I came across a way to create the vertices of a sphere, located here: https://gamedev.stackexchange.com/a/150293/62793 I converted this to the following C# example: ...
user avatar
  • 800
0 votes
2 answers
243 views

What's the maths behind checking line of sight

I understand in unity there is Phsyics.LineCast(Vector A, VectorB). What's the maths behind doing that, the only thing i can think of is going along the line at small intervals and seeing whether it ...
user avatar
0 votes
1 answer
132 views

Where is the Mclip matrix & how do I set it?

According to this article, the Mclip matrix will be used, but I didn't find any function in Directx11 to set this matrix. How do I set it?
user avatar
1 vote
0 answers
59 views

How do I render halfspace fog?

How do I render halfspace fog? From my interpretation, I have a transparent plane in the scene. Then I use a function that returns a fog color in my shader. Do I render the transparent plane by itself ...
user avatar
  • 11
0 votes
1 answer
66 views

XNA configuration on legacy code

Background: Our biomechanics and Advanced Surgical Technologies Lab wrote a surgery navigation system desktop application in C# around ten years ago. One of its major functions uses XNA Game Studio 4....
user avatar
0 votes
1 answer
138 views

Using ID3D11DeviceContext::Map to update a dynamic texture results in offset or incomplete data

Background I'm generating a memory texture at load time to store the offsets into a texture atlas for a tilemap as described here Any way to combine instantiated sprite renderers into one texture so I ...
user avatar
  • 1,986
0 votes
1 answer
871 views

Has the Geometry Shader been abandonded?

Advice says to either limit use or not to use it at all. Friday Facts #251 - A Fistful of Frames | Factorio: We tried it, and it worked great. We got some speedup due CPU needing to prepare less ...
user avatar
  • 1,986
0 votes
1 answer
157 views

Difference between shader input element classification between D3D12 and Vulkan

I'm confused about the difference between the shader input element classifications in D3D12 and Vulkan. For example, in Vulkan I could have the following declarations: ...
user avatar
0 votes
1 answer
116 views

How to set transparency in DirectX 7 surfaces, which contain 32BPP BMP files?

The following is my working code. Everything functions and I can animate my sprite but the sprite has no transparency color. It has a white background on every frame. I am using DirectX 7.0 and 32BPP ...
user avatar
0 votes
0 answers
78 views

How do I store the texture coordinates for thousands of tiles in a tile mesh on the GPU and not just the most recent?

This is a follow-up to this question. The geometry shader is performing fantastically, but now I've lost the ability to display more than one tile type at once (the last one in the visible array is ...
user avatar
  • 1,986
0 votes
1 answer
217 views

Geometry shader-generated tile mesh isn't any faster than CPU-generated version

For practice, I'm writing a Rogue-like. In order to speed up tile rendering I have a dynamic Mesh/MeshBuilder that collects all the vertices of the visible tiles' quads (4 vertices per tile: position, ...
user avatar
  • 1,986
0 votes
2 answers
2k views

Does SDL2 completely encapsulates Direct3D and OpenGL?

I'm starting to study game development but the concepts of how the SDL2 lib works are still a bit blurry to me. I get that both Direct3D and OpenGL are two sides of the same coin. They both are used ...
user avatar
0 votes
0 answers
87 views

DirectSound only allows to capture and output from/to primary devices

I wanted to allow my users to choose the devices that they want to capture from and output to. For this, I used DirectSound device and capture device enumeration functions, obtained GUIDs of all ...
user avatar
0 votes
1 answer
142 views

Multiple directx runtimes in game

I see by Process Explorer that many of Unreal Engine games load multiple DirectX runtimes. For example game Gears 5 in requirements has DirectX 12 only support, but uses DirectX 9 and 11 runtimes also....
user avatar
  • 119
0 votes
0 answers
68 views

Same image in both eyes of VR HMD results in wrong 3D effect

I am trying to mod in VR support for a game without VR support via OpenVR as it proved to be the easiest one to implement with the least amount of issues, i don't think my issue is related to OpenVR ...
user avatar
  • 1

1
2 3 4 5
21