Skip to main content

Questions tagged [directx11]

DirectX 11 is the primary graphics API for Microsoft platforms including Windows, Xbox One, and Windows phone.

Filter by
Sorted by
Tagged with
0 votes
0 answers
29 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?
M 027's user avatar
  • 1
0 votes
1 answer
35 views

how to pass result of Compute Shader using UAV to Target View and render it in Direct3D11?

I'm trying to get a very basic Compute Shader to write to a Texture2D and render its result to screen. so far I have written this code to bind UAV to Texture2D and pass that to my Compute Shader. but ...
NotAlfred's user avatar
1 vote
1 answer
29 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 ...
philB's user avatar
  • 139
0 votes
3 answers
37 views

How to clear a specific color channel in a rendertargetview

I have this situation where I would like to use a R16G16 (or 32) float RTV, write on the R channel at start and update only the G channel each frame. Is it possible to clear the RTV in a way the R ...
philB's user avatar
  • 139
0 votes
1 answer
26 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 ...
philB's user avatar
  • 139
0 votes
1 answer
84 views

GLSL ported shader not working in HLSL

I have been working on an Infinity Grid shader for my engine. It was already implemented to Vulkan’s GLSL, so it worked great with OpenGL’s (4.6) GLSL. Here's a reference. This basic shader with ...
Kenny Tutorials's user avatar
0 votes
0 answers
11 views

Graphics.DrawString not drawing when picturebox handle is outputsource of directX11 device

Picturebox handle is set as the outputSource of DirectX11. directX is rendering on the picturebox handle. I am also drawing text on the picturebox in paint event. But the text is not shown. If i don't ...
Quraishi sazid's user avatar
0 votes
1 answer
30 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 ...
philB's user avatar
  • 139
0 votes
0 answers
41 views

Specular lighting does not appear

I'm struggling to add specular lighting on-top of diffuse lighting and not entirely sure where I'm going wrong. I've followed the instructions given in our lecture but it just doesn't seem to be ...
Skoosh's user avatar
  • 1
0 votes
1 answer
83 views

What is the best way to handle more bone weights than allowed in code?

I am currently attempting to incorporate animated models in my game engine, using Assimp to load the models. I can load and render the static model just fine, but when I try to enable the animation, ...
Tenebre's user avatar
1 vote
0 answers
28 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 ...
ThisAccountIsForGameDev's user avatar
1 vote
1 answer
223 views

Blitting GStreamer's decoded buffer into a Unity render texture

I'm working on a Unity native plugin that runs a gstreamer pipeline in the background, decodes it using hardware decoding, then copies the texture over to a render ...
STUDIOCRAFTapps Developpement's user avatar
0 votes
2 answers
101 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 ...
Roolld's user avatar
  • 1
0 votes
1 answer
224 views

How to use gather offsets

I have this situation where I have parts of the same scene in each 4 half squares of a rendertarget rendered with the same view projection matrices. In my deferred pipeline I would like to sample with ...
philB's user avatar
  • 139
1 vote
2 answers
222 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 ...
philB's user avatar
  • 139
0 votes
1 answer
85 views

Screen position in Deferred Shading

I am trying to implement a program in Direct3D 11 which uses techniques like deferred shading and shadowmapping, but when I create my gBuffers, the position looks strange. After researching a bit I ...
Charlie.Q's user avatar
0 votes
2 answers
68 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: ...
philB's user avatar
  • 139
0 votes
0 answers
44 views

using texture as variable

I was trying to use a texture as a variable in my shader (DX11 VS/PS 5.0). Can't get it. I have recently find this piece of code here where a texture is passed as a function parameter. Is that ...
philB's user avatar
  • 139
0 votes
1 answer
61 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 ...
philB's user avatar
  • 139
0 votes
1 answer
78 views

Rotation is happening in reverse when the cube is upside down

