Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

Questions tagged [directx]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
77 views

Preferred GPU API to use for Steam Deck, Windows, Linux and MacOS support

Good people of the graphics SO community, I am new to Graphics programming or GPU programming in general but I have been a game dev enthusiast for over 4-5 years. I started learning about Graphics ...
Prav's user avatar
  • 101
0 votes
0 answers
49 views

How to use unbound descriptor range properly in descriptor tables

I am trying to use 2 "D3D12_DESCRIPTOR_RANGE" in a root descriptor table,defined as follows: ...
VersesDev's user avatar
  • 129
0 votes
2 answers
218 views

Storing array of floats within shader

I am about to implement a framerate histogramm chart for a DirectX Renderer. Ideally I would do this in pure shader code, but for a a histogramm I need to store the timestamps of the last ...
user20154's user avatar
1 vote
0 answers
307 views

DDS BC7 Thumbnails on Windows 10

Is it possible to enable accurate thumbnail previews for DDS files that use the newer DX10 headers (DirectX 10 headers)? It seems there is very limited information about this. I did find a couple ...
Robert's user avatar
  • 111
1 vote
0 answers
470 views

Compute shader in DirextX: difference between four kinds of memory barriers

There are four kinds of memory barriers in DirectX. Their names and definitions are: DeviceMemoryBarrier: Blocks execution of all threads in a group until all ...
Fan's user avatar
  • 11
2 votes
1 answer
250 views

Is it possible to make a projection matrix to not project in the center?

