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
19 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 ...
1
vote
0answers
34 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 : ...
0
votes
0answers
32 views

How can I generate geometries in the shader by using supplying it particles?

I have a bridge that is made of particles and connected by rods and anchors. I want to make these particles into vertices and pump them into the vertex shader so I can do geometry work of the actual ...
0
votes
1answer
30 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 ...
6
votes
1answer
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 ...
0
votes
0answers
41 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 ...
0
votes
0answers
28 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 ...
1
vote
0answers
13 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 ...
0
votes
1answer
146 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 ...
0
votes
1answer
92 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 ...
0
votes
1answer
100 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 ...
0
votes
0answers
14 views

DirectX9 HLSL .cso file import to Visual Studio

I started to learn HLSL because I want to upgrade the graphics of an old game from 2004. The game uses DirectX9, so I created a Vertex Shader with shader model 2.0 and now, I have two questions: ...
1
vote
0answers
56 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 ...
1
vote
1answer
99 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, ...
0
votes
1answer
39 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 ...
2
votes
0answers
45 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: ...
0
votes
1answer
34 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, ...
0
votes
2answers
89 views

OBJ file has more vertices than normals

Here is a Pastebin of my OBJ file created using Solidworks 3D https://pastebin.com/6MgQBF8J I don't understand how the number of vertices (645) can be larger than the number of normals (306) I ...
0
votes
1answer
37 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 ...
0
votes
0answers
45 views

Rendering a ID3D11Texture2D into a SkImage (SkiaSharp/Avalonia)

I'm currently trying to create an interop layer to render my render target texture into a Skia SkImage. This is being done to facilitate rendering from my graphics API into Avalonia. I've managed to ...
1
vote
1answer
307 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 ...
0
votes
1answer
114 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: ...
0
votes
0answers
24 views

Trouble projecting pixel back to worldspace in PixelShader [DX11]

For the last two days, I've been trying to get some code working to project pixels back to world space in my pixel shader. Im working on a fairly basic deferred renderer, and I'm using this world ...
0
votes
2answers
144 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 ...
0
votes
1answer
124 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?
1
vote
0answers
44 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 ...
0
votes
1answer
60 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....
0
votes
1answer
57 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 ...
0
votes
1answer
376 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 ...
0
votes
1answer
94 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: ...
0
votes
1answer
74 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 ...
0
votes
0answers
49 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 ...
0
votes
1answer
113 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, ...
0
votes
0answers
25 views

How to test a Unity game with different graphics APIs?

If I don't have a device with Metal, is there a way to test the application with it anyway? And if my device supports both DirectX and OpenGL, how can I tell the application, for example on Windows, ...
0
votes
2answers
841 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 ...
0
votes
0answers
62 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 ...
0
votes
1answer
113 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
46 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 ...
2
votes
1answer
251 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
78 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
37 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
840 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
113 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
56 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
39 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
1answer
51 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
119 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
34 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
1answer
109 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
80 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 ...

1
2 3 4 5
21