Questions tagged [directx11]
DirectX 11 is the primary graphics API for Microsoft platforms including Windows, Xbox One, and Windows phone.
777 questions
0
votes
1
answer
82
views
Does it make sense to use a compute shader with Dispatch(1,1,1) and Numthreads[1,1,1] to draw a cone?
I was working on this idea of drawing a cone rotating on the y axis with a parametric equation, using a compute shader with a function like:
...
0
votes
1
answer
68
views
Difficulties for GPU rendering of a cone using parametric equation
I'm trying to render a cone at the gpu for some effects. I'm using the parametric equation provided here. I ended up with the shader below intended to work with an unorderedaccessview target (DX11). I'...
0
votes
1
answer
68
views
How to create array of Depthstencil2D from texture2Darray
I have already done someting like this for texturecube but here I don't understand what I'm doing wrong. I have the first chance exception error message.
Below how I proceed:
create a texture for ...
0
votes
1
answer
43
views
Difficulties with matrices settings for cascaded shadows
I have added cascaded shadows to my pipeline. The whole process seems to works fine as shown in the picture. But I should obtain a progressive “zoom” from the first cascade (red) to the last (blue) ...
0
votes
1
answer
86
views
Advice on how to best use if possible 4 GatherCmpRed to emulate a 4x4 PCF sampling for shadowmap blur
In a part of my level I have shadows close to the camera where a good blur is important. Currently I have implemented a 4x4 PCF, thus requiring 16 texture samplings.
I'm trying to see if the ...
0
votes
1
answer
169
views
Is memcpy safe to use to fill an ID3DBlob with a pre-compiled shader?
Following my post Saving shaders to file I then tried to load shader object files to recreate my shaders.
I found some Q&A about how to load precompiled HLSL shaders into memory, including a short ...
0
votes
0
answers
70
views
Back buffer texture appears distorted before presenting
I am trying to send video data from Dolphin Emulator to another process. To do so, I first get a reference to the back buffer from the swap chain.
...
1
vote
0
answers
47
views
CGLM Not Rendering with Sokol [closed]
I've setup cglm from a wrap configured with Meson, and have copied one of the samples from https://github.com/floooh/sokol-samples/tree/master (cube-sapp, to be exact). I've tried to replace sokol's ...
1
vote
1
answer
632
views
IDXGIFactory::CreateSwapChain() vs D3D11CreateDeviceAndSwapChain - When to use which for making a swap chain?
I'm following a bunch of tutorial series on how to set up Direct3D 11 for 3D rendering, I'm focusing on the swap chain part for now. The main tutorial series I am following is the one by PardCode on ...
1
vote
1
answer
487
views
Use DirectX 11 & HLSL in SDL
I saw Lazy Foo using OpenGL & GLSL in SDL, but I want to use DirectX 11 & HLSL in SDL.
Is there a way to do this, and how?
1
vote
1
answer
75
views
Failure on DX11Texturesavetofile for B5G6R5_UNORM format
I have a protocol to prepare with a combining shader a texture from two other textures and saving it in RGBA8_UNORM DDS format using DX11SaveTextureToFile. Works fine. It appears to me that I don't ...
0
votes
1
answer
61
views
How to calculate elongated reflection along the perpendicalar axis of a plane
I'm adding a rain effect in my pipeline in forward mode. I'm rendering a reflection map used to mirror the scene on a "wet" ground.
I have raindrops rendered as circles with an animated ...
0
votes
1
answer
64
views
About possibly using Depthstencil 2D array in multiplerendertarget mode
I'm rendering in forward mode my scene with its depth buffer and because I'm using animated characters I'm plannig to find a way to use multiple rendertargets to do the directional shadow pass at the ...
1
vote
0
answers
41
views
Some of the assignment operations in the directx11 compute shader are getting skipped, even though the assigned values are used later
I'm implementing an algorithm called Fast3x3 SVD on my compute shader. However, while I was debugging my compute shader in RenderDoc, I noticed some assignment operators were completely getting ...
0
votes
2
answers
231
views
Skybox looks distorted when camera nears sides of the cube
I created a cubemap for skybox, but there were problems with displaying UV for it. when I appear in the world, everything looks fine as it should, BUT when I approach one of the sides of the cube, its ...
1
vote
2
answers
440
views
How to use unconventional texture format
I would like to use a texture that could have more than 4 channels.
I have seen a post where they use a single channel R8 texture to store string chars.
I'm thinking of using something like that with ...
0
votes
2
answers
125
views
error X3671: loop termination conditions in varying flow control cannot depend on data read from a UAV
I have a problem with converting my pixel shader to compute shader.
The error is in this piece of code:
...
0
votes
1
answer
118
views
Vertex sorting to match triangle list definition of an hexagon
I’m working on a project to display molecules with DirectX that I’m updating regularly to add visual effects. The one I’m working on is simple: display a flat transparent hexagon that match a ...
1
vote
1
answer
1k
views
Difference between Command Lists and Deferred context
I'm new to DirectX and I feel like I killed Google search but still cannot find information about the difference between these:
Immediate context + Command Lists
Immediate context + Deferred context (...
0
votes
1
answer
80
views
Little problem with offsetting transformed vertex in a vertex shader
I’m working on some home-made menu stuff under DX11. I’m creating the rect menus at start all located at position 0,0. Each menu contains some lines of options. Everything is created as transformed ...
0
votes
1
answer
81
views
Object stuck to screen no matter what eye position is used
I've run into an issue when trying to write a simple rendering program in D3D11. I'm 90% sure it's to do with some faulty matrix multiplication or generation, but I've tried debugging the values of ...
1
vote
1
answer
241
views
Last hole artifact in screen space refection with Hierarchical Z
After lot of efforts I have an almost nice shader doing SSR with HiZ. The shader is provided below. Some parameters are tunable and you can speed up things but the difficulty in my scene (picture) are ...
3
votes
1
answer
383
views
How Can I Match the Windows Cursor Latency with a DirectX Rendered Cursor?
My Win32/DirectX 11.1 project requires that I render the mouse cursor myself rather than use the system cursor. This is easy enough; however, I've found that there is a human-perceptible latency when ...
0
votes
2
answers
1k
views
Handling pipeline objects in both DX12 and Vulkan like graphics APIs
I have been using OpenGL and Directx11 extensively for my engine. The thing is, when I wanted to support DX12 or Vulkan, I realized that they collect all the state data in one place, removing the ...
1
vote
1
answer
1k
views
Would you ever need multiple D3D11 devices?
I'm programming a rendering engine, and I'm considering whether on not I would need to implement the availability to call D3D11CreateDevice() multiple times to get ...