Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

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
1answer
29 views

Recalculating normals on a tesselated cubed sphere with heightmap applied

I'm learning about the graphics pipeline using C++, HLSL and DirectX 11 for my course. I'm currently tesselating a cubed sphere with an applied height map. My issue is figuring out how to recalculate ...
0
votes
0answers
32 views

Retrieving shader byte code using D3D11

I have a shader as an 'ID3D11VertexShader' (or generally any 'ID3D11*Shader') instance. For my application I would like to read the shader byte code that is associated with this instance. The goal is ...
0
votes
0answers
99 views

How to encode captured RGBA frames with H.264/H.265 (NV Codec SDK/AMD AMF)?

I have a desktop application that captures the content of the screen. The result are DirectX 11 2D textures with RGBA8 format. My goal is to stream that captured content to a mobile device with ...
1
vote
1answer
58 views

Problems implementing shadow maps in directx

I am trying to implement shadow maps in my Dx11 rendering engine. I created a shadow map texture2d, a shader resource view, a depth stencil, a viewport, and a rasterizer state, as recommended by ...
1
vote
1answer
34 views

Update DXGI swapchain sample count without recreating swapchain in full-screen mode

I'm implementing the ability to tweak graphics settings in my application at runtime (resolution, refresh rate, v-sync, multisampling). It is possible to update the resolution, format and refresh rate ...
0
votes
0answers
21 views

Array textures on Pixel shader

I'm developing on D3D11 and D3D12 in parallel. D3D12 is really difficult, but I learn it gradually. I faced a problem such as passing an array of textures to a vertex Shader. The method ...
1
vote
1answer
66 views

couldn't switch to requested monitor resolution in Windows 7

Run the game,and it shows that it couldn't switch to requested monitor resolution, DX11 could not switch resolution in Windows 7(both 32 and 64 bit ) when I tried to build the game with Unity 2017.3, ...
0
votes
0answers
12 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::...
1
vote
1answer
49 views

Downscaling texture via mipmap [closed]

Copied from Computer Graphics SE. I am implementing a post-processing effect in my DirectX 11 pet renderer. The post-processing pass is implemented by rendering a full-screen quad covered with ...
0
votes
1answer
37 views

Objects World Matrix Issue in Direct3D11

I have an issue with the transform matrix of my cube. When I change its position (world matrix) and rotate the camera, it is getting deformed. Here's my shader update code: ...
0
votes
1answer
56 views

Having some trouble with my frustum checking code

I'm trying to check if a bounding sphere is either within or intersecting my frustum. It mostly works but there are cases where it should and it doesn't. The frustum is made up of 6 planes which have ...
0
votes
1answer
28 views

Sampled texture from bitmap font produces blue glow

I'm creating a texture is DirectX 11 from bitmap fonts. I realize that I can use DXTK, but this is an exercise for me, not in learning another library. My sample code looks like this. ...
0
votes
0answers
29 views

Lighting abnormal when calculating in tangent space. Probably something wrong with coordinate transformation matrix

I'm trying to calculate lighting in tangent space. But I just keep getting abnormal results. I was modifying the book's demo code and I wander if there maybe something wrong with the transformation ...
0
votes
1answer
145 views

God rays shader - Trouble with sun position

I have found a shader that I like here: https://www.shadertoy.com/view/4dyXWy The code for the fragment shader from the link above is: ...
0
votes
1answer
35 views

Why specular reflection work only in center of virtual scene?

How to calculate this cpecular reflection? HLSL ...
1
vote
1answer
132 views

Can't get Direct3D11 depth buffer to work

I can't get the depth buffer to work correctly. I am rendering 2 cubes in a single Draw function, and from one angle it looks great But swing the camera around to view the opposite sides, and I ...
0
votes
1answer
57 views

How can I create a Texture2D out of an array of color data?

I'm trying to make a simple engine with DirectX where you can draw to the screen with a function Draw(x, y, r, g, b). The function sets the pixel at x,y to the color r,g,b. The engine has a parameter ...
1
vote
1answer
80 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-...
2
votes
1answer
139 views

