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)

0
votes
1answer
139 views

Constant buffer not updating

I'm trying to rotate models independently of each other however I cannot for the life of my figure out how. I have gotten to the stage of writing this: std::vector<int>::size_type st = ...
0
votes
1answer
124 views

DirectX11 Equivalent of OpenGL code

I am currently porting parts of my engine over to D3D11 from OpenGL and was trying to figure out how I would accomplish the following blending functions in D3D11. glEnable(GL_BLEND); ...
0
votes
1answer
329 views

When should I set a texture as a shader resource in order to read it?

I'm writing a Direct3D 11 HLSL shader with SharpDX. What I want to do is write the depth to a texture in one pass and read it in the next one. After declaring the texture, do I have to set the depth ...
0
votes
1answer
266 views

Animation, Interpolation, & Structure

I have been working on animation in my small game engine recently and I am implementing some interpolation to be used with skeletal animations. I know how to do interpolation but I am not sure where ...
0
votes
0answers
15 views

In HLSL pixel shader, why am I getting [-256.0, 256.0] values in SV_POSITION input?

My question is basically in my DirectX11 pixel shader, why am I getting a range of values from -256.0 to 256.0 in the SV_POSITION input instead of the supposed values from 0.0 to ViewportWidth and 0.0 ...
0
votes
2answers
118 views

What is DirectX 11's equivalent of D3DCAPS9::MaxVertexIndex of DirectX 9?

I'm porting a DirectX 9 program to DirectX 11. How do I get the value in DirectX 11 that is retrieved using D3DCAPS9::MaxVertexIndex in DirectX 9? Thanks in advance.
0
votes
1answer
43 views

How do i draw depth complexity(overdraw) in directx 11?

I want to read the stencil value in the shader so I can set colors for different depths. What I understand. Make a loop after the scene is rendered but before is is presented. so a loop with the ...
1
vote
1answer
206 views

SSAO all jagged

So I've been working on SSAO for awhile, and I thought I had it right, untill I loaded up the sponza scene that accompanied the SAO technique I'm implementing ...
0
votes
2answers
81 views

Directional light and finding relevant shadow casters

Right now when culling the models to render for the directional light shadow map pass I just do a view frustrum culling using the main camera. At some angles, the objects will be outside the view but ...
0
votes
1answer
38 views

DirectX 10 - dimension of vertices passed to vertex shader

I'm trying to learn DirectX programming. Looking at different tutorials there is something about vertices that I find a bit confusing. I know that DirectX uses vertices with four elements (x, y, z, ...
0
votes
1answer
50 views

Sample() returns (0, 0, 0) for normal map 90% of frames

I'm having some trouble reading the values from my Normal map in my lighting fragment shader. The relevant part of the shader code is as follows: Texture2D NormalGB : register(t0); Texture2D ...
2
votes
1answer
167 views

Direct3d Techniques and Windows 8

