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
42 views

How to diagnose the problem when the input assembler and the vertex shader look correrct, but the Output Merger is wrong?

I'm porting some OpenGL code to Direct X 11. I ended up with nothing being drawn on the screen. I reverted to a simple program, which I am writing about here. I'm now trying to use the Graphics ...
0
votes
1answer
22 views

Compiling a shader with fxc results in invalid ps_5_0 output semantic 'COLOR0'

I'm attempting to compile a shader at the command prompt. What am I doing wrong that would make it generate this error? fxc /Od /Zi /T ps_5_0 /E "ps_main" /Fo "basic.pso" "basic.ps" Here is the ...
0
votes
1answer
52 views

Specular light flickering with high specular power

I'm having some issues with specular lights, to be more specific, the specular color seems to be flickering when I set high power, like 512 (I set the specular color to green, so you can see better): ...
0
votes
1answer
45 views

Making a parenting system

Each Entity can have one parent and any number of children. They have a position vector and a quaternion orientation. I know that I can make objects look like they're in a hierarchy by multiplying ...
0
votes
1answer
33 views

Normal Mapped Models Render with render target background color acting as transparency and lighting Problem [on hold]

SOLVED. See my comment below. Originally I noticed some sort of transparency when rendering in Direct3D 11. I noticed it was worse once I changed my background color to something other than black. ...
0
votes
0answers
47 views

Trying to bounce a box with a plane using bullet physics

I'm trying to simulate a box that bounces with a plane and I'm beginner with bullet physics. I created a plane (box) and and a box that is falling. The problem is the ball is stalled while colliding ...
0
votes
0answers
31 views

Update DirectX 11 Texture Created in Unity Asynchronously in the Native (c++) Plugin

Sorry for the long question :D tl;dr version :) Is it possible to update DirectX 11 textures created in Unity asynchronously in a native plugin (C++)? I've written a plugin that retrieves data from ...
1
vote
0answers
47 views

Geometry shader: Dynamic output?

I'm currently using a geometry shader to generate grass blades out of single root points that are layed out in a grid. For each root point, I generate a grass blade with, right now, a constant number ...
0
votes
0answers
63 views

Automatic gamma correction on DX11

Trying to figure out how to get automatic gamma correction on DX11. I'm using deferred shading. I'm not exactly sure exactly which textures needs to be in the SRGB format. Here's my guess: The ...
0
votes
1answer
46 views

My texture blends into one single color (DirectX11)

First thread on gamedev stackexchange. I am currently creating a cube with a single texture on each side. I got my cube up and running. But when I apply my texture, I get this: It blends the ...
2
votes
1answer
59 views

HLSL compiled code

I've been using RenderDoc for debugging my shaders, and one thing that struck me as odd is that sometimes, after stepping through the debugger, I notice some vector attributes are interchanged, for ...
1
vote
1answer
32 views

CopySubresourceRegion results in no-op

I'm having some trouble copying a subregion from a source texture (2D) to a destination texture. Both textures are mipmapped 2D textures, with dimensions (at mip 0) of 512 x 32. Rather than tell you ...
0
votes
1answer
121 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
0answers
20 views

How to Render to Texture using DirectXTex

I can display a textured quad by using D3D11 & DirectXTex's ScratchImage and CreateShaderResourceView. How would I be able to render this texture to another one similarly created? I know that I ...
0
votes
1answer
70 views

Fullscreen triangle pass and texcoords

So I have a fullscreen triangle shader like this: #ifndef FULLSCREEN_TRIANGLE_VERTEX_HLSL #define FULLSCREEN_TRIANGLE_VERTEX_HLSL // Variation on Timothy Lottes FXAA vertex shader, for CCW frontface ...
0
votes
1answer
74 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 ...
1
vote
1answer
58 views

How does Direct3D know if a constant buffer is for the vertex or pixel shader?

I have a question about constant buffers in directX 11. They really confuse me and after searching on google most sites simply supply sample code without explaining how it works. I am probably ...
0
votes
1answer
74 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
61 views

mouse-controlled third person camera