What actions should I perform in DirectX 11 to correctly process Alt+Tab?

What actions, in order, should I perform in DirectX 11 application to correctly process Alt+Tab event from Windows OS? My application is in fullscreen mode. I expect my application to minimize to ...
0
votes
1answer
232 views

How do I draw 2D sprites from a sprite sheet in DirectX 11 without ghosting/artifacts

I'm new to DirectX and I am trying to get my feet wet by making a simple 2D game. I chose DirectX 11 and am using the DirectX ToolKit helper library which recommended I start with DX11 and not DX12. ...
0
votes
1answer
80 views

DirectX depth/order render issue

I have what appears to be a depth or order rendering problem which I have never seen happen before. My terrain and water are rendered with my displacement shader, and at the moment all other models ...
0
votes
0answers
61 views

How to apply a first person weapon image to your directx fps camera

simple question here, I need to know how would you devs and programmers alike add a simple "texture2d" Image of a shotgun to the camera in a fps directx 11 scene I also use a void UpdateCamera(); ...
0
votes
2answers
78 views

d3d11 renderqueue multi pass rendering design best practice

The goal: issue least calls to d3d11 ImmediateContext and render advanced effects like toon / outline / anything that requires rendering the same vertex buffers with at least two different vertex ...
0
votes
1answer
120 views

DirectX 11 generate normals for tessellated triangles

I've spent a couple days looking for an answer to this - How can I access the newly created triangles of tessellation and generate normals for them? I've followed much of the shader code from the ...
2
votes
1answer
204 views

FormatMessage not working for HRESULTs returned by Direct3D 11

I am using Windows 7 x64 and Visual Studio 17 (v15.9.7). Say I try to create a swap chain using IDXGIFactory2::CreateSwapChainForHwnd and pass in ...
1
vote
1answer
49 views

Why is my texture displaying incorrect colours using dx11?

I am trying to load my data from a binary file (ppm) and create a texture using this data. It is important that I learn to do it this way as I am eventually going to be packing all of my textures into ...
1
vote
1answer
131 views

Fix Pixel Shader “Stage did not run. No output”

I'm trying to set up a minimal D3D11 renderer but fail to get the pixel shader stage to run. The available answers here or the ones I found through Google couldn't help me, unfortunately. Using ...
1
vote
0answers
62 views

Alpha is not working in diffuse light shader

I am following this tutorials series on rastertek.com and I got a bit stuck on the Diffuse Lighting Tutorial. Particulary, the part that does not work for me is alpha channel of the light color. Here ...
0
votes
1answer
54 views

Direct3D & Assimp Texture is inverted weirdly!

I'm working on a rendering engine but even on the first mesh is something wrong. I use assimp for mesh importing! In the Assimp Viewer it looks correct: And in my software it looks like this: Look ...
0
votes
1answer
99 views

DirectX11 program bug full screen

I have a problem switching the engine from full screen to normal. I use alt + enter. The problem is this: when I start the engine in full screen and press alt + enter - it hangs. For mode of the ...
0
votes
1answer
88 views

error X4016: SV_InstanceID semantic cannot be used with 10Level9 targets

I'm using a variant of the D3D12 UWP template that comes with VS2017 Community Edition and I have two related questions: When I add this italicized and bolded code to the vertex shader signature, I ...
0
votes
1answer
73 views

Can't figure out why my mouse picking code doesn't work

I am trying to create code to check for intersections between bounding spheres and the mouse. I get a mouse ray but it doesnt seem to point in the direction you think it should Attached is a ...
1
vote
1answer
99 views

Frustum Culling bug in program

I did Frustum Culling in my engine, but it does not work correctly. All shown in the video: Video If the approximation is too close, the model disappears. On the right in the console you can see ...
1
vote
2answers
190 views

Why does my FPS go down so much when rendering basic sprites?

I have a UWP DX11 application and I've recently removed the vsync and noticed that my fps goes down drastically when I'm only drawing very basic sprites on the screen and I'm trying to learn why this ...
0
votes
1answer
57 views

