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
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 ...
1
vote
1answer
123 views

Drawback of using multiple bind flags

As far as I understand Direct3D 11 I have to specify certain BindFlags in order to use a resource in a specific stage of the pipeline. From my experience some combinations are more common like ...
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
3answers
2k views

Adapting DirectX samples to SlimDX

I'm trying to learn DirectX and SlimDX but I'm having a terrible time getting started. I'm taking the Triangle tutorial and trying to add color and transformations. Starting with controlling color, ...
4
votes
2answers
678 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 ...
1
vote
3answers
533 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 ...
2
votes
2answers
790 views

Is the output from D3DCompile specific to one GPU, or not?

In Direct3D 11 there is a two-stage shader compilation process; you first pass the HLSL source code into D3DCompile, which outputs a "blob" of bytecode. You then take this blob and call ...
3
votes
1answer
2k views

What is the AlphaToCoverage blend state useful for?

Alright, just finished most of my early UI stuff and I wanted the windows to have some transparency. So I expanded my application to initialize and bind blend states so that my UI shader could ...
1
vote
1answer
464 views

Determine the stride of a DirectX Texture2D line?

Is there a way to determine, or preferably calculate/predict, the the stride of a line of a DirectX 11 Texture2D resource when using SharpDX? (E.g. Can we say the stride of a line is always a power ...
3
votes
1answer
2k 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 ...
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 ...
4
votes
1answer
742 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 ...
0
votes
1answer
741 views

Real-Time Terrain Deformation

I can't really find anything at all on this topic. There's a bunch of YouTube videos that show people doing it, but there aren't any articles that I can find explaining the mechanics of it. In my ...
1
vote
3answers
204 views

Extracting blend values from uint32 not working as expected

I have the following shader configuration code : uint gBlendValue = 0xffffff00; Terrain.Effect.GetVariableByName("gBlendValue").AsScalar().Set(gBlendValue); And I have the following shader code : ...
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 ...
2
votes
2answers
658 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
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
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 ...
2
votes
1answer
1k views

Why can I not map a dynamic texture in D3D?

I am trying to map a Texture2D resource in DirectX11 via SharpDX. The resource is declared as a ShaderResource, with Dynamic usage and the 'Write' CPU flag specified. My call however fails with a ...
1
vote
1answer
411 views

Marshalling C# Structs into DX11 cbuffers

I'm having some issues with the packing of my structure in C# and passing them through to cbuffers I have registered in HLSL. When I pack my struct in one manner the information seems to be able to ...
1
vote
1answer
666 views

Why are my scene's depth values not being written to my DepthStencilView?

I'm rendering to a depth map in order to use it as a shader resource view, but when I sample the depth map in my shader, the red component has a value of 1 while all other channels have a value of 0. ...
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 ...
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?
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 = ...
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 ...
0
votes
4answers
821 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 ...
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 ...
0
votes
1answer
816 views

D3D11 - Setting multiple ID3D11SamplerStates for the pixel shader stage once and leaving them be

In my Direct3D 11 application, I am using several sampler states to retrieve texture data. Some of them are used in all pixel shaders, some of them are only used in very specific ones. The question ...
2
votes
2answers
373 views

handling errors in a framework

I'm writing a D3D11 framework and I'm trying to clean it up a little, and I'm unsure how to handle errors and return codes in my classes/code. What is the "best" and cleanest way to implement error ...
2
votes
1answer
1k views

Direct3D11 feature level

If I set the directx feature level to D3D_FEATURE_LEVEL_9_3 but I have a graphics card which supports D3D_FEATURE_LEVEL_11_0 does that prevent directx11 features from working even though my graphics ...
3
votes
2answers
5k 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, ...
0
votes
1answer
753 views

Points in d3d11

D3D10/D3D11 drops support for point primitives. I'm trying to render a set of points for quick and dirty debug, any suggestions/quick hacks for getting large size points to show up in D3D11?
1
vote
1answer
785 views

Multiple Render Targets not saving data

I originally posted this question on stack overflow, but realised it might be better here. The original question can be found here I'm using SlimDX, targeting DirectX 11 with shader model 4. I have a ...
1
vote
1answer
1k views

Proper vertex buffer use

How're you supposed to use vertex buffers? Say you have 500 distinct deformable shapes/models in the world (ie you want to be able to change/delete vertices from the models somewhat arbitraily as the ...
2
votes
1answer
2k views

I cannot update a shader constant via a constant buffer in DirectX 11

I've tried everything I can think of, but I cannot get a constant buffer to update a variable in my shader in DirectX 11. I followed the examples on msdn. I read and re-read the articles on constant ...
2
votes
1answer
419 views

Hemicube algorithm d3d9 or d3d11, float valued colors

The hemicube algorithm renders the scene to 5 sides of a half-cube, from the perspective of each polygon. Assume you place the hemicube around me and render to the 5 sides. The idea is, we can see ...
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(), ...
0
votes
1answer
5k views

How did you learn DirectX 11? [closed]

How did you learn the DirectX 11 API? MSDN documentation, tutorials, blogs, sample applications, books, etc?
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 ...
3
votes
2answers
6k 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 ...
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 ...
0
votes
1answer
552 views

Simple Terrain Grid (not working)

I know yall are probably going to hate me.....but I can't figure out what im doing wrong, im trying to make a SIMPLE Vertex Grid (for Terrain) but I get a black screen for some reason And I can't ...
4
votes
1answer
314 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
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
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 ...
3
votes
2answers
1k views

Understanding DeviceContext and Shaders in Direct3D/SlimDX

I've been working through this tutorial about drawing triangles with SlimDX, and while it works, I've been trying to structure my program differently than in the tutorial. The tutorial just has ...
2
votes
2answers
464 views

Should I start to use DX11 [duplicate]

Possible Duplicate: learning Direct3D 9, 10 or 11 ? I have just started game dev and was wondering should I use DX11 or version 10? I know AMD/nVidia now have DX11 cards but there are not ...
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 ...
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 ...
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, ...