Under Windows 8, what is the alternative to this code: technique11 Light0Tex { pass P0 { ... technique11 Light1Tex { pass P0 { ... And: Light1Tech = ...
5
votes
1answer
599 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 ...
0
votes
1answer
407 views

How to render a vertex buffer in DirectX11 C++ (specifically with box2d's b2Draw)

I have all the DirectX11 devices etc setup and working with DirectXTK's SpriteBatch and currently attempting to implement a b2Draw class to draw my box2d physics worlds. I have little idea on how to ...
0
votes
1answer
59 views

How to merge 2 textures into single SRV

I have 2 textures in 2 different ShaderResourceViews. What's the fastest/least expensive way to merge them into one? I would use CopySubresourceRegion but copying a texture is quite a bit expensive. ...
1
vote
1answer
69 views

Mix multisample and non multisample rendering in Directx11

is there a way to mix multisample and non multisample rendering in Directx11? It seems that when I create a multisampled render target I always get a multisampled rendering, regardless of the value of ...
0
votes
2answers
36 views

Loading ARGB in Directx 11

const D3D11_INPUT_ELEMENT_DESC InputLayoutDesc::Basic32[3] = { {"POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0}, {"NORMAL", 0, ...
-1
votes
1answer
46 views

How do i load, render and trasnform 2D images using Direct3D 11 API? [closed]

In my small game project using DirectX 11 API, I created a Direct3D device, and can draw 3D meshes, using web tutorials and a book. But I cannot figure out how to load, transform (rotate, scale, ...
1
vote
2answers
36 views

Directx displaying selectable text

I am new to direct x and following this tutorial : brayzarsoft (part 14) I was able to display text. However, using this method the text is rendered to a texture. When you look at games that have ...
0
votes
1answer
557 views

Stencil buffer and transparent pixels

Do transparent pixels cause a stencil buffer operation (increment, decrement, etc.) to be executed? My understanding was that only opaque pixels cause a stencil buffer operation, transparent pixels ...
1
vote
1answer
46 views

How do I draw a full screen quad in DirectX 11?

How do I draw a full screen quad that shows red on the screen?
0
votes
1answer
47 views

How to load in meshes efficiently into DirectX11

I wanted to know if there was a standard and efficient method to load meshes from a file into DirectX11. Currently, I'm loading .obj's by parsing them in and storing their information into a vertex ...
0
votes
1answer
295 views

Rendering multiple meshes in directx11

Recently I have tried adding rendering with multiple meshes in my program. This did not go too well. The attempt I currently have goes like this bd.Usage = D3D11_USAGE_DEFAULT; bd.ByteWidth = ...
1
vote
0answers
84 views

Directx 11 full screen

I build simple directx 11 application in c++ that draw square to screen. Also check in the end of the program when I close the last peace of directx the number of free reference. This work great in ...
2
votes
1answer
51 views

Since D3DX utility library is deprecated, what can I do about this legacy code?

D3DX Structures utility library is deprecated for Windows 8 and its not supported for Windows Store apps. So my question is, Does anyone know what to replace this legacy code with.. ...
2
votes
0answers
318 views

PSSM and tightening the split frustrums

So I have implemented PSSM which currently does not care about the objects in the scene, meaning alot of resolution is wasted on empty space. This image shows the bottom two splits wasting alot of ...
0
votes
0answers
40 views

How can I avoid transposing matrices and still use more efficient dp4's instead of a mul and 3 mad's?

I'm using the 'correct' matrix-vector multiplication form (M*v) as recommended here. All my matrices in shaders are prefixed with 'column_major'. This line of HLSL code: hPos = mul( ...
0
votes
1answer
46 views

DirectX11 Shader issue

I am currently having issues with HLSL shaders. I am trying to implement point lights but I am getting unusual data when debugging the shader in Visual Studio. I have read on several sites that say ...
0
votes
1answer
24 views

HLSL Shader Optimilation with MAD(m,a,d)

I understand that the expression x = m*a+d is most efficiently written as x = mad(m,a,d) because at the assembly level only one instruction is needed rather than a multiply and add separately. My ...
0
votes
2answers
28 views

Update single variable in DirectX Shader

I am trying to update a single variable within a CBuffer but I am unsure of how to do this. I have a LightingBuffer which is passed to the GPU containing, ambient color, diffuse color etc and I want ...
0
votes
1answer
36 views

Simple switch to instanced draws causes consistent, but incorrect, results

I have dumbed the following code down to "stupid simple" for DirectX and still cannot get any cooperation: g_d3dContext->OMSetRenderTargets(1, ...
-1
votes
1answer
22 views

Vertex<>Layout mis-match within PIX(Graphics Debugger) [closed]

There's more than a screen-full of code to specify the actual vertex data, the inputlayout, and the shader signature... Misleading symptoms: Then, it does whatever it wants, anyway. I can "cause ...
0
votes
0answers
18 views

D3D11InfoQueue Isn't filtering out messages

I have followed the Coordinator's code advice from this page on how to query and filter the messages in the debug layer but it doesn't seem to be working. You can see from the following code that I ...
0
votes
0answers
31 views

How can I determine the position of Direct Sound buffer

I'm using Direct Sound to play WAV files in my environment, however I am unsure of how to check if the file has finished playing, I know DirectSound operates on a circular buffer, however my sounds ...
0
votes
0answers
18 views

DirectX 11 Compute Shader Thread Order

I want to implement a simple blurring method using multiple texture taps using a compute shader. The shader simply assigns a pixel color based on several near-by pixels in another texture. I would ...
1
vote
1answer
90 views

DirectX 11 vertex shader incorrectly sending <0, 0, 0> normal vector to pixel shader

I'm following the Rastertek tutorials. I'm unable to get diffuse lighting working from http://www.rastertek.com/dx11tut06.html. I think the NaNs in the following screenshots is just from stuff ...
1
vote
1answer
76 views

DirectX 11 - Get the world matrix of my camera

I'm relatively new to the world of 3D games programming and I am not sure if I am understanding some key concepts correctly. Right now I have created a sphere that is 2.0f in radius which surround ...
2
votes
1answer
81 views

HLSL Pixel Shader for Depth Only Pass

I'm using DirectX 11 and shader model 5. There are many tutorials online for writing engines and shaders for shadow mapping. I have found an issue which seems to have a hard to find answer. Typical ...
5
votes
1answer
305 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 ...
5
votes
3answers
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 ...
0
votes
0answers
16 views

Additive blend, DIRECTX [duplicate]

http://i.stack.imgur.com/7MjdK.jpg Glowing white and not disappearing in the fog, why? Im using a additive blend in directx 11 blending with omsetblendstate. I have fog in the scene, it is not the ...
3
votes
2answers
322 views

How to Enable NVIDIA Ambient Occlusion in my Game

I have a DirectX11 based game, and I want to enable NVIDIA's built in Ambient Occlusion (that is shown in the NVIDIA control panel, but it grayed out for my application). Is that possible? Or do I ...
0
votes
0answers
36 views

Blending two images with Directx 11

I want to blend two images. I have a brick wall and I want to subtract a grey scale. I do not want to do this in the pixel shader. This is what I want in the picture. My blend code is: ...
1
vote
1answer
65 views

Render to Texture Using Multisampling

I have a DirectX11 application, which has multisampling / anti-aliasing enabled. However, I want to add an effect that requires a render-to-texture step. When I add this extra step, I lose all ...
0
votes
2answers
888 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 ...
-3
votes
1answer
58 views

Are these functions and parameters used in DirectX 11.2? [closed]

Functions and parameters like WINAPI, hPrevInstance, hInstance , PSTR etc are used in DirectX 11.2?
0
votes
3answers
95 views

How can I track down outstanding references to a D3D swap chain?

On direct3d_11.1 initialisation the swapchain is resized to the desired proportions but after the getting the backbuffer it isn't released. I check the return value and check its address which doesn't ...
0
votes
0answers
33 views

Loading skinned mesh - initially rotated bones, how to set the weights?

I have an mesh that I've exported from 3ds max to my own file format. I use the left-handed coordinate system with Y up and the orientation is expressed as quaternions (both for models and bones). ...
0
votes
0answers
13 views

C++ - Error X3501 Main Entrypoint Not Found [duplicate]

I was developing my DirectX 11 app, but when I wanted to add a function to draw a triangle, I get this error from compiler. Error X3501 Main Entrypoint Not Found This is how my main .cpp looks ...
0
votes
0answers
83 views

DirectX Compute shader (HLSL) makes texture black

Hello this is my first question on this forum :) When using compute shader in directx to change the color to blue the texture only gets black. I really don't understand what the problem could be and I ...