DirectX 11 is the latest release of Microsoft's collection of APIs which contain features to aid in game development.
0
votes
2answers
79 views
First person camera: problem
I have created a simple camera class, moved it from my C# (XNA) source to C++ for d3d.
Commonly it is okay, but something is wrong with rotation.
If i increase its pitch/yaw values, according to ...
2
votes
1answer
46 views
Early Z-test / depth-test in DirectX 11
As a DirectX noob i'm trying to wrap my head around depth buffers and specifically how pixel shaders are called for obscured pixels.
From what i understand, the rasterizer calls the pixel shader for ...
0
votes
0answers
14 views
How do I get the neighbour patches of an edge/vertice to seam patches together?
I'm working with HLSL and the meshes of the models are triangles solely. I'm translating the vertices depending on the height map "color" and the normal vector direction. without having the average of ...
0
votes
1answer
69 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 ...
1
vote
1answer
74 views
Which coordinate space is the canonical default for each shader pipeline stage?
I'm working with Direct3D 11 and HLSL. I use four different shaders (vertex, hull, domain and pixel).
I always have troubles using the right coordinate space in my shaders. Could somebody identify ...
-1
votes
0answers
44 views
Focus to object
I have the following problem. I want to zoom to my object. I have the camera in sphere coordinates. So the camera position has 2 angles and a length. For zooming I want to change the length of the ...
4
votes
2answers
133 views
+100
Calculate mipmap level in a loop with varying iteration?
How can I calculate the correct mipmap level in a shader? It needs to be used in a loop which runs a variable number of times so the compiler will not allow me to use Sample or the derivative ...
0
votes
1answer
98 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
75 views
C++ FBX Animation Importer Using the FBX SDK
Does anyone have any experience using the FBX SDK to load in animations. I got the meshes loaded in correctly with all of their verts, indices, UV's, and normals. I am just now trying to get the ...
2
votes
0answers
53 views
Stereo 3D: drawing 2D elements at apparent screen depth
I'm developing an application making use of DirectX11's stereoscopic features. At such I am not relying on nVidia's automatic implementation. That means I have to replicate a way to render 2d elements ...
1
vote
0answers
25 views
Directx Texturing problem
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 ...
0
votes
0answers
57 views
DirectX Tutorial code not working
I've been reading the tutorials for DirectX 11 at http://www.directxtutorial.com/Lesson.aspx?lessonid=11-4-5. I've run the code after every lesson, but it didn't work for lesson 5. The error looks ...
3
votes
1answer
65 views
Direct3D reducing DrawIndexed CPU usage
I am trying to optimise some of my rendering to get is useable on lower end machines (in my case a 2GHz i5 laptop with a GT 520M).
A quick investigation showed that the GPU isnt actually getting to ...
3
votes
1answer
110 views
How do these Direct3D 11 components work together?
I am having a really hard time to understand how the following Direct3D components play together and what they do (or exist for) while creating a scene on the screen.
render target view
render ...
0
votes
1answer
34 views
Accessing and changing texture data in SlimDX
How can I access and change texture data in SlimDX? I have a Texture2D and a Texture3D and I need to be able to go in and change either a single or group of pixels.
0
votes
0answers
33 views
No Triangle on-screen after following Braynzarsoft DirectX 11 tutorial
I've never done any DirectX stuff (only OpenGL) so I thought the best way to migrate was start from the start to really see what would be different.
I decided to go for the Braynzarsoft tutorials ...
0
votes
1answer
70 views
DirectX 11, using Tessellation & Geometry shader in a single pass
Before all, sorry for my poor english !
With DirectX 11, i'm trying to create a random map full with GPU.
Using Hull shader stage, I'm managing LOD with tessellation.
Using Domain shader stage, I'm ...
0
votes
1answer
66 views
Transforming object world space matrix to a position in world space
Im trying to make a function for picking objects with a bounding sphere however I have run in to a problem.
First I check against my my bounding sphere, then if it checks out then I test against the ...
1
vote
1answer
73 views
Writing to a structured buffer with a compute shader (D3D11)
I have some problems writing to a structured buffer. First I create a structured buffer that is filled with float values beginning from 0 to 99. Afterwards a copy the structured buffer to a CPU ...
1
vote
1answer
39 views
How can I compile SM 3.0 effects in D3D11 in SlimDX?
var bytecode = ShaderBytecode.CompileFromFile("shaders\\testShader.fx", "fx_5_0", ShaderFlags.None, SlimDX.D3DCompiler.EffectFlags.None, null, null, out str);
var effect = new ...
4
votes
1answer
64 views
Geometry Shader : points + Triangles
I have different Shaders and for each Shader a instance of the ShaderClass class, which initializes the Shaders, Renders the Shaders, etc.
I use most of the Shaderclasses without Geometry Shader, but ...
0
votes
0answers
113 views
Convert OpenGL code to DirectX
First of all, this is kind of a follow up question on @byte56 excellent anwser on this question concerning picking algorithms.
I'm trying to convert one of his code examples to directX 11 however I ...
-1
votes
1answer
102 views
Why was the DirectX mesh interface removed? [closed]
I'm currently working with D3D 11 and if I understood it correctly, D3D 10 had a mesh interface built in to it which was removed in 11.
If this is correct, why was the mesh interface removed? It ...
2
votes
1answer
70 views
Why is it when I render a basic cube, my editor's grid changes too?
I have one HLSL file for DirectX11 that only has input layout for color and position. Then another HLSL file for the simple cube that has position, normal and textures. What I noticed is when I render ...
4
votes
1answer
82 views
How can I emulate point sprites in D3D11?
I have points which I pass to a vertex shader and then to a geometry shader, but now I want to get from the geometry shader a "bigger" point. So the point should get a "dadius" like it was possible in ...
3
votes
1answer
91 views
Using a switch command in one shader vs multiple shaders
If you have multiple shaders, could you instead of switching between shaders all the time just have one shader with a switch and each case will send you along to another shader function which you ...
1
vote
1answer
111 views
Painter algorithm on transparant objects
Why do you have to use the painter's algorithm when drawing transparant objects ? Can't you just use a z-buffer, draw all non transparant/opaque objects, then draw all transparant/opaque objects last?
...
2
votes
1answer
77 views
Mesh objects and a draw function
I'm currently working with a mesh class so I can easily create mesh objects. Now I want a draw function in my mesh class so when ever i want draw it to the screen I can just call it without any fuss. ...
2
votes
1answer
115 views
How do you add rotation to particles?
Today I was working on a particle system and I can't figure out how to give the particle billboards a rotation (so to have them spinning clockwise or counter-clockwise while facing the player). I ...
1
vote
1answer
102 views
DirectX11 Gamma Correction
I am writing a game using SharpDX with DirectX11 and I have been reading that it is important to apply gamma correction to my engine in order to perform correct linear lighting calculations.
So I ...
3
votes
1answer
67 views
Implement Displacement Mapping: Gaps along seams
I am implementing Displacement mapping using DirectX 11 with its new tessellation stages.
Diffuse map and displacement map are generated by xNormal.
The result after I applied displacement mapping is ...
2
votes
1answer
41 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 ...
3
votes
2answers
97 views
Why is there a different set-constant-buffer function for every shader type?
Why are there VSSetConstantBuffers(), GSSetConstantBuffers(), PSSetConstantBuffers() (and so on) instead of just one SetConstantBuffers() for all shaders?
Should I have completely separate constant ...
0
votes
2answers
99 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
63 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 ...
3
votes
0answers
74 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 ...
1
vote
1answer
100 views
How to disable mipmapping?
I'm making a 2D game in which I create some textures dynamically for displaying as simple 2D quads. To achieve this, I call ID3D11Device::CreateTexture2D that requires a D3D11_TEXTURE2D_DESC.
typedef ...
1
vote
1answer
92 views
Compiler cannot find some DX11 types (but can find DX10)?
my problem is probably trivial but I'm new to DX and have some trouble. I've found a code snippet (of a Shader class) with ID3D10Effect and ID3D10EffectTechnique types but I'm using DX11 so I changed ...
2
votes
1answer
45 views
Can I count all the allocated textures in D3D11?
Is it somehow possible to get the count of all texture objects on a device?
-2
votes
1answer
74 views
Does it matter where I initialize Directx11's shader constant buffer?
Should I initialize it before Map() or before `Unmap()? Does it make a difference?
-1
votes
1answer
99 views
Are there any open-source Direct X code-bases that I can look at to learn from as a beginning Direct X and graphics programming student? [closed]
I'm a third-year university student and I've recently begun studying Direct X 11. Mostly I've been following the samples from the SDK and reading a lot out of the MSDN. Although I have a decent ...
1
vote
1answer
79 views
When would a GPU need to write data to a vertex (or other) buffer?
I'm trying to understand why, when and how a GPU would need to write data to some buffer inside its own Video Ram.
In Direct3D 11, there are two flags that concern this, which are ...
4
votes
1answer
181 views
How can I use shaders to make a square have a waving effect?
I'm new to using shaders to do some fancy effects and I'm struggling with them. I'm using DirectX 11 and HLSL. I have this square in the middle of the screen:
It's just a square that I've created ...
1
vote
1answer
80 views
Do textures that are inside a shader resource need to be explicitly released too? (DirectX 11)
I have a ID3D11Texture2D (that I've created manually) inside a ID3D11ShaderResourceView. When I want to Release() the resource view, do I need to Release() the texture that it is inside too? Or is it ...
1
vote
1answer
91 views
changing depth stencil state in DirectX11
An example from Frank D Luna's 3d Game Programming with Dx11 shows the following effect technique:
technique11 DrawTech
{
pass P0
{
SetVertexShader( CompileShader( vs_5_0, DrawVS() ) );
...
1
vote
1answer
145 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 ...
0
votes
1answer
174 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 ...
7
votes
1answer
227 views
DirectX11 without window attached?
I just wonder, if it's possible to initialize and use DX11 or DX9 for offscreen rendering only - meaning with no attached window.
My intention is to do some GPU benchmarking before opening actual ...
2
votes
1answer
128 views
How can I render the whole faces instead of only the vertices? [closed]
I'm doing my master thesis in comparing DX9 LoD with DX11 Tesselation LoD. Therefore I use a ShaderManager that calls either the shader for the DX9 implementation, where the model is exchanged by the ...
2
votes
1answer
70 views
Emulate border color texture address mode efficiently
In WinRT the border color texture address mode is not supported.
The best I came up with in emulating the border address mode, is doing this in my pixel shader:
float4 tcol = tex.Sample(texSampler, ...