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)

1
vote
1answer
78 views

DirectX 11 Updating Resolution

Searched for a while thinking this would have some obvious tutorials but I can't find anything... which makes me think I must be using the wrong wording because it seems obvious. Anyway, when I ...
0
votes
2answers
69 views

InputAssembler and emtpy/incomplete buffers

I was wondering what the InputAssembler does if the size of the bound buffers does not match the vertex count of the Draw() call. I've seen the example at ...
2
votes
1answer
317 views

Directx 11: emulating palette swapping with shader 5.0 and c++

i'm trying to swapping the colors using a texture as index and a second one as palette. Here is the full listing of the code: #include <windows.h> #include <windowsx.h> #include ...
0
votes
1answer
493 views

Constant buffer content packing

I've read this: http://msdn.microsoft.com/en-us/library/windows/desktop/ff476898%28v=vs.85%29.aspx#Shader_Constant_Buffer but there's not much information in it. When creating a constant buffer do I ...
0
votes
1answer
70 views

Frustum culling + instancing

I've implemented instancing in my app and right now I have an instance buffer holding position data for all instances. But I'd like to also implement frustum culling which would cull some of the ...
1
vote
1answer
64 views

Is there any way to change texture filtering globally in Direct3D 11?

One of the major changes I have encountered between Direct3D 9 and Direct3D 11 is the new API for setting up texture sampling. In D3D9, it was sufficient to simply set a given value of a given ...
4
votes
1answer
120 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 ...
1
vote
1answer
316 views

Driver error when using multiple shaders

I'm using 3 different shaders: a tessellation shader to use the tessellation feature of DirectX11 :) a regular shader to show how it would look without tessellation and a text shader to display ...
2
votes
1answer
51 views

How To Set Constants Using ID3DShaderReflection

I got to the point where I am tired of hardcoding shaders and decided that it was now time to look into using ID3D11ShaderReflection to get data from the shader and set my shader's constant buffer ...
0
votes
2answers
91 views

DirectX: Render the black bars

I'm still quite a beginner in the industry. I'm working on a game with some friends and I would like to add a cinematic between 2 levels like in the attached picture. My question is how can I render ...
2
votes
1answer
102 views

Is it ok to mix shader types?

The title might not be precise. Let's say I have one material consisting of vertex and pixel shader, another one consisting of vertex, geometry and pixel shader, and yet another one consisting of ...
4
votes
1answer
248 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: ...
1
vote
0answers
36 views

DX11 ID3DX11FFT as post

I'm trying to implement bloom using FFT during post processing. But I have no experience with compute shaders and so far. DX11 has the ID3DX11FFT interface, which encapsulates compute shaders under ...
0
votes
1answer
76 views

Getting invalid argument error on R32G32B32_FLOAT texture creation

D3D11_TEXTURE2D_DESC texDesc; texDesc.ArraySize = 1; texDesc.BindFlags = D3D11_BIND_SHADER_RESOURCE; texDesc.CPUAccessFlags = 0; texDesc.Format = DXGI_FORMAT_R32G32B32_FLOAT; ...
0
votes
1answer
123 views

Rendering to specific face of a cubemap

I have working omnidirectional shadow maps for point lights. Rendering a shadow map for one point light consists of rendering the scene to 6 separate rendertargets, then send those render target ...
1
vote
1answer
119 views

Difference between texture arrays and multiple single textures?

I've just learnt that DirectX 10 and above have a feature called "texture arrays". Which, basically, is just a normal array of textures (shader resources) which in a shader is declared like: ...
0
votes
1answer
163 views

Why are my geometry-shader-generated billboards not showing up given the following code?

My program is a rain particle system. After processing a list of positions of rain particles, I passed them to the geometry shader for generating a billboard for each position. If I use a simple ...
2
votes
1answer
102 views

Passing Input to Compute Shader

I am using D3D11 on D3D10 hardware, trying to get a very simple compute shader to run (my hardware supports cs_4_0). What is the best way to pass data to the compute shader? I've seen some samples ...
1
vote
1answer
146 views

Read part of texture using SharpDX

