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
0answers
13 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....
0
votes
0answers
21 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 ...
0
votes
1answer
31 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 ...
0
votes
1answer
32 views

Creating Compute Shaders throws E_INVALIDARG exception in SharpDX

I've recently been working on a small helper for creating and using compute shaders in C# along with Monogame/XNA. My end goal is simply to have compute shaders working in C#. My main issue is as such:...
0
votes
0answers
32 views

How to time draw images to the window in d3d8

I need to be able to draw one image then have it disappear then draw the next image then disappear. I can draw 1 image on the window but I can not make it disappear and draw image 2. Also would be ...
1
vote
1answer
112 views

DirectX 11, support for Font drawing

I have recently started to work with DirectX 11 and 12, I am using Microsoft Visual Studio Community Edition. I am under a 64-bit machine. I am currently rendering a frame with background and a window ...
1
vote
0answers
55 views

My arcball camera does a roll when it shouldnt be

I am trying to build an arcball camera and it's mostly working, the problem is that as you rotate around the object you have selected (orbit_target_pos in the code),...
1
vote
0answers
52 views

Directx 12 ultimate. What has changed?

We have Windows 10 2004 with new sdk, we have new nvidia drivers with support wddm 2.7 and Dx12U but I still can't understand - how it should help to developers write one code for all platforms? I don'...
0
votes
0answers
23 views

DirectXTK: SpriteBatch::Begin and Draw methods give LNK2019: unresolved external

Right now, im using DirectXTK (version 2020.2.24.4) and Visual Studio 2019. My declarations look like this: ...
0
votes
0answers
55 views

How do I render to a resizable window from a large fixed size back buffer in current graphics APIs?

I have some code that uses DirectX 9 with Windows native window management, that I would like to port to newer graphics APIs, but this code has a fairly unusual approach to window resizing, and it ...
0
votes
1answer
34 views

How to update different constant buffers for different vertices in vertex buffer?

Lets say I have vertices and indices for Box and Sphere and I put them into one vertex buffer. But if I want to use different constant buffers for each of the figures, how would I do that? As I ...
0
votes
1answer
37 views

d3d11 black texture when manually creating from image (Rust)

I am trying to create a ID3D11Texture2D from a RgbaImage loaded from a .jpg. The below code produces no errors. However, the texture is black when it is actually ...
1
vote
0answers
15 views

My triangle disappears when multiplaying by my perspective projection matrix

Whenever I multiply my transformation matrix, which is passed to the shader via constant buffer, my triangle disappears. Here is the code for the passed matrix: ...
0
votes
0answers
48 views

How to draw lines in Directx12?

I want to draw line between two points (x1,y1,z1) (x2,y2,z2). I want to have possibility to change this line start and end point ...
0
votes
0answers
22 views

How to draw different geometries in DirectX?

I want to draw many cubes and many lines. I am dealing with many cubes, that is ok. But to do if I also want to draw another shapes(not triangles)? Do I need to create 2 vertex and index buffers? ...
0
votes
1answer
79 views

If I use vertex shader to do all operations on object, then constant buffer can be empty?

The program cycle is Update(); UpdatePipeline(); In Update() constant buffer for each object, that after transformations, has ...
0
votes
1answer
27 views

Figuring out the exponent in a spotlight equation from the angle of a cone

I followed a tutorial on how to build a spotlight using DirectX. This tutorial uses a point light equation plus a line of code to limit the light to the shape of a cone. I have everything working, but ...
0
votes
1answer
105 views

How to convert this resource texture creation code from DirectX 11 to DirectX 12?

I have some code below that is Directx 11 that im using to make a resource texture. ...
0
votes
0answers
121 views

Converting texture format

I am implementing glTF scene loading in my pet DirectX 11 renderer using tinygltf loader from Syoyo Fujita. When loading a texture, tinygltf loads its raw data in its native format (e.g. 4x8b uint in ...
0
votes
0answers
33 views

Per-frame buffer management in DirectX 11

My buffer management when using the Metal API had me use a per-frame buffer cache to manage the buffers that were still in flight and could not be used. The Metal API is very explicit about when a ...
0
votes
1answer
124 views

Porting C# OpenGL rendering code to C++ DirectX

I have the following rendering method written in C# and apparently using OpenGL immediate mode, and i'm trying to port it to C++ and DirectX: ...
2
votes
2answers
236 views

How do game engines implement multiple rendering platforms?

How do game engines like UE4, Unity, Source, Cry Engine, etc add different rendering library's to their game engines? (Eg. OpenGL, DirectX, Vulkan)
0
votes
0answers
50 views

Optimizing texture fetches with higher mip levels

Let's say I have some shader program in DirectX or OpenGL rendering a full screen quad. And in a pixel/fragment shader I sample some huge textures at random texture coordinates. That is one same ...
0
votes
0answers
49 views

Compute normal based on Voronoi pattern

I am applying a 3D Voronoi pattern on a mesh. Using those loops, I am able to compute the cell position, an id and the distance. But I would like to compute a normal based on the generated pattern. ...
0
votes
0answers
40 views

SharpDX (DirectX11) Weird depth behaviour creating pixel error

I'm trying to render a simple terrain but I have a problem with the rendering result. The "blue" (it's the backbuffer clear color) pixels are the ones that I don't know where they come from. The ...
0
votes
0answers
92 views

Retrieving shader byte code using D3D11

I have a shader as an 'ID3D11VertexShader' (or generally any 'ID3D11*Shader') instance. For my application I would like to read the shader byte code that is associated with this instance. The goal is ...
0
votes
1answer
60 views

How to get DXGI_ERROR description?