I am writing this functionality in DirectX to rotate cube using the mouse. Now the functionality is working perfectly fine when the cube is sitting straight, but mouse functionality is reversed when ...
technoid's user avatar
1 vote
1 answer
514 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 (...
Sergey Sharpov's user avatar
1 vote
1 answer
131 views

What am I doing wrong with this BC7 reading?

I need to import a BCn image without any existing libraries. Thus, I have to write my own reader. This has gone fairly well so far for BCs 1-5 (don't need BC6), but now BC7 is causing a problem. As ...
Sir Teatei Moonlight's user avatar
0 votes
1 answer
46 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 ...
philB's user avatar
  • 139
0 votes
1 answer
132 views

Looking for an advice on how to possibly boost my compute shader

I have 4 rendertargets R10G10B10A2 each being used to store color and normal in a compact double RGB 555 bits format. When I'm doing the lighting pass I'm obliged to have extra rendertargets because ...
philB's user avatar
  • 139
0 votes
1 answer
45 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 ...
vK 3 1 RON's user avatar
0 votes
0 answers
406 views

Message pump and D3D11 DXGI in separate threads

I have read: https://learn.microsoft.com/en-us/windows/win32/direct3darticles/dxgi-best-practices#multithreading-and-dxgi https://learn.microsoft.com/en-us/windows/win32/direct3ddxgi/d3d10-graphics-...
Peter's user avatar
  • 1
1 vote
1 answer
112 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 ...
philB's user avatar
  • 139
0 votes
2 answers
677 views

DirectX11 creating input layout throws error on input signature not matching shader (instancing)

The input layout ...
koreus737's user avatar
  • 131
3 votes
1 answer
235 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 ...
Matthew Elkins's user avatar
0 votes
1 answer
75 views

Trying to debug slow DrawIndexed calls. 0.1+ms CPU usage per call

I have just been reworking my rendering pipeline. There is an issue I had noticed cropping up during this work but now its become constant and I cant figure out the cause. Every call to ...
dark_kosh's user avatar
0 votes
2 answers
467 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 ...
Barış Üçkardeş's user avatar
0 votes
1 answer
291 views

How to generate mipmaps with min value sampling for Hierarchical Z test (HiZ)?

I'm on the way to add HiZ to my SSR protocol as explained here I would like to use generatemip, but can't find how to select sampled pixels based on a min value ...
philB's user avatar
  • 139
1 vote
1 answer
783 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 ...
Gijahara's user avatar
0 votes
1 answer
302 views

What would be a correct ID3D11Query design for occlusion testing?

I've tried looking for tutorials or samples related to the topic - but all that I could find are either scientific papers or vague posts on forums. As I understand it - I need to dedicate a whole pass ...
krz's user avatar
  • 1
0 votes
1 answer
165 views

d3d11 compute shader compile failed

I want to comiple a compute shader from text, but it failed with 0x8e16d728 error. ...
Xinggang Li's user avatar
1 vote
2 answers
185 views

D3D11 Indices are Messed Up and Doesn't Follow my Primitive Topology

I am attempting to create a cube but I have been stuck on this for a very long time to no avail. My results look like this: All of my indices are messed up! Some are connected to the wrong vertices ...
coulomb's user avatar
  • 150
0 votes
1 answer
188 views

Why would some assets require a transposed TBN matrix?

I'm writing an OpenGL/DX11 Windows/Linux "engine" and I've encountered a confusing behavior in DX, specifically. For math, I'm using GLM, which means all of my HLSL ...
pdm's user avatar
  • 103
0 votes
1 answer
149 views

Scaling and offset problems with screen space reflexion in DX11

I've transposed from OpenGL to DX11 a SSR ray marching shader (code found here : https://community.khronos.org/t/screen-space-reflections/69987). It seems to work well but I have had an initial ...
philB's user avatar
  • 139
2 votes
1 answer
192 views

Depth func LESS EQUAL not working as expected

How is it possible that a fragment is generated, passes the depth test but isn't written to the current render target? This is the pixel history I see if I capture a frame in RenderDoc: The fragment ...
leone ruggiero's user avatar
0 votes
1 answer
45 views

ZBias trouble with alternative cubemap shadow method

I find two methods to produce cubemap for shadow both using the same geometry shader to draw each of the 6 faces. The first one writes in the depth buffer only and is used like this (really I thanks ...
philB's user avatar
  • 139
0 votes
1 answer
228 views

How do I offset a texture pointer in order to store an array of D3D11_SUBRESOURCE_DATA?

I'm attempting to load a sequence of frames from a GIF into a Texture2DArray using stbi_load_gif_from_memory which returns a ...
Casey's user avatar
  • 2,045
0 votes
0 answers
133 views

Problem with geometry shader and srteamout (directx11)

I'm starting with geometry sahder to simply transform vertex pos/norm in world space and pass this to ouput vertex buffer for sequential rendering. A unique original model is created with position ...
philB's user avatar
  • 139
0 votes
1 answer
19 views

Deffered shader with alpha : orient target writing

I have this bit of shader code to orient SV_target writing depending on alpha value for SV_Target0 : color0 = (input.a == 1)? float4(some value) : float4(0,0,0,0); for SV_Target1 : color1 = (input.a ...
philB's user avatar
  • 139
0 votes
0 answers
21 views

After drawing the scene with the deferred shader, I want to draw an object to be alpha blended, but it doesn't work

After drawing the scene with the deferred shader, I want to draw an object to be alpha blended, but it doesn't work. This is the current drawing order ...
문형준's user avatar
0 votes
1 answer
53 views

Depth does not writes in texture

I am doing volumetric fog. In the first pass I write down the depth of the front polygons of the cube, in the second pass I write down the depth of the back polygons of the cube, in the third pass I ...
black4's user avatar
  • 205
0 votes
0 answers
42 views

Do D3D11 / Metal / Vulcan programs commonly use upload/buffer threads?

I am porting an older OpenGL ES 2 program to more modern APIs (DX11/Metal/Vulkan, let's say.) The existing code uses a dedicated uploading/buffering thread (via a "share context") to upload ...
nmr's user avatar
  • 101
0 votes
1 answer
331 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 ...
T. Elliott's user avatar
0 votes
1 answer
121 views

I can't render faces properly in my DirectX11 project

For some reason, only back-faces are rendering, even if I set the rasterizer and stencil buffer and state to any values. Setting D3D11_CULL_NONE, ...
NicusorN5's user avatar
1 vote
2 answers
995 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 ...
Kyto's user avatar
  • 31
0 votes
0 answers
26 views

Need an approach for mounting turrets

I'm working on a game with the ability to customize the type of turrets on your starship. My question is how would I go about positioning the turret mesh at the hardpoint locations. Do I need to ...
Hayden Morris's user avatar

1
2 3 4 5
16