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)

0
votes
1answer
428 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
470 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
144 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
478 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
271 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
435 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
322 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
170 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
1k 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
152 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
270 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
206 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
118 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
498 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
271 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
174 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
770 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 ...
1
vote
1answer
933 views

Why can't my .exe find my .fx file?

I'm having a problem with my .fx file in my D3D 11 application. I can run the application just fine from Visual Studio, but when I run the .exe it fails when trying to load the .fx file. I've ...
0
votes
1answer
208 views

Running advanced floating point calculations on the GPU?

I want to learn how to use AMD Stream and NVIDIA CUDA (PhysX) to calculate things such as locations. I have not yet found where to get the SDK for these (I can't test the CUDA things because I have a ...
0
votes
0answers
66 views

Transform a Screen Delta

I have a delta in screen coordinates that I want to transform to a 3d delta in world space. The delta is in this case a movement across the (x,y) coordinates in screen space on the near projection ...
3
votes
1answer
237 views

What happens to a D3D11 application when Windows hibernates?

In D3D9 there was the concept of a "device reset". When a device reset occurred textures created with D3DPOOL_DEFAULT had to be recreated, but textures created with D3DPOOL_MANAGED didn't, because, ...
2
votes
0answers
980 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
1answer
135 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
309 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 ...
3
votes
1answer
323 views

DirectX Unproject troubles

I have an orthographic projection and I try to unproject a point from screen space. Following are the view and projection matrices: var w2 = ScreenWidthInPixels/2; var h2 = ScreenHeightInPixels/2; ...
5
votes
1answer
634 views

Tessellation Texture Coordinates

Firstly some info - I'm using DirectX 11 , C++ and I'm a fairly good programmer but new to tessellation and not a master graphics programmer. I'm currently implementing a tessellation system for a ...
5
votes
2answers
1k views

ConsumeStructuredBuffer, what am I doing wrong?

I'm trying to implement the 3rd exercise in chapter 12 of Introduction to 3D Game Programming with DirectX 11, that is: Implement a Compute Shader to calculate the length of 64 vectors. Previous ...
1
vote
1answer
133 views

Texture the quad with different parts of texture

I have a 2D quad. Let say it's position is (5,10) and size is (7,11). I want to texture it with one texture, but using three different parts of it. I want to texture the part of quad from x = 5 to x ...
3
votes
1answer
320 views

Mapping dynamic buffers in Direct3D11 in Windows Store apps

I'm trying to make instanced geometry in Direct3D11, and the ID3D11DeviceContext1->Map() call is failing with the very helpful error of "Invalid Parameter" when I'm attempting to update the ...
1
vote
3answers
210 views

relationship between the model and the renderer

I tried to build a simple graphics engine, and faced with this problems: i have a list of models that i need to draw, and object (renderer) that implements IRenderer interface with method ...
1
vote
0answers
554 views

Need help transforming DirectX 9 skybox hlsl shader to DirectX 11

I am in the middle of implementing a skybox to my game. I have been following this tutorial http://rbwhitaker.wikidot.com/skyboxes-2. I am using MonoGame as a framework and in order to support both ...
1
vote
1answer
194 views

Direct2D gamma correction

I'm using direct2d and direct3d together and having an issue with gamma correction. My direct3d backbuffer is using an SRGB format and when I render images from direct2d onto the direct3d surface, ...
4
votes
2answers
574 views

Deferred contexts and inheriting state from the immediate context

I took my first stab at using deferred contexts in DirectX 11 today. Basically, I created my deferred context using CreateDeferredContext() and then drew a simple triangle strip with it. Early on in ...
6
votes
1answer
588 views

Partial Shader Signatures HLSL D3D11 C++

I had been debugging a problem I was having in a single shader file with 2 functions in it. I'm using DirectX 11, vs_5_0 and ps_5_0. I have stripped it down to its basic components to understand what ...
0
votes
1answer
930 views

Building View Matrix in Direct3D11

Am I doing it right? I converted this. m_ViewMatrix = XMMatrixLookAtLH(XMLoadFloat3(&m_Position), lookAtVector, upVector); to this one. XMVECTOR vz = XMVector3Normalize( lookAtVector - ...
4
votes
2answers
498 views

How do I use D3DXVec3Unproject with D3D11?

I'm having a small issue with D3DXVec3Unproject. I'm currently using Direct3D 11 and not 10, and the signature for this function is: D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, CONST D3D10_VIEWPORT ...
3
votes
2answers
323 views

Having the same texture data in different ID3D11Texture2D

Sorry if this has been answered elsewhere - I'm rather new to DX. My question concerns conservation of resources - specifically textures in VRAM. I assume that upon returning from a call to ...
1
vote
1answer
512 views

ERROR #342: DEVICE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND

I've stared at this for at least half an hour now and I cannot figure out what directx is complaining about. I know this error normally means you put float3 instead of a float4 or something like ...
0
votes
2answers
2k views

SharpDX: best practice for multiple RenderForms?

I have an XNA app, but I really need to add multiple render windows, which XNA doesn't do. I'm looking at SharpDX (both for multi-window support and for DX11 / Metro / many other reasons). I decided ...
5
votes
1answer
1k views

Is the new windows 8 sdk usable with visual c++ express 2010 on windows 7?

This is inspired by and related to Is the June 2010 DX SDK really the latest? asked recently but it's a different question. I won't likely be purchasing the full visual studio 2012 for C++, I intend ...
0
votes
4answers
1k views

What is the format of DXGI_FORMAT_D24_UNORM_S8_UINT?

I'm trying to read the values in a depth texture of type DXGI_FORMAT_D24_UNORM_S8_UINT. I know this means "24 bits for depth, 8 bits for stencil" "A 32-bit z-buffer format that supports 24 bits for ...
1
vote
0answers
91 views

InputLayout handling [duplicate]

Where are you supposed to store InputLayout? Suppose i have some basic structure like. class Mesh { List<MeshPart> MeshParts } class MeshPart { Effect Effect; VertexBufferBinding ...
6
votes
1answer
446 views

How do I get FEATURE_LEVEL_9_3 to work with shaders in Direct3D11?

Currently I'm going through some tutorials and learning DX11 on a DX10 machine (though I just ordered a new DX11 compatible computer) by means of setting the D3D_FEATURE_LEVEL_ setting to 10_0 and ...
2
votes
1answer
389 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 ...
13
votes
2answers
1k views

Is it possible to construct a cube with fewer than 24 vertices

I have a cube-based world like Minecraft and I'm wondering if there's a way to construct a cube with fewer than 24 vertices so I can reduce memory usage. It doesn't seem possible to me for 2 reasons: ...
1
vote
0answers
61 views

DirectWrite Producing Strange Artifacts?

I've written the basis to my UI system around Direct2D. I like it because it's fast and easy to use (even if I had to do some messy work to get it to work with DirectX11). However, I notice when using ...
3
votes
4answers
769 views

How can I view an R32G32B32 texture?

I have a texture with R32G32B32 floats. I create this texture in-program on D3D11, using DXGI_FORMAT_R32G32B32_FLOAT. Now I need to see the texture data for debug purposes, but it will not save to ...