Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [directx11]

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

0
votes
0answers
8 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
23 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
1answer
24 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
0answers
44 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 ...
1
vote
1answer
32 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
15 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
48 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
46 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
37 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
51 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
20 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
57 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
73 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
166 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
43 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
19 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
102 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
20 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
26 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
74 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
29 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
2k 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
32 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
47 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
35 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
90 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
84 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
78 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
58 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
114 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. ...
1
vote
0answers
84 views

Is there a quick-reference card for HLSL (DX9 or DX11)?

Does anyone know of a DX9 or DX11 counterpart to the GLSL quick-reference card from Khronos? The GLSL card is pages 8-11 here, and lists preprocessor directives, operators, types, and builtin ...
0
votes
1answer
74 views

Initializate float4x4 in vertex shader

Forgive me for my English. I am trying to create a 4x4 matrix in vertex shader, but it is not initialized correctly. Why is this happening? Vertex shader: ...
0
votes
1answer
73 views

Implementing a Deferred Renderer (Basic Understanding)

I am trying to implement a Deferred Renderer in Direct3D11. I am fairly new to this. I already bought a book: Practical Rendering & Computation with Direct3D 11. However, this book doesnt answer ...
0
votes
1answer
49 views

How can I ensure my Direct3D 11 shader scripts are not visible to the user?

Right now for my engine, I rely on pixel and vertex shader script text files that I load and compile when I need them. What I am wondering is, how can I store the shader scripts so that they are not ...
1
vote
0answers
36 views

HLSL - GPU Performance Impacts of degenerate triangles

The background: After refactoring some code last night and realising I have had an issue that may of been impacting GPU performance. My particle system uses the geometry shader to expand a single ...
0
votes
1answer
54 views

How would I implement render scaling in a DX11 game?

I would like to implement render scaling that could render a scene at a certain % of the window resolution. How would I do this? I've tried resizing a number of things, then resizing them up or down ...
1
vote
0answers
44 views

How to composite my UI render target over my backbuffer?

I have two render targets, the back buffer and another target that I am using to draw UI (at the moment this is only a quad on-screen). I have gone through the graphics debugging and checked that ...
0
votes
0answers
32 views

The texture blurs when the window size changes

When i change window size to big size, texture becomes blurred. When window is small, texture is normal. Anisotropic filter is used. With point filter Without mipmaps. Back buffer == desktop ...
0
votes
1answer
39 views

Swapping out Vertex Buffer Necessary for Terrain LOD?

I am using Directx 11 to try and implement terrain level-of-detail. I am trying the idea represented in this tutorial: http://www.rastertek.com/tertut18.html Which is split your terrain into nodes, ...
1
vote
1answer
69 views

Directx Compiling shader issue

I need to be able to compile a shader ".hlsl, .fx" in my DirectX app but here is the issue I can only specify 6 textures by there default path directory I don't want this I want to be able to set one ...
0
votes
1answer
481 views

How can I emulate Diablo 3's Isometric view using Perspective?

Using DX11, SimpleMath I am building a isometric game like Diablo 3 in 3D and I want to use a perspective camera that emulates their top down view. Projection Matrix: ...
0
votes
0answers
22 views

How do I lower the resolution scale in DX11?

I've tried a lot of things including lowering the backbuffer size but that causes terrible scaling that I can't really control. I've also tried rendering the scenes to a smaller texture then scaling ...
0
votes
1answer
42 views

VSSetConstantBuffers1 does not appear to be working

I'm experiencing something very strange here when using VSSetConstantBuffers1. I have a projection * world matrix that I'm sending to a constant buffer to rotate a triangle on an axis. When I do ...
0
votes
0answers
58 views

Problem with DirectX Rendering Terrain Mesh

I am learning how to render 3D using DirectX (using SharpDX for C#). I am generating a terrain mesh by utilizing the vertices and connectivity in a TIN (Triangulated irregular network). For the most ...
0
votes
1answer
134 views

Access a ID3D11Texture2D in another thread

I created a ID3D11Texture2D texture on a thread with DirectX graphics and I passed its pointer to a worker thread. I'm assured that the creator thread will no ...
0
votes
1answer
295 views

HLSL registers and slots

I'm learning DirectX11 and since I'm beginning to write some shader code I don't understand the difference between binding slots and HLSL registers. The shader model 5.0 introduced the keyword ...
0
votes
0answers
22 views

D3D11 Picking Problem

I can't for the life of me figure out what is wrong with my picking algorithm. It's from Frank Luna's DirectX 11 book and gives the same results as some online tutorials I found. Here is the code in ...
0
votes
1answer
63 views

What API is used and not used when DirectX 11 feature level is less than 11_0?

Currently, I am programming a DX11 engine using feature level 11_0+. I am wondering if I wanted to extend support for DX10, and DX9, what else would I have to do differently? If I make the feature ...
0
votes
0answers
35 views

Projective texturing in DirectX11

I'm trying to implement reflections on flat surfaces and render a simple scene with a reflection. So I'm rendering the scene from the point of view of a camera symmetrical to the reflection plane and ...
0
votes
0answers
71 views

Sampling the depth buffer and normalizing to [0,1] (DirectX)

I'm trying to visualize (for debugging purposes) the depth of a scene on a textured quad (I want to display the depth of a water pond onto the surface of the water). So what I'm doing is rendering the ...