In a D3D12 program, I encounter a DGXI_ERROR (CreateSharedHandle return an int <0), but I ...
0
votes
0answers
38 views

Dynamic cube mapping with a single draw call

currently i am following the book '3d_game_programming_with_DirectX11' and now i am in 'Dynamic cube mapping using Geometry shader' chapter. This is where i am stuck now. The sample code it's showing ...
0
votes
1answer
66 views

Writing Hull shader in directx

hey i am studying different types of shaders in directx. and it comes to hull shader. so i write hlsl codes for both constant hull shader and control point hull shader in same file in visual studio ...
0
votes
1answer
97 views

creating 2d array texture with mipmap

these day i am working with texture2d array with mipmapping. so this is how i tried so far. my approach load multiple(not textureArray form) textures that i want to set as array from computer folder. ...
0
votes
1answer
51 views

How to draw stencil ref value

hi i am currently implementing UI screen that shows Depth Complexity of scene, so that we can figure out how many time each pixels work for same pixels. for this i need to render stencil ref value. ...
0
votes
1answer
510 views

Resize window in D3D12

I am trying to implement the d3d12 window resizing function. First, I delete all the buffers referenced by SwapChain, and then run SwapChain :: ResizeBuffers. At this point I get the error: ...
0
votes
0answers
58 views

Array textures on Pixel shader

I'm developing on D3D11 and D3D12 in parallel. D3D12 is really difficult, but I learn it gradually. I faced a problem such as passing an array of textures to a vertex Shader. The method ...
0
votes
2answers
513 views

how to generate mipmap, and check if done properly?

i am implementing Mipmapping for my texture for the first time. i have 2 questions HOW TO CHECK IF MIPMAP IS DONE PROPERLY ? HOW TO SET MIPMAP FOR TEXTURE FROM FILE ? First one. i implemented ...
1
vote
1answer
59 views

reading from texture2d resource in directx11

Hi^^ i am trying to read data in resource, which i used to do well without any problems. but suddenly it is not working. first i made immutable resource that has data in it, which is ...
2
votes
2answers
103 views

z ordering in directx11

Hi recently i am trying to implement z ordering system into my directx framework. So every object will have z order property(int), and this value will have higher priority than depth checking for ...
1
vote
1answer
651 views

couldn't switch to requested monitor resolution in Windows 7

Run the game,and it shows that it couldn't switch to requested monitor resolution, DX11 could not switch resolution in Windows 7(both 32 and 64 bit ) when I tried to build the game with Unity 2017.3, ...
0
votes
0answers
99 views

Part of the back side of a transparent object disappears

I did some blending and culling to get the image below. As you can see, it is messed up. On the right side of the image, only the front side of the mesh shows. On the left side of this image, it ...
0
votes
1answer
240 views

Synchronizing with monitor refreshes without vsync

What is the preferred way of synchronizing with monitor refreshes, when vsync is not an option? We enable vsync, however, some users disable it in driver settings, and those override app preferences. ...
0
votes
1answer
85 views

Objects World Matrix Issue in Direct3D11

I have an issue with the transform matrix of my cube. When I change its position (world matrix) and rotate the camera, it is getting deformed. Here's my shader update code: ...
0
votes
0answers
45 views

How to program 3D translate widget like in blender?

Im struggling to achieve the translation widget in my own render engine. Funny enough I thought that widgets are easy, but boy was I wrong... What I want to implement: Where I am having problems: ...
0
votes
1answer
99 views

How can I create a Texture2D out of an array of color data?

I'm trying to make a simple engine with DirectX where you can draw to the screen with a function Draw(x, y, r, g, b). The function sets the pixel at x,y to the color r,g,b. The engine has a parameter ...
1
vote
0answers
104 views

HLSL DXGI_FORMAT_A8_UNORM Texture - dark colors appear less opaque than white

I am trying to render a DXGI_FORMAT_A8_UNORM texture (precisely, a font bitmap) in multiple colors by specifying the color per vertex and then apply the alpha value ...
0
votes
1answer
430 views

How do I draw 2D sprites from a sprite sheet in DirectX 11 without ghosting/artifacts

I'm new to DirectX and I am trying to get my feet wet by making a simple 2D game. I chose DirectX 11 and am using the DirectX ToolKit helper library which recommended I start with DX11 and not DX12. ...
0
votes
3answers
150 views

weird behaviour doing simple XMMATRIX multiplications

I have the following function: ...
0
votes
0answers
54 views

XMMATRIX performance

Dears, I am facing a performance problem when I try to access cell 42 and 43 in XMMATRIX define in DirectXMath.h. The frames dropped by 100 FPS. Here is my code: ...
1
vote
1answer
53 views

What is the difference between D3D12 structures/functions with terminal 1 in the name and without?

I could not figure out the difference between for instance CD3DX12_DESCRIPTOR_RANGE and CD3DX12_DESCRIPTOR_RANGE1. Why do both exist? Which should I use? Is there a general rule of behavior/usage/...
0
votes
0answers
113 views

DirectX sampling a Texture2DArray interpolates between textures unintentionally

I'm trying to texture my procedurally generated terrain. Previously I used an array of textures e.g. Texture tex[8], however in the shader you can't access this by ...
0
votes
1answer
82 views

How do game devs optimize their games for new CPUs/architectures?

I've learned that DirectX helps devs to program games on a variety of hardware. However, that's the visual/graphics side of things. How do game devs deal with new CPUs or CPU architectures? Is there ...
0
votes
1answer
76 views

Direct3D & Assimp Texture is inverted weirdly!

I'm working on a rendering engine but even on the first mesh is something wrong. I use assimp for mesh importing! In the Assimp Viewer it looks correct: And in my software it looks like this: Look ...

1
2 3 4 5
21