DirectX 11 is the latest release of Microsoft's collection of APIs which contain features to aid in game development.
25
votes
3answers
6k 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.
13
votes
4answers
2k 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 ...
13
votes
6answers
2k 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 ...
12
votes
2answers
869 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: ...
8
votes
2answers
927 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
177 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 ...
6
votes
2answers
985 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
1answer
294 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 ...
5
votes
3answers
951 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 ...
5
votes
3answers
1k 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
1answer
4k 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 ...
5
votes
2answers
860 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
3answers
861 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 ...
5
votes
2answers
286 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 ...
5
votes
1answer
221 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
305 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
1answer
565 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
882 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
2answers
2k 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
3answers
3k 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 ...
4
votes
1answer
215 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
235 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
523 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
274 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
1answer
689 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
2answers
1k 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
1k 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
3answers
881 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
1answer
147 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
2answers
266 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
333 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
2k 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
2answers
216 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
1answer
146 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 ...
4
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 ...
3
votes
2answers
523 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 ...
3
votes
1answer
344 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
4answers
903 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 ...
3
votes
2answers
66 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
1answer
134 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, ...
3
votes
2answers
214 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 ...
3
votes
3answers
417 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 ...
3
votes
2answers
4k views
Can't update DirectX11 shader constant buffer [closed]
Alright, I'm currently making the transition from DirectX 10 to DirectX 11 (with very little help from the MSDN documention) and recently ran into a snag with updating a shader's constant buffer.
My ...
3
votes
1answer
183 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 ...
3
votes
1answer
139 views
Depth Stencil buffer mandatory?
If I disable depth and stencil buffering, do I have to create and set the depth stencil buffer?
3
votes
1answer
145 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 ...
3
votes
1answer
1k 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 ...
3
votes
1answer
1k views
Why can't I write to my render targets?
Alright, been working on setting up my first deferred rendering attempt using a light prepass technique in Direct3D 11.
Anywho, I've been having problems understanding and using render targets. Never ...
3
votes
2answers
3k views
Mapping a Vertex Buffer in DirectX11
I have a VertexBuffer that I am remapping on a per frame base for a bunch of quads that are constantly updated, sharing the same material\index buffer but have different width/heights. However, ...
