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
45 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 ...
0
votes
1answer
20 views

Figuring out the exponent in a spotlight equation from the angle of a cone

I followed a tutorial on how to build a spotlight using DirectX. This tutorial uses a point light equation plus a line of code to limit the light to the shape of a cone. I have everything working, but ...
0
votes
1answer
42 views

Figure out why vertices are clipped

I am trying to figure out why, at sharp cutoffs in geometry, some vertices seems to be culled for some reason. I have a heightmap for demonstrating it like this And this is the result I get See the ...
1
vote
1answer
37 views

Calculating 3D character movement based on YAW and Pitch

I'm not sure how to calculate an XYZ immediately to my characters left based on the direction they are facing. I am learning to create a 3D game in Monogame on top of .Net Core 3.1 in c# using ...
1
vote
1answer
388 views

dx11 Rendering to target texture shows only clearcolor(ImGUI-Custom Game Engine)

Im trying to create a game view for my game engine using ImGui framework,however when i try to render texture,there is only clear color displayed on the screen. My plan Creating Render Target ...
0
votes
1answer
32 views

One DeviceContext per Material?

In D3D11, we have a DeviceContext, which represents the Renderpipeline. In Metal, we have a RenderPipelineState. In Metal, I cache the RenderPipelineState, it is the abstraction of a "material". Is ...
0
votes
0answers
44 views

Converting texture format

I am implementing glTF scene loading in my pet DirectX 11 renderer using tinygltf loader from Syoyo Fujita. When loading a texture, tinygltf loads its raw data in its native format (e.g. 4x8b uint in ...
1
vote
1answer
59 views

Do I need to keep the old ID3D11Device around after querying for ID3D11Device5?

When attempting to create a directx11 device using the newer ID3D11Device5 interface the compiler complains that ID3D11Device5** ...
0
votes
1answer
44 views

D3D11 Instancing - Help with sending instance data using two vertex buffers. First, for position and color and Second, for per-instance Matrix Data

So here is the premise: I have 2 vertex buffers buffers whose data and corresponding definition is as follows: Vertex 1: This one contains the per instance data ...
0
votes
1answer
40 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
57 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
116 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
102 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
62 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
29 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
222 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
17 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
58 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
55 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
59 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
30 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
37 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
216 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
49 views

Why specular reflection work only in center of virtual scene?

How to calculate this cpecular reflection? HLSL ...
1
vote
1answer
136 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
69 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
177 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
189 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
319 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
92 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
2answers
123 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
187 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
294 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
58 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
189 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
66 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
69 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
152 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
125 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
91 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
107 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
215 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
80 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
38 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
299 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
27 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 (...
1
vote
0answers
157 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
51 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
73 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 ...

1
2 3 4 5
14