Stack Exchange Network

Stack Exchange network consists of 174 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
1answer
10 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
0answers
22 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
60 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
113 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
38 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
15 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
71 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
votes
0answers
4 views

XMVector3Project is giving offset values when trying to convert world space coordinates to screen space coordinates

I am trying to convert world space coordinates to screen space coordinates for a 2D game so I can work on collisions with the edges of the window. The code I am using to convert world space ...
1
vote
1answer
17 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
23 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
60 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
24 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
0answers
21 views

Direct3D 11 incorrect screenshot (picture is moving)

I want learn how to create screenshots in D3D11. Here code: ...
0
votes
0answers
18 views

Load Textures Stored as Embedded Resources?

I am currently trying to re-write some of my loading methods and have come across the methods that load textures. I would like to store the texture files inside of the project instead of on the hard ...
0
votes
0answers
29 views

Stencil Rendering?

I may not be searching this properly, but I can't seem to find a decent tutorial on what I'd like to achieve. The only thing that seems to be close is this tutorial on reflections using the stencil ...
0
votes
0answers
13 views

Adding a property to vertex?

I am trying to add a new property to my Vertex structure so that I can modify objects in shaders based on a certain point in time. I've ran into an issue where ...
0
votes
0answers
15 views

Dynamic Vertex Buffer vs Pixel Shader?

I am writing a basic 3D line which has two major factors into what is displayed: A list of points. A point in time. In the case where the line does not care about the current point in time (a user ...
0
votes
1answer
29 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
46 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
34 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
59 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
80 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
44 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
38 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
67 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
68 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
60 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
55 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
42 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
31 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
0answers
30 views

BlinnPhongShader error looks like toon shading

I'm following a tutorial on Direct3D11 (SharpDX), and in the Tutorial it looks right: But in my Application it looks really really weird - there's no white specular highlight, and the shading changes ...
0
votes
0answers
49 views

Direct3D11 Constant Buffer empty in Pixel Shader - but it was set

Does anybody know why sometime constant buffers are just empty? I searched this for a long time now but i still got no help. Im using a perFrame, perObject and perMaterial Buffer. I set them witht he ...
0
votes
1answer
49 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
33 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
31 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
0answers
44 views

Creating a DirectX 11 Render Target crashes when a video recording tool is running

A player told me he wanted to make a video of my game, but when he starts the game it crashes every time. I bought the same video recording tool he is using to test it myself. I could reproduce the ...
0
votes
1answer
36 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
67 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
380 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
19 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
36 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
48 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
100 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
210 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
19 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
46 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
31 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
60 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 ...
0
votes
1answer
126 views

How to use RSSetScissorRects with multiple rects?

I try this and work only first rect. D3D11_RECT rc[2]; rc[0] = {0, 0, 16, 16}; rc[1] = {32, 32, 64, 64}; m_d3d11DevCon->RSSetScissorRects( 2, rc );