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
3answers
218 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
824 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
58 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 ...
1
vote
0answers
57 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 ...
1
vote
0answers
60 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 ...
1
vote
0answers
36 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 ...
1
vote
0answers
65 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 ...
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
73 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
2answers
143 views

Implementing directional lighting in voxel based polygon-engine

I'm having trouble implementing directional lighting. (I'm not that familiar with 3D.) The problem is that the lighting does not "follow/flow with" the other blocks next to them. How should I fix ...
1
vote
1answer
76 views

Creating Direct2D PathGeometry from XAML format

Is it possible to create a Direct2D PathGeometry object from a XAML string (or from any other vector format) or do I have to create such a parser myself?
1
vote
1answer
145 views

How to make other semantics behave like SV_Position?

I'm having a lot of trouble with shadow mapping, and I believe I've found the problem. When passing vectors from the vertex shader to the pixel shader, does the hardware automatically change any of ...
1
vote
0answers
40 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 ...
1
vote
0answers
52 views

Approximating Subdivision Surfaces with Gregory Patches for Hardware Tessellation

I'm trying to implement the approach (http://research.microsoft.com/en-us/um/people/cloop/sga09.pdf). Unfortunately I'm not quite clear regarding the formulas in chapter 3, I am hoping to get some ...
1
vote
0answers
140 views

Box Zoom - Fit to rectangle

I want to box select a section of my screen and then zoom in that selection. So I have four corner points (my rectangle which I can drag with the mouse) in pixel coordinates. I have a perspective ...
1
vote
0answers
76 views

Directx Texturing problem [closed]

I've recently started exploring Directx 11. I'm almost done the introduction so I started making my own *.obj parser and it works beautifully. I accounted for the right-hand coordinate system of 3ds ...
1
vote
1answer
210 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
3answers
210 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
583 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
91 views

InputLayout handling [duplicate]

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
62 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
318 views

D3DX11CreateShaderResourceViewFromFile returns E_FAIL [closed]

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
127 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
228 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
4k 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

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 = ...
0
votes
1answer
214 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
295 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
126 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
2answers
341 views

How do I get the DirectX project templates to appear in Visual Studio?

I have DirectX11 on Windows 7, and I also have VS13 Express for Desktop. In some tutorials I have seen that there's an option on VS13 for new project on DirectX, but doesn't appear in my VS13. Is it ...
0
votes
1answer
234 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 ...
0
votes
2answers
516 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
219 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
1answer
87 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
1answer
107 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
117 views

Storing few values in an int - small gain

This might be a bit hard-to-answer question, but... I had a DirectX::XMFLOAT3 as a vertex attribute. I have changed it to just an int by placing the 3 floats into int (using only 8 bits per float). In ...
0
votes
3answers
806 views

XNAMath: Question on types XMFLOAT3/4, XMVECTOR (D3D 11)

I don't want to use XMVECTOR which i currently use in my DirectX 11 C++ game code. Because it is too much for me in memory. I want to use XMFLOAT3 or 4, but the problem is there is no matrix/vector ...
0
votes
1answer
675 views

Direct3D11 + Assimp imported model corrupted/failed

I use Assimp library to import vertex and index data from model file. I don't know how to correctly create index buffer from mFaces array of aiMesh. Or something wrong, because i my model is ...
0
votes
1answer
330 views

Game only runs at 60fps in windowed mode with a 120hz monitor?

In fullscreen the game will run at 120fps fine, the correct refresh rate for the monitor, but in windowed mode it only runs at 60fps. If I disable VSync then it runs at thounsands of fps so it's not ...
0
votes
1answer
229 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
771 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
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, ...
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?
0
votes
1answer
576 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
37 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
49 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 ...
0
votes
1answer
43 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
1answer
66 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
2answers
62 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
71 views

odd line artefacts on my screen? (C++ DirectX11)

I'm getting some odd lines on my screen in my program: They seem to be in a static location on the screen and occur at regular intervals. They are also on the horizontal too but are harder to see in ...