DirectX 11 is the latest release of Microsoft's collection of APIs which contain features to aid in game development.
1
vote
1answer
325 views
DirectX / Instance Buffer - How To Use Instance Buffers To Enable Reuse of VertexBuffer Data?
I created a simple Model framework in C++ 11 so that the same model can be rendered in different parts of a scene.
What I am trying to figure out is how to reference VertexBuffer data already "set" ...
1
vote
1answer
101 views
How can I render primitives to pixel coordinates?
I'll emphasize that I am very new to graphics programming. I've been using XNA up until now and I've been looking for a way to build simple 2D functionality with textured quads. I'm sort of starting ...
1
vote
1answer
116 views
Direct2D gamma correction
I'm using direct2d and direct3d together and having an issue with gamma correction. My direct3d backbuffer is using an SRGB format and when I render images from direct2d onto the direct3d surface, ...
1
vote
1answer
214 views
ERROR #342: DEVICE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND
I've stared at this for at least half an hour now and I cannot figure out what directx is complaining about. I know this error normally means you put float3 instead of a float4 or something like ...
1
vote
1answer
499 views
Question about mipmaps + anisotropic filtering
I'm a bit confused here and maybe someone can explain this to me. I created a simple test texture for my terrain which is nothing more than a solid green color with a black grid overlayed on top of ...
1
vote
1answer
227 views
What are the tessellation factors Direct3D11?
I don't quite understand the documentation but if I was to tessellate a mesh using 3 control points in Direct3D11 with the "tri" domain am I right in thinking that
SV_TessFactor is how many times to ...
1
vote
3answers
174 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 :
...
1
vote
1answer
607 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
17 views
Independent blending with DXGI_FORMAT_R16G16_SINT
I'm implementing direct volume rendering engine with volume bricking, but I'm stuck with this problem:
For each volume brick I render to color render target [CRT] (for visualization) and to data ...
1
vote
0answers
28 views
DirectX11 : get number of texture objects
Is it somehow possible to get the number of all texture objects on a device context?
thanks!
1
vote
1answer
110 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 ...
1
vote
0answers
107 views
Shaders Working in XNA but not Monogame Win8
Hey so I'm bringing a shader over from XNA to Win8. To test things I'm using josack's tutorial on pixel shaders:
http://blog.josack.com/2011/07/xna-2d-dynamic-lighting.html
I've got it running in my ...
1
vote
0answers
67 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 ...
1
vote
1answer
137 views
Is my idea of how to use matrices to layer 2D on top of 3D correct?
I'm new to using matrices, so I'd like some input on whether I've understood the use of them in the context described in the title.
Right now I have a small Direct3D 11-based game engine which ...
1
vote
0answers
86 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 = ...
1
vote
3answers
171 views
relationship between the model and the renderer
I tried to build a simple graphics engine, and faced with this problems:
i have a list of models that i need to draw, and object (renderer) that implements IRenderer interface with method ...
1
vote
0answers
275 views
Need help transforming DirectX 9 skybox hlsl shader to DirectX 11
I am in the middle of implementing a skybox to my game. I have been following this tutorial http://rbwhitaker.wikidot.com/skyboxes-2. I am using MonoGame as a framework and in order to support both ...
1
vote
0answers
75 views
InputLayout handling
Where are you supposed to store InputLayout?
Suppose i have some basic structure like.
class Mesh
{
List<MeshPart> MeshParts
}
class MeshPart
{
Effect Effect;
VertexBufferBinding ...
1
vote
0answers
47 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 ...
1
vote
0answers
203 views
D3DX11CreateShaderResourceViewFromFile returns E_FAIL
When trying to create a texture, my call to D3DX11CreateShaderResourceViewFromFile keeps returning E_FAIL. To me that's about as generic as it gets, and I can't figure the problem out. The code looks ...
1
vote
1answer
111 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 ...
0
votes
2answers
205 views
DX11 - Weird shader behavior with and without branching
I have found problem in my shader code, which I dont´t know how to solve.
I want to rewrite this code without "ifs"
tmp = evaluate and result is 0 or 1 (nothing else)
if (tmp == 1) val = X1;
if (tmp ...
0
votes
3answers
2k views
Should I go with OpenGL to see my future in Game Development industry? [duplicate]
Possible Duplicate:
Should I continue studying OpenGL or just switch to DirectX to give me a better chance of landing a job in the game industry?
I tried Google but found quite old ...
0
votes
1answer
148 views
How do I implement my old OpenGL-based gfx_render_triangle_list using DX11?
I am working at a game that has lots of procedural content. I had built a game engine using OpenGL that handles everything needed for creating a basic 2D game, sprites, primitives, blending, polygons ...
0
votes
2answers
149 views
HLSL compiler specification (optimizations)
Can I read somewhere about optimizations that HLSL compiler performs?
For example, in some codes I have different variables that get a constant value (just to let myself adjust the shader with other ...
0
votes
2answers
174 views
Multipass shader in DirectX 11
As far as I understand for DirectX11 it is recommended to have multiple single pass shaders, so the the method with multiple passes in one shader file is deprecated. Is my understanding correct and ...
0
votes
1answer
111 views
Running advanced floating point calculations on the GPU?
I want to learn how to use AMD Stream and NVIDIA CUDA (PhysX) to calculate things such as locations. I have not yet found where to get the SDK for these (I can't test the CUDA things because I have a ...
0
votes
2answers
58 views
What are registers in HLSL for?
I've read this: http://msdn.microsoft.com/en-us/library/windows/desktop/dd607359%28v=vs.85%29.aspx but it's more of a syntax descrption and not a purpose explanation. What actually are registers in ...
0
votes
1answer
150 views
Why does setting a geometry shader cause my sprites to vanish?
My application has multiple screens with different tasks. Once I set a geometry shader to the device context for my custom terrain, it works and I get the desired results.
But then when I get back to ...
0
votes
1answer
460 views
E_FAIL: An undetermined error occurred (-2147467259) when loading a cube texture
I'm trying to implement a skybox into my engine, and I'm having some trouble loading the image as a cube map. Everything works (but it doesn't look right) if I don't load using an ...
0
votes
2answers
1k 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, ...
0
votes
1answer
4k views
How did you learn DirectX 11? [closed]
How did you learn the DirectX 11 API? MSDN documentation, tutorials, blogs, sample applications, books, etc?
0
votes
1answer
469 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 ...
0
votes
1answer
31 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
99 views
Weird shader compiler error
I am trying to draw a full screen quad without a vertex buffer.
SV_VertexID should do the trick, although I get a weird error in my shader on the following line:
PS_IN VS(uint VertexID : ...
0
votes
1answer
79 views
How do I get buffers from another class for CreateBuffer
I believe this is not strictly specific to DirectX but just to pure c++ language problem.
I have a class (simplified):
class A {
public:
ID3D11Buffer* getVBuffer() const {
return ...
0
votes
4answers
437 views
What is the format of DXGI_FORMAT_D24_UNORM_S8_UINT?
I'm trying to read the values in a depth texture of type DXGI_FORMAT_D24_UNORM_S8_UINT.
I know this means "24 bits for depth, 8 bits for stencil" "A 32-bit z-buffer format that supports 24 bits for ...
0
votes
1answer
321 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 ...
0
votes
1answer
557 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 ...
0
votes
1answer
367 views
Creating a simple 2d engine (C++), best way to create an Sprite class?
Since MS announced that they are not give more support to XNA , for me was an opportunity to start to learn DirectX , so i wanted to learn DX11,
i was following this tutorials
...
0
votes
1answer
93 views
Rendering an object more than once
Right now I'm facing the issue of rendering the same objects more than once in Directx 11, as the object has:
A diffuse shader
A directional lighting shader
A texture shader
Now the final color ...
0
votes
1answer
234 views
Loading a vertex shader compiled by Visual Studio 2012
I've got an extremely simple vertex shader that Visual Studio 2012 compiles into a .cso file. Now I want to load this file and create a vertex shader on the graphics device using the ...
0
votes
1answer
122 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 ...
0
votes
1answer
372 views
Building View Matrix in Direct3D11
Am I doing it right? I converted this.
m_ViewMatrix = XMMatrixLookAtLH(XMLoadFloat3(&m_Position), lookAtVector, upVector);
to this one.
XMVECTOR vz = XMVector3Normalize( lookAtVector - ...
0
votes
1answer
98 views
Can I animate render targets or the swap chain?
I want to animate some synthetic video bits to fullscreen w/o tearing. Can I set up D3D 9/10/11 in exclusive mode, and have it present a series of buffers that I'm writing to?
I know how to copy ...
0
votes
1answer
475 views
Render full-screen gradient or texture
What's the simplest way to fill the background of the screen with a gradient or a texture in Direct3D 10/11?
I'm building a Windows 8 metro app in which the camera never moves and I render some ...
0
votes
1answer
347 views
How to set sprite source coordinates?
I am creating own sprite drawer with DX11 on C++. Works fine but I dont know how to apply source rectangle to texture coordinates of rendering surface(for animation sprite sheets)
...
0
votes
1answer
2k views
Where have the Direct3D 11 tutorials on MSDN have gone?
I've had this tutorial bookmarked for ages. I've just decided to give DX11 a real go, so I've gone through that tutorial, but I can't find where the next one in the series is!
There are no links from ...
0
votes
1answer
398 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.
...
0
votes
1answer
490 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 ...

