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)

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.
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 ...
14
votes
6answers
3k views

Modern Shader Book?

I'm interested in learning about Shaders: What are they, when/for what would I use them, and how to use them. (Specifically I'm interested in Water and Bloom effects, but I know close to 0 about ...
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: ...
9
votes
3answers
1k views

How many active shaders at one frame in the game (should I typically use)? 5? Or more like 100?

I have a question: how many shaders are usually active at the same time in one scene in modern games? I mean: I know that multiple shaders are being used (switching between them in each frame). And ...
9
votes
1answer
6k views

DirectX11, how do I manage and update multiple shader constant buffers?

Alright, I'm having a hard time grasping how constant buffers are bound to a pipeline stage and updated. I understand that DirectX11 can have up to 15 shader-constant buffers per stage and each buffer ...
8
votes
2answers
1k views

Why would you want multiple render targets?

In d3d11, you can bind multiple render targets ID3D11DeviceContext::OMSetRenderTargets. But why would you want to do this?
7
votes
1answer
742 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 ...
7
votes
2answers
948 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 ...
6
votes
3answers
1k views

What features does D3D have that OpenGL does not (and vice versa)?

Are there any feature comparisons on Direct3D 11 and the newest OpenGL versions? Well, simply put, Direct3D 11 introduced three main features (taken from Wikipedia): Tessellation Multithreaded ...
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 ...
6
votes
3answers
1k views

Which of these DirectX11 calls actually sends data to the GPU?

I'm trying to learn graphics programming and DirectX11. I'm trying to learn how to minimize CPU-GPU transfer and graphics programming in general. I have a question that I have been unable to answer ...
6
votes
1answer
429 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 ...
6
votes
1answer
547 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 ...
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 ...
5
votes
1answer
1k 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... ...
5
votes
4answers
2k views

How best to handle ID3D11InputLayout in rendering code?

I'm looking for an elegant way to handle input layouts in my directx11 code. The problem I have that I have an Effect class and a Element class. The effect class encapsulates shaders and similar ...
5
votes
3answers
2k views

The pros and cons - DX9 moving to DX11 render?

We are a "nano" game dev company working on REFUSION. DX9 renderer is almost done and question is: Should we move it to DX11 or not? Anyone have experience with this? Here are some videos from dev ...
5
votes
2answers
1k views

What is the purpose of a Direct3D vertex layout?

