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

d3d11 compute shader compile failed

I want to comiple a compute shader from text, but it failed with 0x8e16d728 error. ...
user avatar
1 vote
1 answer
37 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 ...
user avatar
  • 126
0 votes
1 answer
33 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 ...
user avatar
  • 101
0 votes
0 answers
25 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 ...
user avatar
  • 27
2 votes
0 answers
51 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 ...
user avatar
0 votes
1 answer
19 views

ZBias trouble with alternative cubemap shadow method

I find two methods to produce cubemap for shadow both using the same geometry shader to draw each of the 6 faces. The first one writes in the depth buffer only and is used like this (really I thanks ...
user avatar
  • 27
0 votes
0 answers
35 views

D3D11 Clarification about Vertex Normals, Face Normals and Normal mapping

I really need some clarification what I actually need, and need to do in my game engine I've been working on and off on for quite awhile. I've been using D3D11 to render and I'm quite troubled about ...
user avatar
0 votes
1 answer
31 views

How do I offset a texture pointer in order to store an array of D3D11_SUBRESOURCE_DATA?

I'm attempting to load a sequence of frames from a GIF into a Texture2DArray using stbi_load_gif_from_memory which returns a ...
user avatar
  • 1,976
0 votes
0 answers
18 views

Problem with geometry shader and srteamout (directx11)

I'm starting with geometry sahder to simply transform vertex pos/norm in world space and pass this to ouput vertex buffer for sequential rendering. A unique original model is created with position ...
user avatar
  • 27
0 votes
1 answer
17 views

Deffered shader with alpha : orient target writing

I have this bit of shader code to orient SV_target writing depending on alpha value for SV_Target0 : color0 = (input.a == 1)? float4(some value) : float4(0,0,0,0); for SV_Target1 : color1 = (input.a ...
user avatar
  • 27
0 votes
0 answers
14 views

After drawing the scene with the deferred shader, I want to draw an object to be alpha blended, but it doesn't work

After drawing the scene with the deferred shader, I want to draw an object to be alpha blended, but it doesn't work. This is the current drawing order ...
user avatar
0 votes
0 answers
43 views

Question about making alphamaps

I made an alpha map by picking terrain for texture splatting. Using only one texture was successful, but trying to use more than one texture caused a problem. The second alphamap has the data of the ...
user avatar
0 votes
0 answers
31 views

Applying HLSL Pixel Shader to RenderTarget in Directx11

I'm developing a unity native plugin and I'm new to DirectX11. In unity I pass input render target, depth and output render target to C++ side. ...
user avatar
0 votes
0 answers
13 views

Unable to draw Primitives on Texture in SharpDX

I have a little problem with rendering in my SharpDX Direct11 App. I had being tested rendering scene on a texture, and then draw this texture on the backBuffer. ...
user avatar
0 votes
1 answer
25 views

Depth does not writes in texture

I am doing volumetric fog. In the first pass I write down the depth of the front polygons of the cube, in the second pass I write down the depth of the back polygons of the cube, in the third pass I ...
user avatar
  • 11
0 votes
0 answers
24 views

Do D3D11 / Metal / Vulcan programs commonly use upload/buffer threads?

I am porting an older OpenGL ES 2 program to more modern APIs (DX11/Metal/Vulkan, let's say.) The existing code uses a dedicated uploading/buffering thread (via a "share context") to upload ...
user avatar
  • 101
0 votes
1 answer
43 views

Cascaded Shadow Maps - Handling shadows that cast into different cascades

For example I have 3 shadow cascades. A shadow is cast by a hill in my 2nd cascade, but the shadow itself is cast into not only the 2nd cascade but also the 1st. In the shader program, in order to ...
user avatar
0 votes
1 answer
66 views

I can't render faces properly in my DirectX11 project

For some reason, only back-faces are rendering, even if I set the rasterizer and stencil buffer and state to any values. Setting D3D11_CULL_NONE, ...
user avatar
1 vote
2 answers
148 views

D3D11 wrong full screen resolution

I am currently writing a Directx 11 engine and have problems with the resolution when switching to exclusive fullscreen on my 1440p monitor. If i call SetFullscreenState(TRUE, NULL), the screen ...
user avatar
  • 21
0 votes
0 answers
23 views

Need an approach for mounting turrets

I'm working on a game with the ability to customize the type of turrets on your starship. My question is how would I go about positioning the turret mesh at the hardpoint locations. Do I need to ...
user avatar
0 votes
0 answers
62 views

Use VSSetConstantBuffers or VSSetConstantBuffers1?

I am wondering what is the performance difference between 2 constant buffer strategies. For example, in my scene, there is a lot of objects. Some of them are static and others are not. Strategy 1: ...
user avatar
0 votes
1 answer
65 views

Is it a good idea to swap between a lot of different shader states during runtime?

What I'm trying to do is create a specific shader states(depthstencil, blend, and rasterizer)...
user avatar
1 vote
1 answer
80 views

Can't create Render Target with CreateDxgiSurfaceRenderTarget

I'm trying to create ID2D1RenderTarget to be used for writing text with DirectWrite. I tried two methods but can't get it working, both yield "The parameter is incorrect" error code. In the ...
user avatar
1 vote
1 answer
286 views

Map() fails when reading back GPU Texture

I need to read back a GPU texture (stored in the GPU as D3D11_USAGE_DEFAULT). I am doing this via creating a staging ID3D11Texture. The whole application is running ...
user avatar
  • 113
3 votes
1 answer
201 views

In game development, what aspects to consider when choosing a 32-bit architecture over a 64-bit architecture?

I was developing a graphics engine from scratch using Direct3D11 and some APIs, but I stumbled in a situation where it would beneficial to me to use a certain library, but it's binaries are only ...
user avatar
2 votes
0 answers
16 views

How to make use of resizable BAR?

From what I understand, resizable BAR (aka. Smart Access Memory) makes it possible to access the whole GPU memory from CPU code. But how can a programmer make use of that? Is there an example or code ...
user avatar
  • 173
1 vote
1 answer
505 views

How to sample a TextureCube texture

I'm converting old shader code to be a bit more modern. So far this works out great, but I'm having a though time figuring out how to convert shader code that works with cubic textures. In the old ...
user avatar
  • 10.2k
0 votes
2 answers
144 views

How to vertically flip a DDS texture on import?

I have a program capable of rendering 3D graphics using Direct3D11 and it is currently compatible with two different texture formats, TGA and DDS. The code to read and load a TGA texture in memory I'm ...
user avatar
0 votes
1 answer
105 views

What to do with d3dx9math.h when converting to DirectX11?

I'm converting an old game from DirectX9 to DirectX11 and I have a question: What I should use instead of d3dx9math.h? Do I have to convert everything for ...
user avatar
0 votes
0 answers
75 views

ID3D11DeviceContext:::CopyResource is bottleneck in my particle system

I have a snow particle system and I use simplex noise for creating turbulence effect. At first, I made calculations on the CPU, and the simplex noise calls obviously were the bottleneck. The ...
user avatar
1 vote
0 answers
59 views

Blue color instead of alpha using Alpha Blending

I am testing rendering with alpha blending state according to this guide. The aim is to add snow on terrain grass texture. Finally, I got the wrong result -- the blue color fillings up all alpha = 0 ...
user avatar
0 votes
1 answer
60 views

How does the InsideTessFactor affect points of a triangle in a DirectX11 domain shader?

I found this example in this Chinese language document. In the image above, I can understand the value of SV_TessFactor because for every side of this triangle, ...
user avatar
1 vote
1 answer
187 views

Borderless windowed (fake fullscreen) mode doesn't cover the entire screen

I'm using Direct3D 11 running on Windows 10 20H2, but have seen this problem going back to Windows 7. I'm adding borderless windowed (fake fullscreen) mode support, and all of the online resources I ...
user avatar
0 votes
1 answer
131 views

Peter Panning Depth Bias Problem

No matter how I experiment with RasterizerState Depth Values, I always get a detached shadow which is called peter panning. Ive even adjusted the near plane for the light camera. It always seems to ...
user avatar
1 vote
0 answers
83 views

Setting an array in the HLSL shader

I have a array of six float4x4's in my shader. cbuffer pseudeocb { float4x4 Mypseudo[6]; }; I need to set these in my code. ...
user avatar
0 votes
1 answer
130 views

Where is the Mclip matrix & how do I set it?

According to this article, the Mclip matrix will be used, but I didn't find any function in Directx11 to set this matrix. How do I set it?
user avatar
0 votes
0 answers
87 views

XNA games C# application executable work on one win7 not the other one

Our company wrote a game in XNA studio 4 almost ten years ago. we try to reinstall it in win7 with only the executable. Both installed XNA Game Studio 4.0. Below is the environments parameter I can ...
user avatar
  • 1
0 votes
1 answer
103 views

Using ID3D11DeviceContext::Map to update a dynamic texture results in offset or incomplete data

Background I'm generating a memory texture at load time to store the offsets into a texture atlas for a tilemap as described here Any way to combine instantiated sprite renderers into one texture so I ...
user avatar
  • 1,976
0 votes
1 answer
701 views

Has the Geometry Shader been abandonded?

Advice says to either limit use or not to use it at all. Friday Facts #251 - A Fistful of Frames | Factorio: We tried it, and it worked great. We got some speedup due CPU needing to prepare less ...
user avatar
  • 1,976
0 votes
0 answers
72 views

How do I store the texture coordinates for thousands of tiles in a tile mesh on the GPU and not just the most recent?

This is a follow-up to this question. The geometry shader is performing fantastically, but now I've lost the ability to display more than one tile type at once (the last one in the visible array is ...
user avatar
  • 1,976
0 votes
1 answer
197 views

Geometry shader-generated tile mesh isn't any faster than CPU-generated version

For practice, I'm writing a Rogue-like. In order to speed up tile rendering I have a dynamic Mesh/MeshBuilder that collects all the vertices of the visible tiles' quads (4 vertices per tile: position, ...
user avatar
  • 1,976
1 vote
1 answer
101 views

How to disable present function when window is invisible to user. Win32 & DXGI

When my game window is hidden say by minimising it or hitting Ctrl, Alt, Del. I get the DXGI error: 0x087A0001 : The Present operation was invisible to the user. I've tried wrapping the present ...
user avatar
1 vote
1 answer
36 views

How to handle normal vector when duplicating vertex?

I'm currently developing a UV mapping, such as the UVW Map Modifier in 3ds Max (Not Unwrap UVW Modifier). I split the vertices of the model in the form of a primitive shape (Box, Plane, etc.) and set ...
user avatar
  • 13
2 votes
2 answers
723 views

Getting data from the backbuffer D3D11 using Map [duplicate]

I'm having some trouble using ID3D11DeviceContext::Map() correctly. Here's the whole function so far: ...
user avatar
3 votes
2 answers
249 views

Different textures inside and outside a cube in DirectX 11

I want different textures for the outside and inside of a box (cube). The image below shows what I want to achieve. It is kind of an open box, where we can see a different texture inside: I was ...
user avatar
0 votes
0 answers
63 views

Same image in both eyes of VR HMD results in wrong 3D effect

I am trying to mod in VR support for a game without VR support via OpenVR as it proved to be the easiest one to implement with the least amount of issues, i don't think my issue is related to OpenVR ...
user avatar
  • 1
2 votes
1 answer
386 views

What is the proper strategy to manage vertex buffers?

I have created a large variety of shaders for my game engine for different use cases. The vertex input for the shaders depend on what I want to do with them. For example, if I want to just render the ...
user avatar
0 votes
1 answer
117 views

Creating Compute Shaders throws E_INVALIDARG exception in SharpDX

I've recently been working on a small helper for creating and using compute shaders in C# along with Monogame/XNA. My end goal is simply to have compute shaders working in C#. My main issue is as such:...
user avatar
  • 13
0 votes
1 answer
182 views

Direct3D Constant Buffer not updating

I started learning Direct3D a week ago and I've been following many tutorials but after I got to the point where I had to create a Constant Buffer I got stuck, the creation of the buffer seems to be ...
user avatar
0 votes
2 answers
56 views

Have both Cubemaps and TextureArray in a single texture register?

I want to have both Point Lights, aswell as Spot Lights. For the Point Lights I have a TextureCubeArray and for the Spot Lights I have a Texture2DArray. Is it possible to combine these two into a ...
user avatar
  • 621

1
2 3 4 5
15