I have the following projection matrix: and I need to make a hole in the center of my matrix, something like that: (I don't want to project a custom W and H) Is that possible ? Thanks.
Cosma Eduard's user avatar
0 votes
1 answer
899 views

Billboarding in Vertex Shader

I'm trying to create a vertex shader that billboards a quad. Most resources online show the code to be some variation of the following ...
H3XXX's user avatar
  • 115
0 votes
0 answers
78 views

16 bit SNORM format not correctly storing Z component?

I generate a normal GBuffer in my engine, and I store it using a R16G16B16A16_SNORM format like this: ...
H3XXX's user avatar
  • 115
0 votes
1 answer
1k views

Calculating UV coordinates for sampling texture atlas

I have an 8192x8192 texture atlas that contains 1024x1024 shadow maps aligned side by side. I'm trying to calculate the uv coordinates so that I can sample each shadow map appropriately based on the '...
H3XXX's user avatar
  • 115
0 votes
1 answer
87 views

DirectX FVF(Flexible Vertex Format ) equivalent in OpenGL/Vulkan?

Is there any directX FVF(Flexible Vertex Format ) equivalent in OpenGL/Vulkan.
Cerberus's user avatar
1 vote
2 answers
261 views

Why do Nvidia and AMD have to update their drivers for game releases?

I like to know the technical aspects of it. Game developers use APIs like OpenGL or DirectX. The functions provided by these APIs, I would assume, work flawlessly with all graphic cards because they ...
AliceTheCat's user avatar
1 vote
0 answers
121 views

Conditionals and branching in shaders

This is a quite wide subject which implies a lot of topics such as the platform or the compiler, but I think that it could be useful for everyone to know more about this. A common mistake is to think ...
MaT's user avatar
  • 1,229
1 vote
0 answers
256 views

OpenGL/D3D11 offscreen render multiple buffering

Recently I've been looking at Vulkan, and one thing that I noticed is that the application is responsible for choosing which buffer to render to in the case of multiple buffering. This got me thinking:...
Botond Máté's user avatar
0 votes
1 answer
227 views

Converting Vertex and Index buffers to a File Format

I have many sets of vertex and index buffers that I’d like to render on to the screen. Ideally each model in different locations with-in world space. I’m actually doing a statistical study on spatial ...
junfanbl's user avatar
  • 113
-1 votes
1 answer
150 views

When do people need to work directly with a graphical API (eg: Direct3D) instead of using already made software?

I had this doubt in my head for several months and have been unable to find an answer anywhere on internet. I know what OpenGL, DirectX, Vulkan, Metal, etc... are, I already know what they are used ...
lorenzo's user avatar
  • 101
2 votes
1 answer
408 views

Rendering equation for spherical lights

I am currently implementing spherical lights in my DirectX game engine. I decided to build the shading formula from the classical rendering equation. Here is what I get: The simplifications show that ...
B Lee's user avatar
  • 23
1 vote
0 answers
40 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 ...
Emil Kabirov's user avatar
0 votes
1 answer
1k views

Sphere Texture Mapping Algorithm

I am trying to generate UV coordinates automatically to map a texture on a sphere. The problem is with seams when going from 0.8 to 0.2 there is a discontinuity and interpolation in fragment shader ...
Prototype's user avatar
0 votes
1 answer
475 views

SSAO - artifacts appearing

I am trying to implement SSAO using DirectX11 but instead I got white screen with few black dots on model. My suspect is that kernel generation or usage might be wrong. I've tried changing order of ...
DirectX_Programmer's user avatar
0 votes
1 answer
330 views

Weirdly looking diffuse irradiance map

I have problem with creating diffuse irradiance map. As reference I am using https://learnopengl.com/PBR/IBL/Diffuse-irradiance and https://github.com/TheEvilBanana/PhysicallyBasedRendering/blob/...
DirectX_Programmer's user avatar
0 votes
1 answer
382 views

Skybox is rendered on the model instead of surroundings

I'm trying to implement Skybox in DirectX 11 (DirectXTK) but when I'm rendering skybox, then texture is rendered to my sphere model instead of showing skybox outside. Rendering code: ...
DirectX_Programmer's user avatar
1 vote
0 answers
161 views

D3D12EnableExperimentalFeatures causes D3D12CreateDevice to fail

I am following Nvidia's DXR tutorial: D3D12HelloTriangle. I call below code before creating device and it returns true ...
ali's user avatar
  • 740
0 votes
1 answer
113 views

CPU load in games - what is the GPU/DirectX doing to make CPU load higher?

More of a question about what's possible in DX. Some people have reported that when running games on higher settings they get less CPU load but when dropping the settings the CPU load increases. ...
Charleh's user avatar
  • 101
2 votes
1 answer
356 views

Image saved as DDS with 16f format in photoshop has strange FOURCC text

I am analyzing the hex code for DDS files which are compressed via Nvidia's dds plugin in photoshop. I noticed something strange when having a 16 bit float file. This is the dialog: When I look at ...
Samuel's user avatar
  • 123
3 votes
1 answer
302 views

Why does DirectX use COM pointers and interfaces?

I have a rudimentary understanding of COM and I know that its main purpose is to enable interoperability between programs written in different languages. However I dont understand why that is useful ...
mbl's user avatar
  • 301
4 votes
0 answers
81 views

Drawing "after" Present to achieve better performance

I had an application that was originally single threaded and worked as follows: gather the items to be drawn (occlusion / frustrum culling / sorting into batches) draw items using an immediate ...
default's user avatar
  • 333
4 votes
1 answer
857 views

Clipping for perspective projection

In the following two graphs, the red lines are borders of the perspective-projection frustum, the blue lines are to be rasterized, the green lines are perspective-projection lines, which are wrong. ...
chaosink's user avatar
  • 591
2 votes
1 answer
334 views

DX9 Shadow map PCF issue

I am trying to do simple PCF with Unity but I am facing some issues and I don't know where they come from. If anybody has an idea... Here are two examples ...
MaT's user avatar
  • 1,229
8 votes
2 answers
1k views

Help me grasp Anisotropic Filtering (AF)

Lately I've been reading about texture filtering, namely Nearest-neighbor filtering, Bilinear filtering, Trilinear filtering, Anisotropic filtering, MIP maps, RIP Maps and so on. From a high-level ...
Nicola Masotti's user avatar
0 votes
0 answers
180 views

Invoking shader in DX

So I am new to the DX12 world. I am currently trying to tweek the nbody_gravity DX12 sample, but appending or calling another Compute Shader which is to add 2 buffers to produce an output in a ...
Madhu's user avatar
  • 43
0 votes
0 answers
51 views

DX12- hlsl code invoking [duplicate]

I am pretty new to graphics programming using DX12. I was testing out my skills by building a shader to add 2 buffers and put the result in an output buffer. I have written this code in "ComputeShader....
Madhu's user avatar
  • 43
14 votes
2 answers
4k views

Derivative maps vs. Tangent Space Normal maps

I discovered that some engines use derivative maps instead of tangent space normal maps. After some reading, it seems to be a really awesome way to replace tangent space normals but are there some ...
MaT's user avatar
  • 1,229
2 votes
0 answers
156 views

If statements in shaders - implications and consequences [duplicate]

I've heard a lot that in shader development, you absolutely need to avoid branching and so if statements. But why? Does this have a real impact on performances on old and modern hardware or is it ...
MaT's user avatar
  • 1,229
1 vote
0 answers
147 views

Rounding rules for mip level with point sampling

In shaders, when using SampleLevel intrinsic, if we pass 0.5 in the mip level parameter, and the sampler is a ...
v.oddou's user avatar
  • 623