I have a simple camera that always stays a set distance behind and above the player. Mouse-on-screen coordinates are used to do Pitch and Yaw, and the keyboard is used to roll. I get how to position ...
0
votes
0answers
35 views

Getting a Rect of a SpriteBatch

I'm using DirectXTK, https://directxtk.codeplex.com/wikipage?title=SpriteBatch it's a port of XNA spritebatch. I'm trying to get a bounding rect of my sprite for testing collisions AABB. I draw ...
0
votes
2answers
124 views

How should I fix a graphic glitch caused by t-junctions when using greedy meshing

As you might be able to see in the following image, a "graphic glitch" occurs between triangles. I know you are able to make this less visible by enabling anti-aliasing but i was wondering if there is ...
0
votes
1answer
23 views

D3D11_SAMPLER_DESC::MipLODBias vs ID3D11DeviceContext::SetResourceMinLOD

When implementing a max-texture-detail functionality for a game, which approach is better to use, out of: Setting the D3D11_SAMPLER_DESC::MipLODBias value of a sampler state object, or, Setting the ...
0
votes
0answers
75 views

How to use D3D11_SHADER_RESOURCE_VIEW_DESC.Buffer.ElementWidth?

If I want to create an ID3D11ShaderResourceView* to a buffer with a given DXGI_FORMAT (e.g. DXGI_FORMAT_R32G32B32), do I have to also supply a value for ...
1
vote
0answers
56 views

DXGI - Frame rate drops from ~8000 FPS to ~1500 FPS when switching to full screen mode [closed]

I've created a simple app with a DirectX11 device and swap chain (IDXGISwapChain). All it does is clear the screen with a color and call Present(0, 0) on the swap chain. The app handles full ...
0
votes
1answer
38 views

IDXGISwapChain::ResizeBuffers - should I recreate the depth/stencil buffer too?

When I resize the buffers via IDXGISwapChain::ResizeBuffers(), it is required to release any references to views to the back buffer. That of course makes sense, because the back buffer texture is ...
0
votes
0answers
39 views

ID3D11DeviceContext Map/Unmap bottleneck

I maintain a small rendering engine that displays models in Direct3D 9. I'm currently migrating this to Direct3D 11, and I've hit a snag in how I display points on the model. Using a sphere mesh, I ...
0
votes
1answer
48 views

Why can't I create an unordered access view of a R32G32B32_UINT buffer?

So I'm trying to create an unordered access view for a buffer having with three component elements, but it fails with this warning: D3D11 ERROR: ID3D11Device::CreateUnorderedAccessView: The format ...
0
votes
1answer
72 views

“_SRGB” suffix for BC texture format doesn't result in sRGB-to-linear correction at sampling

I am working on a 3D engine as a hobby (Direct3D 11). Currently I am trying to implement sRGB -> linear -> sRGB color space conversions via texture formats with "_SRGB" suffix. So, my textures are ...
1
vote
1answer
31 views

How can I send matrix data to shaders without the Effects11 framework?

I'm making a Direct3D engine but I'm stuck with this one little problem. I want to not use effect files but instead use shader files. What can I use to send matrix variables to shaders if I don't use ...
0
votes
0answers
36 views

Volumetric spotlight

Hy I'm working on the a volumetric spotlight into my engine(DirectX 11). I read quite a lot about it and would like to find a relatively quick solution. ShaderX3's approach dividing the light volume ...
0
votes
2answers
45 views

Direct3D 11 - Mipmap level selection

When we sample a texture resource through an SSO in HLSL, how is the mip level selected for sampling; assuming the texture resource contains mips? The SSO has parameters that seem to be concerned ...
0
votes
0answers
31 views

How to render many regions from the same texture using UV mapping?

I tried to apply some things that look like a "texture atlas". I would like to load 1 big texture which includes many small textures, my goal is to render each texture separately. I tried to use UV ...
1
vote
1answer
44 views

Texture R8_FLOAT format?