This tutorial (msdn) gives a description of a vertex layout. This is an example of a input layout: D3D11_INPUT_ELEMENT_DESC layout[] = { { "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, ...
5
votes
1answer
569 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
1answer
880 views

Memory allocation strategy for the vertex buffers (DirectX 10/11)

I'm writing a CAD system. I have a 3D scene and there are many different objects (walls, doors, windows and so on). The user can add or delete objects. The question is: How do I keep track of all the ...
5
votes
1answer
353 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 ...
5
votes
1answer
1k views

Render to Texture2DArray slices in DirectX11?

I would like to set a slice of a Texture2DArray as a render target in D3D/DirectX11. It's not clear how to do this. What I'm looking for is the DirectX equivalent of glFramebufferTextureLayer(), ...
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 ...
5
votes
2answers
4k views

How can I convert an OBJ model into arrays of vertices and indices?

I'm writing a simple model loader just to learn how models are loaded. I wrote a program to convert .OBJ files in a custom format. (It's virtually exactly the same as .OBJ, I wrote it once again just ...
4
votes
1answer
173 views

How do these Direct3D 11 components work together?

I am having a really hard time to understand how the following Direct3D components play together and what they do (or exist for) while creating a scene on the screen. render target view render ...
4
votes
2answers
679 views

How to deal with large depth buffer values due to extreme distances

Alright, this is semi-related to my last question here So I've got an really big coordinate system and need to handle rendering large astral bodies from extreme distances. My current approach ...
4
votes
1answer
675 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 ...
4
votes
2answers
454 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 ...
4
votes
1answer
747 views

How to fix odd artifacts at the edges of textures in DirectX 11?

In my DirectX 11 project, when I have textures they have odd artifacts at the edges. I've seen it before and searched online, but I can't find any DirectX examples that I can get to work. You can ...
4
votes
1answer
315 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: ...
4
votes
2answers
339 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 ...
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 ...
4
votes
1answer
2k views

Managing Shaders and Objects in DirectX 11

The title explains my two biggest logical problems with developing a game. It's something I sit up at night thinking about, and that is "What is the most effective way to manage shaders" and "What is ...
4
votes
1answer
105 views

Calculating normals after displacement mapping

I'm using C++, DX11 and tessellation. After tessellating a triangle I apply displacement mapping to the new vertices. But they still have the original triangle's normal so the lighting calculation ...
4
votes
1answer
335 views

How can I emulate point sprites in D3D11?

I have points which I pass to a vertex shader and then to a geometry shader, but now I want to get from the geometry shader a "bigger" point. So the point should get a "dadius" like it was possible in ...
4
votes
2answers
2k views

How can I draw dashed or dotted lines with a pixel shader?

I am trying to draw the 2D graphics (like line, polyline, polygon etc.) using Direct3D for drawing I am using LINE_LIST. Now I want to make the lines thicker and apply patterns to the line as ...
4
votes
1answer
2k views

How do I create a CPU read/write buffer in SlimDX (what are the legal combinations of Usage and CPUAccess flags)?

Currently, I create a vertex buffer in SlimDX like so: SlimDX.Direct3D11.BufferDescription Description = new SlimDX.Direct3D11.BufferDescription(); Description.BindFlags = ...
4
votes
1answer
1k views

SRV from UAV on the same texture in directx

I'm programming gpgpu raymarching (volumetric raytracing) in directx11. I succesfully perform compute shader and save raymarched volume data to texture. Then i want to use same texture as SRV in ...
4
votes
1answer
134 views

Geometry Shader : points + Triangles

I have different Shaders and for each Shader a instance of the ShaderClass class, which initializes the Shaders, Renders the Shaders, etc. I use most of the Shaderclasses without Geometry Shader, but ...
4
votes
3answers
1k views

D3DX11SaveTextureToFile with shared resources

I'm using shared resources to send textures from one D3D11 device to another, so that I can copy the back buffer over the second device and use the second device context to save that texture to a ...
4
votes
2answers
99 views

Should I use different input layout for meshes (vertices) with and without normal maps?

I'm writing an DirectX11 game. About 60% of my game models (or "of my vertices") have: Position Texture coordinate Some of them use: Position Texture coordinate Normals And few of them: ...
4
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 ...
4
votes
1answer
536 views

Per-vertex position/normal and per-index texture coordinate

In my game, I have a mesh with a vertex buffer and index buffer up and running. The vertex buffer stores a Vector3 for the position and a Vector2 for the UV coordinate for each vertex. The index ...
4
votes
2answers
3k views

How Often do you change Vertex/Index/etc Buffers?

So im still learning but I think i've got a grasp of most things DX11 (Well....beginner things) And I REALLY do apologize for all the questions.....but I'd rather understand EVERYTHING before I move ...
4
votes
1answer
226 views

How to debug DXGI_ERROR_INVALID_CALL errors?

I am developping an application using SharpDX and on one of my machines the call _swapChain = new SwapChain(factory, _device, desc); fails with the error message HRESULT: [0x887A0001], Module: ...
4
votes
2answers
306 views

Calculate mipmap level in a loop with varying iteration?

How can I calculate the correct mipmap level in a shader? It needs to be used in a loop which runs a variable number of times so the compiler will not allow me to use Sample or the derivative ...
4
votes
2answers
311 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 ...
4
votes
2answers
523 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 ...
3
votes
1answer
4k views

What do these STATE_CREATION warnings mean in the DX11 debug output?

So I've been fighting my way through learning the DirectX 11 API with what little documentation there is out there and noticed some new D3D11 warnings in my debug output. (Atleast I think they are ...