I have a Texture3D. I want to read a part of it from CPU side. (I'm using the SharpDX toolkit (v2.5.1).) My data is always 0, but the output shows no errors. This is the source texture: testTex = ...
1
vote
1answer
57 views

How do I change rasterizer state properly?

To set the rasterizer state I have to ID3D11Device::CreateRasterizerState() and then ID3D11DeviceContext::RSSetState. And then I should ID3D11RasterizerState::Release() it, right? How about when I ...
0
votes
1answer
151 views

How can I check the multisample quality level count?

I can check it with ID3D11Device::CheckMultisampleQualityLevels(). So to use it I need to create the device: D3D11CreateDeviceAndSwapChain(). To call it I need to fill the DXGI_SWAP_CHAIN_DESC which, ...
2
votes
1answer
49 views

What does the hull shader attribute “patchsize” do?

What does the hull shader attribute [patchsize(12)] do? MSDN fails to mention it. Do I have to use it? Should I use it?
0
votes
1answer
124 views

Easiest way to smoothen coarse mesh with HLSL?

I've browsed through a couple of presentations and papers about DX11 tessellation and they all say that one of the most common usages of tessellation is to take a coarse (low poly) mesh, smoothen it ...
0
votes
1answer
88 views

Heightmaps with several textures

I got a full functioning heightmap loader, however I can only use one texture. Now I want to implement more textures (like diffrent textures depending on heights ect, Possibly a structure that makes ...
2
votes
1answer
83 views

Do the predefined HLSL semantics carry any meaning?

I'd say there are 3 kinds of HLSL semantics: SV_* group - these are "system value" semantics which DO carry special meanings (e.g. assign special input/output data to/from shader stages) predefined ...
3
votes
1answer
70 views

Why does my PixelShader ignore color but respond to alpha changes?

I started teaching myself some DirectX a short time ago and found something I'm confused about. For some reason, I can only get the color of the model I'm drawing to vary between black and white, ...
1
vote
1answer
47 views

Vertexquads are not being drawn in 2D space

I started teaching myself DirectX a short time ago and have come across a problem which I can't figure out by myself unfortunately. I'm trying to build my own font system, so I can draw strings in 2D ...
4
votes
2answers
545 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 ...
0
votes
1answer
145 views

Rendertarget and alphablending problem (Offscreen particle rendering)

Today, I have implemented soft particles by rendering them to a separate render target and blending that with the scene, which worked as expected with additive blended particles. In that case I render ...
0
votes
2answers
225 views

DirectX11: Drawing multiple objects

How can I draw many different objects on screen at once, with multiple vertex buffers, using DrawIndexed()? (Drawing the same object is simple, and I'm not looking to instance) ...but I am looking ...
0
votes
1answer
199 views

Problem with Texture Array and billboards [closed]

It's my first post here. My name is Bruno and I'm from Brazil. I'm trying to learn DirectX 11, and I'm using Frank Luna's book. The problem is that he uses the Effects Framework to do everything, and ...
0
votes
0answers
151 views

Bullet Physics Raytrace Picking

I'm having trouble picking using bullet's raytrace code Here's what I have so far for creating the actual Ray float top = 1.f; float bottom = -1.f; float nearPlane = 1.f; float tanFov = (top - ...
-1
votes
1answer
69 views

problem with texcoord at post effect (quad rendering)

I have this shader: float4x4 View; struct VS_INPUT { float2 Position : POSITION; float2 TexCoord : TEXCOORD; }; struct PS_INPUT { float4 Position : SV_Position; float2 TexCoord : ...
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 ...
2
votes
1answer
128 views

Finding out the “width” and “height” of my screen after projection added

In a 2d game, doing collisions with the edges of your screen is easy. Your textures are a 1:1 mapping of your screen resolution because your verities are too.. if your x position is > than ( screen ...
1
vote
1answer
139 views

How can I read texel data on a separate thread in D3D11?

In D3D10, I load a staging texture onto my GPU memory, then map it in order to access its texel data on the CPU. This is done on a separate thread, not the thread I render with. I just call the device ...
1
vote
1answer
151 views

DirectX11 pixel shader in pipeline is missing

I'm writing a program which displays a MS3D model using DirectX, and unfortunately, the result shows nothing on the screen. When I use the Graphics Debugger from Visual Studio 13, I notice that the ...
2
votes
1answer
108 views

Tessellation cracks

i'm trying to a mesh tessellate with dx11 with the tessellation factor calculated by the size of the triangle and the distance to the screen. I do the same operation on the 3 edges of the triangle, ...
0
votes
1answer
158 views

Rendering Textured Terrain With SharpDX Toolkit [closed]

So i recently moved from XNA to SharpDX Toolkit and started with some basics. The 2d part was easy since nearly nothing has changed but im really struggeling with the 3d part. For example i wanted to ...
0
votes
1answer
129 views

DirectX debugging: Graphics Pipeline Stages: Input Assembler: “No mesh available for stage”

My question is basically why VS2012 tells me that there is no mesh available for the Input Assembler stage because if I click on the DeviceContext next to the Draw call in the Grahics Event List the ...
0
votes
1answer
100 views

Why is my vertex buffer filled with random, incorrect data?

I've been using the Graphics-Debugger of VS2012 to see why my triangle is not drawn. It seems to be a problem with my VertexBuffer since all other Buffers show the data I fed them, however, the ...
2
votes
1answer
165 views

How should I prepare for migration from D3D9 to D3D10 or D3D11?

I'm considering a Direct3D9 texture streaming solution, but my company will eventually be going to D3D11 in the future. I wanted to make my solution as forward compatible as possible, so I was hoping ...
2
votes
1answer
150 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
0answers
120 views

Directx 11 not drawing scene despite all math being correct

I have a graphics engine that i writing in Directx11 and I changed the way objects are drawn, and the way assets for the game are loaded. Everything in my draw call is set correct and I thought that ...
3
votes
3answers
915 views

What are registers in HLSL for?

I've read this document about HLSL registers, but it's more of a syntax description and not a purpose explanation. What are registers in HLSL, actually? How and when do I use them? What happens if I ...
1
vote
1answer
234 views

Why does switching to fullscreen produce this graphical glitch?

I followed this tutorial and things were looking good. However, when switching to Fullscreen from 800x600 using alt-enter, I noticed an error in debug output: DXGI WARNING: IDXGISwapChain::Present: ...
0
votes
1answer
131 views

Why divide by w makes the pixel shader look better?

I'm writing a shader in HLSL (Direct3D11 with SharpDX) and after some computations I was trying to make a test and print the depth z of a specific point in my pixel shader, like this: myZ = ...
1
vote
2answers
150 views

How do I reverse the playback of an animation (instead of restarting it)?

I have created a sprite sheet of which consists of six frames of a character whose legs move each frame. Now I have written code so that the animation is running successfully from frame one to frame ...
1
vote
1answer
598 views

Rendering a image with some transparency has removed all black pixels and makes full texture transparent

I am writing a program where with Directx11 I am rendering a texture to a flat rectangle something along the line a of 2D engine. Now parts of this image need to be transparent, to this effect I ...
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: ...