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)

4
votes
1answer
648 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 ...
0
votes
1answer
171 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 ...
3
votes
1answer
2k views

DirectX11, how to properly update a staging buffer with a structured buffer's count using CopyStructureCount

Alright, I'm not quite sure what is going on with my code at the moment. I'm currently getting around to defining behavior for my particle system, and to better do this I need to know how many ...
0
votes
0answers
60 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
222 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
858 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 ...
3
votes
1answer
280 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; ...
1
vote
3answers
532 views

How do you rotate a cube map?

I'm looking for suggestions on this Say you have a cube map. You want to rotate it as efficiently as possible. You can render the cube map, rotate the camera, and render the scene to another cube ...
4
votes
2answers
966 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 ...
5
votes
1answer
545 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 ...
1
vote
1answer
130 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
295 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
202 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 ...
27
votes
3answers
8k views

How does hardware tessellation work?

I would just like someone to explain in relativly clear terms how hardware tessellation works considering it is the new buzzword with DX11. Thanks.
1
vote
0answers
490 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
176 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, ...
6
votes
1answer
531 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
849 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 - ...
0
votes
1answer
1k views

Changing the culling mode in the HLSL effect

I'm writing a cel-shading effect in HLSL and Direct3D 11, and I need to be able to flip the culling mode on the outline pass of the effect. I know you do this in XNA by setting CullMode to CW or CCW ...
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 ...
4
votes
2answers
444 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
300 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 ...
2
votes
1answer
365 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 ...
1
vote
1answer
462 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
1answer
499 views

How to set sprite source coordinates?

I am creating own sprite drawer with DX11 on C++. Works fine but I dont know how to apply source rectangle to texture coordinates of rendering surface(for animation sprite sheets) ...
2
votes
2answers
644 views

How do I keep a triangle strip between geometry shader invocations?

I'm using a small geometry shader to build a "ribbon" from a set of points. For each point, I create 4 vertices that represent a section of the ribbon: [maxvertexcount(4)] void GS( point GS_Input ...
3
votes
3answers
682 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 ...
14
votes
4answers
3k views

how does HDR work?

I'm trying to understand what HDR is and how it works. I understand the basic concepts and have an slight idea of how it is implemented with D3D/hlsl. However it's still pretty foggy. Say I'm ...
3
votes
1answer
2k views

Does the latest DirectX SDK support both Direct3D 9.0c and 11?

1) What is the latest version of DirectX SDK? 2) For my purposes I need DirectX 9.0c SDK and DirectX 11 SDK. Do I need to install these libraries separately or last DirectX SDK package contains both ...
6
votes
1answer
423 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 ...
0
votes
2answers
224 views

DX11 - Weird shader behavior with and without branching

I have found problem in my shader code, which I dont´t know how to solve. I want to rewrite this code without "ifs" tmp = evaluate and result is 0 or 1 (nothing else) if (tmp == 1) val = X1; if (tmp ...
4
votes
1answer
313 views

Does changing a Rasterizer State affect every object (model) on the screen?

Quick easy question. When setting a Rasterizer State (like for example wireframe).....does that affect every object (model) on the screen? For example, let's pretend I have 2 cubes. I use: ...
5
votes
3answers
5k views

What happened to .fx files in D3D11?

It seems they completely ruined .fx file loading / parsing in D3D11. In D3D9, loading an entire effect file was D3DXCreateEffectFromFile( .. ), and you got a ID3DXEffect9, which had great methods ...
6
votes
2answers
2k views

What advantages does DirectX 11 have over DirectX 10?

What advantages does DirectX 11 have over DirectX 10? Most of the new features seemed to be for directcompute from what I can tell, and how much more are you limiting your market by if you use DX11 ...
0
votes
1answer
201 views

Why does setting a geometry shader cause my sprites to vanish?

My application has multiple screens with different tasks. Once I set a geometry shader to the device context for my custom terrain, it works and I get the desired results. But then when I get back to ...
3
votes
1answer
3k views

SV_POSITION in pixel shader

What are the uses for SV_POSITION in the pixel shader? Previously this was the POSITION semantic and it wasn't readable in the pixel shader, but now that it is, what can it be used for? In an SM2 ...
3
votes
2answers
135 views

How can I simulate multiple depth channels?

Here's what I'd like to achieve: Rendering a first pass of objects in my scene, using standard depth comparison Rendering another pass of objects in the same scene, but with the following rules: A ...
0
votes
4answers
812 views

Access violation in DirectX OMSetRenderTargets

I receive the following error when running the Triangle sample application for DirectX 11 in D3D_FEATURE_LEVEL_9_1: Unhandled exception at 0x527DAE81 (d3d11_1sdklayers.dll) in ...
2
votes
1answer
951 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 ...
0
votes
1answer
118 views

Can I animate render targets or the swap chain?

I want to animate some synthetic video bits to fullscreen w/o tearing. Can I set up D3D 9/10/11 in exclusive mode, and have it present a series of buffers that I'm writing to? I know how to copy ...
0
votes
1answer
734 views

Render full-screen gradient or texture

What's the simplest way to fill the background of the screen with a gradient or a texture in Direct3D 10/11? I'm building a Windows 8 metro app in which the camera never moves and I render some ...
4
votes
1answer
1k views

What do I need to reload after a device reset?

Is there a complete list of resources that need to be reloaded after a device reset? I want to make sure I'm not missing anything. Also, should I reload them from disk each time, or do I want to make ...
3
votes
1answer
2k views

D3D11 Multiple Render Targets

I wanted to try rendering to multiple render targets as a first step to deferred shading, but I'm getting somewhat peculiar behavior where the contents of all render targets are the same as the first ...
0
votes
0answers
167 views

DX11 - Compute shader - wrong index calculation

I have volume (3D image) divided into blocks 16x16x16. Whole volume is 128x128x128. Data are stored in linear memory in my shader. For every block, i store start index within linear memory. Now, I ...
2
votes
0answers
545 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
1answer
289 views

What are the tessellation factors Direct3D11?

I don't quite understand the documentation but if I was to tessellate a mesh using 3 control points in Direct3D11 with the "tri" domain am I right in thinking that SV_TessFactor is how many times to ...
3
votes
1answer
2k views

What are the valid DepthBuffer Texture formats in DirectX 11? And which are also valid for a staging resource?

I am trying to read the contents of the depth buffer into main memory so that my CPU side code can do Some Stuff™ with it. I am attempting to do this by creating a staging resource which can be read ...
1
vote
2answers
812 views

Why does calling CreateDXGIFactory prevent my program from exiting?

I'm using CreateDXGIFactory to get the graphics adapters and display modes. When I call it, it works fine and I get all the data. However, when I exit my program, the main Win32 thread exits, but ...
0
votes
1answer
692 views

E_FAIL: An undetermined error occurred (-2147467259) when loading a cube texture

I'm trying to implement a skybox into my engine, and I'm having some trouble loading the image as a cube map. Everything works (but it doesn't look right) if I don't load using an ...
0
votes
1answer
3k views

Where have the Direct3D 11 tutorials on MSDN have gone?

I've had this tutorial bookmarked for ages. I've just decided to give DX11 a real go, so I've gone through that tutorial, but I can't find where the next one in the series is! There are no links from ...