2022 Developer Survey is open! Take 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
16 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
15 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
24 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
24 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
35 views

D3D11 Clarification about Vertex Normals, Face Normals and Normal mapping

I really need some clarification what I actually need, and need to do in my game engine I've been working on and off on for quite awhile. I've been using D3D11 to render and I'm quite troubled about ...
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
  • 27
0 votes
0 answers
29 views

How to program skinned mesh animations with DirectX 8

I am trying to figure out how to use skinned meshes so that I can have 3d models that have bones that I can move myself through the code. I have been unsuccessful finding information about how to do ...
user avatar
0 votes
0 answers
28 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
17 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
17 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
  • 27
0 votes
1 answer
28 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
  • 27
0 votes
0 answers
75 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
45 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
26 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
51 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
151 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
64 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
24 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
39 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
  • 802
0 votes
0 answers
45 views

How to design Smooth Game Play using the Windows message translator and message dispatch loops?

In gameplay, my sprite will pause briefly when I change directions. I need help correcting this issue. Any suggestions are welcome. I have a constants header that has ...
user avatar
0 votes
0 answers
41 views

View space positions from depth in DirectX

I have a depth texture and I'm trying to output the view space positions on the screen. In renderdoct I get the following image, and there are two 3D Models a plane and another model. I'm using an ...
user avatar
0 votes
0 answers
21 views

Attach a DXR state subobject to a library using the DirectX Shader Compiler

Suppose I've got two IDxcBlob's libraryBlob and localRootSignatureBlob obtained from calling ...
user avatar
0 votes
1 answer
372 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
  • 173
0 votes
1 answer
154 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
250 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
59 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
196 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
46 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
56 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
60 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
60 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
359 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
377 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
  • 802
0 votes
2 answers
216 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
130 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
56 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
64 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
103 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,976
0 votes
1 answer
706 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,976
0 votes
1 answer
154 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
106 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
72 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,976
0 votes
1 answer
197 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,976
0 votes
2 answers
1k 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
82 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
131 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
63 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
2 votes
1 answer
387 views

What is the proper strategy to manage vertex buffers?

I have created a large variety of shaders for my game engine for different use cases. The vertex input for the shaders depend on what I want to do with them. For example, if I want to just render the ...
user avatar

1
2 3 4 5
21