DirectX 11 is the latest release of Microsoft's collection of APIs which contain features to aid in game development.

learn more… | top users | synonyms (2)

2
votes
1answer
312 views

DirectX11 Swap Chain RGBA vs BGRA Format

I was wondering if anyone could elaborate any further on something that's been bugging me. In DirectX9 the main supported back buffer formats were D3DFMT_X8R8B8G8 and D3DFMT_A8R8G8B8 (Both being BGRA ...
2
votes
1answer
292 views

Resource management

I've come across a strange thing in DirectX 11: I'm trying to implement large scale volume visualization engine. My approach is like this: if the volume is HUGE (could not fit to GPU memory ...
2
votes
1answer
417 views

Compute Shader Memory Sharing

Ok guys I have had some pretty good success on this site but I feel that this is a pretty complex question. I am trying to do tile based deferred lighting using DirectX 11 and the compute shader. ...
2
votes
1answer
668 views

Writing to a structured buffer with a compute shader (D3D11)

I have some problems writing to a structured buffer. First I create a structured buffer that is filled with float values beginning from 0 to 99. Afterwards a copy the structured buffer to a CPU ...
2
votes
1answer
94 views

Why is it when I render a basic cube, my editor's grid changes too?

I have one HLSL file for DirectX11 that only has input layout for color and position. Then another HLSL file for the simple cube that has position, normal and textures. What I noticed is when I render ...
2
votes
1answer
543 views

How do you add rotation to particles?

Today I was working on a particle system and I can't figure out how to give the particle billboards a rotation (so to have them spinning clockwise or counter-clockwise while facing the player). I ...
2
votes
1answer
177 views

How can I render the whole faces instead of only the vertices? [closed]

I'm doing my master thesis in comparing DX9 LoD with DX11 Tesselation LoD. Therefore I use a ShaderManager that calls either the shader for the DX9 implementation, where the model is exchanged by the ...
2
votes
1answer
588 views

Render video from file to DirectX11 texture

Is there a way to render a video from file (avi, mp4, etc...) to a texture in a directx11 environment? If so, how?
2
votes
1answer
1k views

Question about mipmaps + anisotropic filtering

I'm a bit confused here and maybe someone can explain this to me. I created a simple test texture for my terrain which is nothing more than a solid green color with a black grid overlayed on top of ...
2
votes
2answers
832 views

Is the output from D3DCompile specific to one GPU, or not?

In Direct3D 11 there is a two-stage shader compilation process; you first pass the HLSL source code into D3DCompile, which outputs a "blob" of bytecode. You then take this blob and call ...
2
votes
1answer
2k views

Why can I not map a dynamic texture in D3D?

I am trying to map a Texture2D resource in DirectX11 via SharpDX. The resource is declared as a ShaderResource, with Dynamic usage and the 'Write' CPU flag specified. My call however fails with a ...
2
votes
1answer
2k views

I cannot update a shader constant via a constant buffer in DirectX 11

I've tried everything I can think of, but I cannot get a constant buffer to update a variable in my shader in DirectX 11. I followed the examples on msdn. I read and re-read the articles on constant ...
2
votes
1answer
58 views

HLSL compiled code

I've been using RenderDoc for debugging my shaders, and one thing that struck me as odd is that sometimes, after stepping through the debugger, I notice some vector attributes are interchanged, for ...
2
votes
1answer
86 views

How to blend multiple normal maps?

I want to achieve a distortion effect which distorts the full screen. For that I spawn a couple of images with normal maps. I render their normal map part on some camera facing quads onto a ...
2
votes
1answer
109 views

Is it ok to mix shader types?

The title might not be precise. Let's say I have one material consisting of vertex and pixel shader, another one consisting of vertex, geometry and pixel shader, and yet another one consisting of ...
2
votes
1answer
403 views

Early Z-test / depth-test in DirectX 11

As a DirectX noob i'm trying to wrap my head around depth buffers and specifically how pixel shaders are called for obscured pixels. From what i understand, the rasterizer calls the pixel shader for ...
2
votes
1answer
105 views

Can I count all the allocated textures in D3D11?

Is it somehow possible to get the count of all texture objects on a device?
2
votes
1answer
149 views

Emulate border color texture address mode efficiently

In WinRT the border color texture address mode is not supported. The best I came up with in emulating the border address mode, is doing this in my pixel shader: float4 tcol = tex.Sample(texSampler, ...
2
votes
1answer
534 views

Creating Input layouts for different vertex types

I'm still in the planning phase for a hobby abstract renderer, and i'm wondering how i should handle multiple vertex types and different shader inputs. (This is my first graphics project, so cut me ...
2
votes
1answer
2k views

DirectX / Instance Buffer - How To Use Instance Buffers To Enable Reuse of VertexBuffer Data?

I created a simple Model framework in C++ 11 so that the same model can be rendered in different parts of a scene. What I am trying to figure out is how to reference VertexBuffer data already "set" ...
2
votes
1answer
157 views

Does the feature level affect multisampling?

I'm using DirectX 11 with the feature level 9_3 even though my computer could run 11_0, but I want to support older hardware as well. I'm using CheckMultisampleQualityLevels to check whether multi ...
2
votes
1answer
179 views

Nine Patch Images in DirectX

In Android development I found nine patch images very useful to draw images that have a fixed border. When the image is scaled the inner part scales, but the border stays at a fixed size. I was ...
2
votes
1answer
410 views

How do you create a cbuffer or global variable that is gpu modifiable?

I'm implementing tonemapping in a pixel shader, for hdr lighting. The vertex shader outputs vertices with colors. I need to find the max color and save it in a global. However when I try and write ...
2
votes
1answer
258 views

Draw call optimization for multiple meshes in DirectX11

I have a large scene in a B3D model, which includes about 120 meshes as in the following pictures: Each mesh contain a vertex buffer and material information such as diffuse, specular, ambient... ...
2
votes
1answer
55 views

How To Set Constants Using ID3DShaderReflection

I got to the point where I am tired of hardcoding shaders and decided that it was now time to look into using ID3D11ShaderReflection to get data from the shader and set my shader's constant buffer ...
2
votes
1answer
142 views

Finding out the “width” and “height” of my screen after projection added

In a 2d game, doing collisions with the edges of your screen is easy. Your textures are a 1:1 mapping of your screen resolution because your verities are too.. if your x position is > than ( screen ...
2
votes
1answer
142 views

Tessellation cracks

i'm trying to a mesh tessellate with dx11 with the tessellation factor calculated by the size of the triangle and the distance to the screen. I do the same operation on the 3 edges of the triangle, ...
2
votes
1answer
367 views

Directx 11: emulating palette swapping with shader 5.0 and c++

i'm trying to swapping the colors using a texture as index and a second one as palette. Here is the full listing of the code: #include <windows.h> #include <windowsx.h> #include ...
2
votes
1answer
204 views

First Person Camera strafing at angle

I have a simple camera class working in directx 11 allowing moving forward and rotating left and right. I'm trying to implement strafing into it but having some problems. The strafing works when ...
2
votes
1answer
881 views

DirectX11 Gamma Correction

I am writing a game using SharpDX with DirectX11 and I have been reading that it is important to apply gamma correction to my engine in order to perform correct linear lighting calculations. So I ...
2
votes
1answer
108 views

Independent blending with DXGI_FORMAT_R16G16_SINT

I'm implementing direct volume rendering engine with volume bricking, but I'm stuck with this problem: For each volume brick I render to color render target [CRT] (for visualization) and to data ...
2
votes
1answer
140 views

Direct3d Techniques and Windows 8

Under Windows 8, what is the alternative to this code: technique11 Light0Tex { pass P0 { ... technique11 Light1Tex { pass P0 { ... And: Light1Tech = ...
2
votes
1answer
326 views

DirectX11 CreateWICTextureFromMemory Using PNG

I've currently got textures loading using CreateWICTextureFromFile however I'd like a little more control over it, and I'd like to store images in their byte form in a resource loader. Below is just ...
2
votes
1answer
444 views

Hemicube algorithm d3d9 or d3d11, float valued colors

The hemicube algorithm renders the scene to 5 sides of a half-cube, from the perspective of each polygon. Assume you place the hemicube around me and render to the 5 sides. The idea is, we can see ...
2
votes
0answers
99 views

DX 11 Specular Highlights in Deferred Renderer

I am currently implementing a deferred renderer in DX11.1. Right now I am having a problem that I can't seem to crack with specular highlights when I have multiple light sources. I keep a vector of ...
2
votes
1answer
149 views

Passing Input to Compute Shader

I am using D3D11 on D3D10 hardware, trying to get a very simple compute shader to run (my hardware supports cs_4_0). What is the best way to pass data to the compute shader? I've seen some samples ...
2
votes
0answers
118 views

1:1 mapping of texels to pixels with DX11 and multisampling and linear interpolation

Is it possible to get a 1:1 mapping of texels to pixels on a multisampled target in DX 11 with interpolation? It seems to me that the texture coordinate used in the shader is always one of the ...
2
votes
0answers
130 views

Stereo 3D: drawing 2D elements at apparent screen depth

I'm developing an application making use of DirectX11's stereoscopic features. At such I am not relying on nVidia's automatic implementation. That means I have to replicate a way to render 2d elements ...
2
votes
0answers
1k views

VS2012 C++: Unable to ID3D11Device::CreateVertexShader when loading compiled CSO file

I have been trying to get a tutorial Direct X 11 application running for some time now. I'm being stymied when I try to create the vertex shader. Setting the Direct X Debug setting reveals that I am ...
2
votes
0answers
586 views

Geometry Shader and Stream Output with Directx11

I am having trouble trying to send verticies generated in the Geometry Shader to Stream Output. What I am trying to accomplish is to generate verticies from the Geometry Shader and store them to a ...
1
vote
3answers
159 views

What is the minimum of shader I need to use to run basic calculation on GPU?

I read, that the Hull Shader, Domain Shader, Geometry Shader and Pixel Shader can be used optional. So, is the Vertex Shader optional too? If no: What does a basic Vertex Shader look like? Just like a ...
1
vote
2answers
515 views

Should the world transformation matrix be stored in a constant buffer when rendering?

Generally when rendering objects you would: Apply world transformation to go from object space to world space Apply view transformation to go from world space to camera space Apply perspective ...
1
vote
3answers
567 views

One index buffer with multiple vertex buffers?

I noticed that there's IASetVertexBuffers() to set multiple vertex buffers at once but there's only IASetIndexBuffer() to set one index buffer. So I assume that I can simultaneously only have one ...
1
vote
1answer
362 views

Which coordinate space is the canonical default for each shader pipeline stage?

I'm working with Direct3D 11 and HLSL. I use four different shaders (vertex, hull, domain and pixel). I always have troubles using the right coordinate space in my shaders. Could somebody identify ...
1
vote
1answer
507 views

Determine the stride of a DirectX Texture2D line?

Is there a way to determine, or preferably calculate/predict, the the stride of a line of a DirectX 11 Texture2D resource when using SharpDX? (E.g. Can we say the stride of a line is always a power ...
1
vote
1answer
78 views

Static constants set to default value in HLSL

I'm using dx11 and I'm working on SSAO. I am having wierd results, so I tried debugging it using RenderDoc and stepping through the pixel shader log, all the values of the static array seems to ...
1
vote
1answer
128 views

Estimated framerate for custom engine?

I've been writing my own engine with C++ and DirectX 11. I've got 3d models loaded in with diffuse maps, normal maps, and shadows. There's other things with the engine but my question doesn't pertain ...
1
vote
2answers
106 views

Texture2DArray in Directx11 with different formats

I'm trying to create a texture2DArray from multiple of images, each of which has different formats, and I got the following error from the DirectX11 debug layer. D3D11 ERROR: ...
1
vote
3answers
265 views

How do I correctly multiply an XMMATRIX by a scalar?

Using DirectXMath and its XMMATRIX structure in C++ and Direct X 11, how does one multiply that matrix structure by a single float scalar? I want to implement the operation B = A * f; where A and B ...
1
vote
1answer
158 views

Difference between texture arrays and multiple single textures?

I've just learnt that DirectX 10 and above have a feature called "texture arrays". Which, basically, is just a normal array of textures (shader resources) which in a shader is declared like: ...