Huge input delay although framerate is stable - possibly related to the DirectX Tool Kit?

I'm in the process of learning how to use the DirectX 11 API and came upon the following problem: Although my rendering function executes quite fast at around 150 fps (as one expects considering how ...
0
votes
0answers
29 views

(C++, DirectX 11, UWP) - How do I update the ByteWidth of a VertexBuffer without recreating it?

I want to have one buffer used for all dynamic properties but the amount of vertices in this could vary from just a few for an interface to the whole scene. As such if it's becomes initialized with ...
0
votes
2answers
205 views

DirectX11 - CreateInputLayout() Vertex shader linkage problem

I keep getting the same error every time, I really have tried everything to fix the problem but it's still not working. Basically I'd like to draw a simple cube. The error(s): ...
1
vote
1answer
23 views

3D Texture Only interpolates on Y-Axis

I'm having trouble wrapping my brain around what actually is the issue here, but the sampler I'm using in my volume renderer is only interpolating the 3D texture along the Y axis. I roughly followed (...
0
votes
0answers
36 views

Render a basic Quad to screen?

I have been trying to accomplish this for quite some time with no success; I've looked at several relevant questions here on StackOverflow with no success; I've also followed 6 different tutorials ...
1
vote
0answers
90 views

“Proper” way to do 2d scrolling game

I am new to game development and I would like to make a 2D scrolling game with a tile based engine. If you want an idea, it should resemble the Legend of Zelda: A Link to the Past like in the image: ...
1
vote
0answers
86 views

How do I wrap my custom texture to a quad using DX11 and C++?

I have manually cut out some textures from a sprite sheet and saved them as individual files for now, and I am trying to load in this png and apply it to the quad I have drawn on the screen, but for ...
7
votes
2answers
3k views

“DirectX will only draw polygons with an [X,Y] from [-1,-1] to [1,1] and with a Z from 0 to 1.”, What does this mean and how to work around it?

I've been following the D3D11 tutorials on Rastertek to expand my knowledge on rendering which I will need as I want to build my own engine, as a hobby. After finally getting a model to be rendered ...
0
votes
1answer
47 views

Typical Point Light Flow?

A Quick Note This question assumes you have some knowledge about the overall rendering process and do not need clarification on rendering objects with HLSL and a <...
0
votes
1answer
61 views

Why does order matter in constant buffers?

I have a rather peculiar question remaining after solving most of my own question on StackOverflow. When creating the constant buffers used by my shaders, I've learned that the order of variables ...
0
votes
1answer
42 views

Extrude only vertices where the assigned texture is transparent?

I am looking at implementing a water surface on my spherical object and have created a texture with transparent pixels where the water should be. However, I am currently confused on how I can extrude ...
0
votes
1answer
204 views

DirectX 11 Compute Shader error DXGI_ERROR_DEVICE_HUNG

I am trying to use a compute shader for ray picking technology. My shader accepts: vertex buffer of all models index buffer of all models a buffer of transformation matrices of all models Offset ...
1
vote
1answer
88 views

Which DirectX Version to use for a low poly game?

Which DirectX Version (10, 11 or 12) is recommended to use, if you want to have a low-poly game with shaders, shadow and aliasing. But not normal or height maps. Moreover my question is, because once ...
0
votes
1answer
193 views

Terrain collision with sphere and OBB

I'm implementing my physics engine for my 3D game. So far I've been able to implement collision detection between OBB, spheres and planes. The engine generate contacts and resolve them with an ...
0
votes
1answer
125 views

Difference between texture.Load and texture.Sample(PointSampler,..) in HLSL/Dx

Conceptually, I understand the difference between load and sample but I want to know if essentially point sampling and load do the same thing when it comes to selecting a texture value (ignoring an ...
0
votes
1answer
338 views

DirectX 11 - Depth Stencil not working

I'm currently working on a game for university in DirectX 11. I have tried to add in a depth buffer to my project, but since adding it in none of my objects show. ...