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

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 ...
0
votes
1answer
37 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 ...
-1
votes
1answer
16 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 ...
0
votes
1answer
49 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 ...
1
vote
2answers
58 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 ...
-1
votes
1answer
54 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 ...
0
votes
0answers
20 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 ...
0
votes
0answers
35 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
1answer
33 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 ...
5
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
42 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
30 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 ...
0
votes
0answers
17 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
184 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
106 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
128 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
16 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
113 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
40 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
46 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
36 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
1answer
48 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
56 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
321 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
144 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
153 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
48 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
62 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
70 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
480 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
100 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
80 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
52 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
130 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
27 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
936 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
65 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
117 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
51 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
270 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
86 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
926 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
121 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
57 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
52 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 ...

1
2 3 4 5
21