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
93 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 ...
3
votes
2answers
301 views

Why is there a different set-constant-buffer function for every shader type?

Why are there VSSetConstantBuffers(), GSSetConstantBuffers(), PSSetConstantBuffers() (and so on) instead of just one SetConstantBuffers() for all shaders? Should I have completely separate constant ...
3
votes
3answers
893 views

What are registers in HLSL for?

I've read this document about HLSL registers, but it's more of a syntax description and not a purpose explanation. What are registers in HLSL, actually? How and when do I use them? What happens if I ...
0
votes
1answer
486 views

Constant buffer content packing

I've read this: http://msdn.microsoft.com/en-us/library/windows/desktop/ff476898%28v=vs.85%29.aspx#Shader_Constant_Buffer but there's not much information in it. When creating a constant buffer do I ...
5
votes
1answer
375 views

Multipass shaders and switching between passes

As mentioned here Effects should be avoided in DX11. If I understand correctly, that includes techniques and passes defined in *.FX files. So when doing a multipass shader (like the always-mentioned ...
1
vote
1answer
311 views

How to disable mipmapping?

I'm making a 2D game in which I create some textures dynamically for displaying as simple 2D quads. To achieve this, I call ID3D11Device::CreateTexture2D that requires a D3D11_TEXTURE2D_DESC. typedef ...
1
vote
1answer
396 views

Compiler cannot find some DX11 types (but can find DX10)?

my problem is probably trivial but I'm new to DX and have some trouble. I've found a code snippet (of a Shader class) with ID3D10Effect and ID3D10EffectTechnique types but I'm using DX11 so I changed ...
2
votes
1answer
97 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
129 views

Does it matter where I initialize Directx11's shader constant buffer?

Should I initialize it before Map() or before `Unmap()? Does it make a difference?
-1
votes
1answer
201 views

Are there any open-source Direct X code-bases that I can look at to learn from as a beginning Direct X and graphics programming student? [closed]

I'm a third-year university student and I've recently begun studying Direct X 11. Mostly I've been following the samples from the SDK and reading a lot out of the MSDN. Although I have a decent ...
1
vote
1answer
114 views

When would a GPU need to write data to a vertex (or other) buffer?

I'm trying to understand why, when and how a GPU would need to write data to some buffer inside its own Video Ram. In Direct3D 11, there are two flags that concern this, which are ...
4
votes
2answers
348 views

How can I use shaders to make a square have a waving effect?

I'm new to using shaders to do some fancy effects and I'm struggling with them. I'm using DirectX 11 and HLSL. I have this square in the middle of the screen: It's just a square that I've created ...
1
vote
1answer
224 views

Do textures that are inside a shader resource need to be explicitly released too? (DirectX 11)

I have a ID3D11Texture2D (that I've created manually) inside a ID3D11ShaderResourceView. When I want to Release() the resource view, do I need to Release() the texture that it is inside too? Or is it ...
1
vote
1answer
199 views

changing depth stencil state in DirectX11

An example from Frank D Luna's 3d Game Programming with Dx11 shows the following effect technique: technique11 DrawTech { pass P0 { SetVertexShader( CompileShader( vs_5_0, DrawVS() ) ); ...
1
vote
1answer
315 views

Driver error when using multiple shaders

I'm using 3 different shaders: a tessellation shader to use the tessellation feature of DirectX11 :) a regular shader to show how it would look without tessellation and a text shader to display ...
0
votes
1answer
206 views

How do I implement my old OpenGL-based gfx_render_triangle_list using DX11?

I am working at a game that has lots of procedural content. I had built a game engine using OpenGL that handles everything needed for creating a basic 2D game, sprites, primitives, blending, polygons ...
7
votes
1answer
788 views

DirectX11 without window attached?

I just wonder, if it's possible to initialize and use DX11 or DX9 for offscreen rendering only - meaning with no attached window. My intention is to do some GPU benchmarking before opening actual ...
2
votes
1answer
172 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
141 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, ...
1
vote
1answer
3k views

Creating a simple 2d engine (C++), best way to create an Sprite class?

Since MS announced that they are not give more support to XNA , for me was an opportunity to start to learn DirectX , so i wanted to learn DX11, i was following this tutorials ...
3
votes
1answer
367 views

DXGI and 2+ full screen displays on Windows 7

I am developing a program that needs two full screen Direct3D dispalys. According to the documentation I should create the swap chains in windowed mode and then switch to full screen mode. While this ...
1
vote
2answers
533 views

How to obtain a pointer to the compiled shader in D3D11

My shader creation code looks like this. std::shared_ptr<IRenderUtility::IVertexShader> D3D11RenderUtility::CreateVertexShader(IShader::INIT_DESC & desc) const { HRESULT result; ...
4
votes
2answers
314 views

Geometry shader worldviewprojection

I'm writing a simple geometry shader to create 3D "primitives" in place of a single point. I am performing all of the world-view-projection conversions within the geometry shader after creating the ...
2
votes
1answer
484 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 ...
-1
votes
2answers
2k views

Problem rendering cube using DirectX 11

I'm toying with DirectX 11 and am trying to render a simple cube, but I can't seem to get anything to show (except the clear color, which is a good sign I suppose...) Everything seems to be working, ...
5
votes
1answer
2k views

Different shaders for different objects DirectX 11

I am learning Direct3D 11, and in all basic tutorials I found on shader writing, Vertex and Pixel shaders are written so they transform whole scene same way. Tutorials like render cube with texture... ...
3
votes
1answer
1k views

Proper use of Dynamic Vertex Buffers for rapid update

I am creating a C#/SharpDx/DirectX10 application to plot line charts in a fast way. I have a prototype which uses Dynamic Vertex Buffers and fills a fixed-size buffer, say 1M vertices, with new data ...
0
votes
1answer
118 views

Rendering an object more than once

Right now I'm facing the issue of rendering the same objects more than once in Directx 11, as the object has: A diffuse shader A directional lighting shader A texture shader Now the final color ...
2
votes
1answer
477 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?
0
votes
1answer
1k views

Loading a vertex shader compiled by Visual Studio 2012

I've got an extremely simple vertex shader that Visual Studio 2012 compiles into a .cso file. Now I want to load this file and create a vertex shader on the graphics device using the ...
0
votes
1answer
381 views

Stencil buffer and transparent pixels

Do transparent pixels cause a stencil buffer operation (increment, decrement, etc.) to be executed? My understanding was that only opaque pixels cause a stencil buffer operation, transparent pixels ...
0
votes
2answers
437 views

Multipass shader in DirectX 11

As far as I understand for DirectX11 it is recommended to have multiple single pass shaders, so the the method with multiple passes in one shader file is deprecated. Is my understanding correct and ...
-1
votes
1answer
134 views

How To Buffer Many Vertex, Geometry, and Pixel Shaders

What is the best way to buffer Vertex Shaders, Pixel Shaders, etc into the Device/Device Context without having to reload them from the filesystem every time? ID3D11Device::CreateVertexShader ...
3
votes
1answer
437 views

Constant Buffer size mismatch on PS, fine on VS and GS

I have the following C/C++ struct: struct ShadowMapCB { Math::Matrix4 cropMatrix[4]; Math::Matrix4 textureMatrix[4]; float splitPlane[4]; }; and my HLSL constant buffer: ...
3
votes
3answers
2k views

How to Bind Multiple Shapes/Models to One Vertex Buffer?

If I have two Vertex Arrays, one for Square, and one for Triangle; what is the best way to bind them to the VertexBuffer? What are the patterns used to write multiple vertices to the VertexBuffer? ...
3
votes
1answer
261 views

Per Instance Textures, and Vertex And Pixel Shaders?

How do you implement per instance textures, vertex shaders, and pixel shaders? Given: 1. Two different model templates in Vertex Buffer, Square & Triangle 2. Instance Buffer with [n] instances of ...
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" ...
1
vote
1answer
391 views

DirectX post-processing pipeline

I'm trying to make a simple post processing pipeline, depicted as follows with 3 effects in this case: |------| |------| |------| I ...
0
votes
1answer
301 views

Weird shader compiler error

I am trying to draw a full screen quad without a vertex buffer. SV_VertexID should do the trick, although I get a weird error in my shader on the following line: PS_IN VS(uint VertexID : ...
3
votes
1answer
166 views

Depth Stencil buffer mandatory?

If I disable depth and stencil buffering, do I have to create and set the depth stencil buffer?
7
votes
2answers
967 views

D3D/DXGI handle fullscreen transition

I have a D3D11 application, and I want to add proper fullscreen suport. Now I can let DXGI switch my window to fullscreen for me, and I'm under the impression that DXGI will take care of everything ...
1
vote
1answer
1k views

DX11 application running on Windows XP using only DX9?

I'm developing an application that utilizes DX11. I know that DX11 is only available on Windows 7 (and Vista with SP). I wonder if there is some way to run the application on Windows XP and use only ...
2
votes
1answer
148 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 ...
0
votes
2answers
255 views

HLSL compiler specification (optimizations)

Can I read somewhere about optimizations that HLSL compiler performs? For example, in some codes I have different variables that get a constant value (just to let myself adjust the shader with other ...
1
vote
1answer
203 views

Is my idea of how to use matrices to layer 2D on top of 3D correct?

I'm new to using matrices, so I'd like some input on whether I've understood the use of them in the context described in the title. Right now I have a small Direct3D 11-based game engine which ...
0
votes
1answer
114 views

How do I get buffers from another class for CreateBuffer

I believe this is not strictly specific to DirectX but just to pure c++ language problem. I have a class (simplified): class A { public: ID3D11Buffer* getVBuffer() const { return ...
1
vote
2answers
452 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
1answer
246 views

How can I render primitives to pixel coordinates?

I'll emphasize that I am very new to graphics programming. I've been using XNA up until now and I've been looking for a way to build simple 2D functionality with textured quads. I'm sort of starting ...
2
votes
1answer
168 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 ...
4
votes
1answer
700 views

How do I use threads together with DirectX11?

I have only found the documents on MSDN: http://msdn.microsoft.com/en-us/library/windows/desktop/ff476884(v=vs.85).aspx Although it doesn't say anything about creating them, it mentions that device is ...