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
2 votes
1 answer
183 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 ...
0 votes
1 answer
25 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 ...
-1 votes
1 answer
957 views

Generating normals from terrain heightmap

I am drawing my terrain by rendering a static quad mesh several times and then displacing vertices using a heightmap. As such I need to generate normals. I am primarily interested in quality over ...
8 votes
2 answers
539 views

Why isn't my cbuffer updating?

I am really frustrated because my cbufer isn't updating. This is my VS: ...
0 votes
1 answer
368 views

Black texture when manually creating from image

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 ...
0 votes
1 answer
74 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 ...
0 votes
1 answer
1k views

Direct3D11 Depth buffer problem

Encountered a strange error when using Direct3D11, feature level 10.0. If the depth buffer texture is created with the format DXGI_FORMAT_R24G8_TYPELESS, bind flag D3D11_BIND_DEPTH_STENCIL | ...
0 votes
0 answers
9 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 ...
0 votes
2 answers
1k views

Zoom at a specific point using Orthographic camera

Currently I can perform Zoom which seems to be working fine but essentially what I'm really trying to do is zoom on a position offset from center as currently when I zoom then zoom is performed at the ...
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 ...
3 votes
1 answer
3k views

Instancing with Directx11

I'm a total beginner with Directx/3D programming. I need help with implementing hardware instancing on Directx 11. I'm trying to render multiple cubes on the screen, to create some sort of Minecraft-...
0 votes
0 answers
39 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 ...
0 votes
1 answer
76 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, ...
0 votes
0 answers
27 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 ...
1 vote
1 answer
182 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 ...
3 votes
1 answer
211 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 ...
1 vote
1 answer
2k views

Directx11 create Texture2D using subresourceData

I'm trying to create immutable texture in d3d11 so I want to use subresourceData, every tutorial on textures creates them with 2nd argument being null and after that updates subresource but I want to ...
0 votes
2 answers
91 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 ...
0 votes
1 answer
172 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 ...
1 vote
2 answers
192 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
1 answer
80 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 ...
0 votes
2 answers
54 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
0 answers
40 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 ...
0 votes
2 answers
690 views

How should I fix a graphic glitch caused by t-junctions when using greedy meshing

As you might be able to see in the following image, a "graphic glitch" occurs between triangles. I know you are able to make this less visible by enabling anti-aliasing but i was wondering if there is ...
5 votes
1 answer
2k views

Is the new windows 8 sdk usable with visual c++ express 2010 on windows 7? [closed]

This is inspired by and related to Is the June 2010 DX SDK really the latest? asked recently but it's a different question. I won't likely be purchasing the full visual studio 2012 for C++, I intend ...
0 votes
1 answer
58 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
2 answers
165 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 ...
0 votes
1 answer
74 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 ...
1 vote
1 answer
425 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 (...
1 vote
1 answer
122 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 ...
6 votes
1 answer
6k views

Render to Texture2DArray slices in DirectX11?

I would like to set a slice of a Texture2DArray as a render target in D3D/DirectX11. It's not clear how to do this. What I'm looking for is the DirectX equivalent ...
6 votes
3 answers
3k views

How to pass rendered frames from OpenGL to DirectX 11?

I have a dll that does some rendering using OpenGL. I need to render it to a texture and use that texture in direct x 11. My current attempt has been to render the OpenGL to a texture on one process,...
0 votes
1 answer
42 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
121 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 ...
0 votes
1 answer
42 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 ...
0 votes
0 answers
365 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-...
1 vote
1 answer
97 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 ...
0 votes
2 answers
592 views

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

The input layout ...
0 votes
1 answer
70 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 ...
0 votes
2 answers
388 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 ...
0 votes
1 answer
267 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 ...
0 votes
1 answer
112 views

Texture blends into one single color

It looks like that it's being sampled from the least detailed MIP level, at least RenderDoc sees the texture as it should be, and what the actual texture looks like is the same as MIP 9th. I'm using ...
1 vote
1 answer
707 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 ...
0 votes
1 answer
263 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 ...
0 votes
1 answer
182 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 ...
0 votes
1 answer
129 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 ...
0 votes
1 answer
125 views

DirectXTK: Only SpriteBatch::Begin and Draw methods give LNK2019: unresolved external

I'm using DirectXTK Desktop 2017 with Visual Studio 2017 and SpriteBatch::Begin() and SpriteBatch::Draw() give an LNK2019 unresolved external error (but not SpriteBatch::End() or SpriteBatch::...
0 votes
1 answer
96 views

Why specular reflection work only in center of virtual scene?

How to calculate this cpecular reflection? HLSL ...
0 votes
1 answer
151 views

d3d11 compute shader compile failed

I want to comiple a compute shader from text, but it failed with 0x8e16d728 error. ...
0 votes
1 answer
496 views

DirectX 11 Sprite Alpha (Invalid? + Bad Quality)

I have a bug with a texture font. This is the texture file in photoshop: This is the result I am getting: The alpha from 0 and 1 shows weird artifacts as the final result, alongside the low quality ...

1
2 3 4 5
16