I'm working on SAO (http://graphics.cs.williams.edu/papers/SAOHPG12/) and I want to store my ambient obscurance term (a value between 0.0 and 1.0) in a texture. When I did shadowmapping, I created ...
0
votes
2answers
57 views

How do I use the DirectX Extension-Library in Windows 8?

I need to use the extended DirectX-Library (D3DX...), but I am programming on Windows 8 (VS), so the DirectX 11-SDK is already included. However, it's included without the extension-library. Do I ...
0
votes
1answer
69 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 = ...
1
vote
1answer
78 views

Static constants set to default value in HLSL

I'm using dx11 and I'm working on SSAO. I am having wierd results, so I tried debugging it using RenderDoc and stepping through the pixel shader log, all the values of the static array seems to ...
1
vote
0answers
33 views

Direct X 11 2D Books/Resources [closed]

I would like to learn Direct X 11 (coming from XNA) but I cannot find any good resources. All the resources I found either focus exclusively on 3D, or use so many third-party solutions it does not ...
0
votes
1answer
48 views

DX11 Reusing Command Lists

My team is working on an engine implementation and we are trying to add multithreaded scene traversal for updating and rendering our components... The question has come up as to whether or not we can ...
1
vote
0answers
63 views

Cubic bezier polygon clipping

I have a large cubic bezier defined 2D polygon area which I need to render in DX11 real-time to create as many 4096x4096 textures as needed. An average control point count would be around the 12k and ...
0
votes
1answer
149 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 = ...
0
votes
1answer
97 views

how does an SM5 shader handle loops and if statements? (HLSL/CG)

How does an SM5 compilation handle loops and if-else statements, are branching execution routines unwound and if so, to what degree? Is it only Direct Compute that can optimize branching code? ...
0
votes
1answer
84 views

CSM DX11 issues

I got CSM to work in OpenGL, and now Im trying to do the same in directx. I'm using the same math library and all and I'm pretty much using the alghorithm straight off. I am using right-handed, column ...
0
votes
0answers
31 views

Animating colors in a Direct2D Linear or Radial GradientBrush

Is it possible to change colors in a Direct2D brush once created? For example, if I create a LinearGradientBrush can I interpolate the value of the color in one GradientStop to a target color over ...
1
vote
1answer
67 views

How do I use _com_ptr_t with RenderTargetView and DepthStencilView?

I have successfully used _com_ptr_t with the ID3D11Device and IDXGISwapChain but when applying the same reasoning to the RenderTargetView and DepthStencilView, the function ...
0
votes
1answer
173 views

Can't sample texture in HLSL using DX11

Environment: Windows 7 x64 Visual Studo 2012 DirextX11 HLSL Shader Model 5 Ogre 1.9 Okay, so I'm trying to sample a texture in my pixel shader but I'm coming across some strange problems. Here's ...
0
votes
1answer
117 views

Fullscreen triangle SV_POSITION and deferred shading

So I'm trying deferred shading in DirectX11. I am using the following method (used in the FXAA shader and described here: http://www.altdev.co/2011/08/08/interesting-vertex-shader-trick/) to render ...
2
votes
0answers
99 views

DX 11 Specular Highlights in Deferred Renderer

I am currently implementing a deferred renderer in DX11.1. Right now I am having a problem that I can't seem to crack with specular highlights when I have multiple light sources. I keep a vector of ...
1
vote
1answer
66 views

Why does this no longer render the “test tri”? [closed]

So I got this code about rendering a shaded tri using sharpDX ... var vertexShaderByteCode = ShaderBytecode.CompileFromFile("MiniTri.fx", "VS", "vs_4_0", ShaderFlags.None, EffectFlags.None); var ...
1
vote
0answers
68 views

Realtime local reflections of particle system

I'm finding my way around CryEngine 3 (through Steam) and want to create a simple effect where a fire on shore is reflected in a body of water. For testing purposes, I've made the water dead calm... ...
1
vote
1answer
64 views

D3D11 shader signature validation with SV semantics

I'm trying to figure out what the rules are for linking the outputs of one shader stage to the inputs of the next. Since D3D11 does not have any error checking for linkage between shader stages, I ...