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
36 views
+50

The Pixel Shader unit expects a Sampler configured for default filtering to be set at Slot 0 […]

I don't understand this error. The full output being : The Pixel Shader unit expects a Sampler configured for default filtering to be set at Slot 0, but the sampler bound at this slot is ...
0
votes
1answer
274 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 ...
0
votes
0answers
4 views

DirectX11 Line list axis [on hold]

I tried drawing axis x, y, z. But, I couldn't see anything after rendering process. Before then, I found axis. When eyes(in app camera) are near at axis, I can see the axis. When eyes are far from ...
1
vote
1answer
133 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
1answer
30 views

Problem with ID3D11DeviceContext::CopyResource method - How to properly read a texture CPU-side?

I am trying to make a full copy from a render target texture to a staging one but it seems my data length ends up being only 4 in length instead of 921600 (1280 * 720). Here is my textures ...
0
votes
0answers
22 views

crash while debug shader [on hold]

I build a very basic directx 11 game that render simple cube with vertex and index buffer. I am run my game in graphic diagnostic and capture some frames. The problem is when I open the frame in ...
0
votes
2answers
55 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, ...
0
votes
1answer
40 views

Why isn't my cbuffer updating?

I am really frustrated because my cbufer isn't updating. This is my VS: cbuffer MatrixBuffer: register(b0) { float4x4 worldViewProj; }; struct VertexIn { float4 Pos : POSITION; float4 Color: COLOR; ...
1
vote
0answers
17 views

Is it possible to have a SoA Vertex Buffer in DirectX 11?

Hi! I'm wondering if it is possible to structure a Vertex Buffer in a SoA approach like this { x1, x2, x3 . . . xn, y1, y2, y3 . . . yn, z1, z2, z3 . . . zn } instead of the traditional AoS ...
0
votes
1answer
155 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 = ...
6
votes
0answers
302 views

Strange SSAO effect (wrong position/normal textures in view space?)

I try to create an SSAO effect in my game engine (DirectX 11, C++), based mainly on gamedev.net tutorial by José María Méndez. Unfortunately, it doesn't cover texture-creating problem (normals, ...
0
votes
1answer
203 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
84 views

How to pass a big (60+) amount of variables to an HLSL pixel shader?

I am in trouble at trying to pass a big amount of variables needed for my pixel shader computations. After trying and failing to link my struct to a cbuffer (data alignement mismatch) I tried passing ...
0
votes
1answer
389 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
357 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
2answers
135 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.
2
votes
2answers
279 views

C++ struct doesn't align correctly to a pixel shader cbuffer

To expand from my previous question, I must add I can't correctly map my C++ structs to a corresponding cbuffer inside the pixel shader. When outputing random colors defined in the struct C++ side, it ...
0
votes
1answer
22 views

Getting mouse movement value with DirectX Tool Kit

today I want to ask a question about how to get mouse movement value with DirectX Tool Kit. While I can certainly use Mouse::SetMode(MODE_RELATIVE), to do this, I want to be able to get the mouse ...
4
votes
2answers
420 views

Mapping a C++ struct to an HLSL cbuffer

Out of curiosity (and peace of the mind...) I wondered how DirectX decides which attribute from a struct corresponds to the right variable inside an HLSL cbuffer-register(x) (apart from the order/type ...
1
vote
2answers
840 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 ...
1
vote
1answer
240 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
1answer
49 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, ...
1
vote
1answer
31 views

How to correctly pass multiple light structures to shader stage?

I'm having some problems when passing multiple light structures to a shader stage. I'm using an array of point lights that is updated each frame. This is my code for creating the buffer ...
1
vote
0answers
51 views

How do you fix wobbling shadow edges?

I've implemented an omni-directional shadow map and I've noticed a rather unwanted behaviour on the shadows. It seems like when the angle between the occluded points and the light source is really ...
2
votes
0answers
31 views

How do I sample a cubic shadow map in DirectX 11?

I've implemented a cubic shadow map for dealing with omni-directional light sources in my scene. By defualt it produces hard shadows Obviously a shadow map with higher resolution (currently using ...
0
votes
1answer
606 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
2answers
33 views

DDS files with DirectX Tk, Some work, some don't

I am learning DirectX with the DirectX Tool Kit library and everything seems to be going smoothly but I have run in to a tiny little hiccup. I am currently trying to load DDS textures from file ...
0
votes
1answer
25 views

Viewport and debug session

I define and set viewport using this piece of code: D3D11_VIEWPORT viewport; viewport.Width = (FLOAT)pBspWindow->GetWidth(); viewport.Height = (FLOAT)pBspWindow->GetHeight(); viewport.TopLeftX ...
0
votes
0answers
66 views

Speed up the DirectX game - how else can I boost the fps with typical triangle drawing?

I am writing my own c++/DirectX engine. I've made the basic framework and here comes the time for optimizations. I don't want to focus on optimizing the resources themselves right now (meshes, ...
1
vote
1answer
57 views

DX11 Mixing 2D and 3D

So I am somewhat new to working with DirectX rendering, and I have done some 2d and 3d work. I am planning on working on a new application where I will be rendering a bunch of 3d scenery, and then ...
0
votes
0answers
33 views

Sphere texture mapping using Directx 11

I have a spherical panoramic image which I would like onto a sphere and centre it around the camera so I can look around the image, how should I best go about this? I will be using DirectX11. ...
1
vote
1answer
68 views

Map a normal image to a cubemap

How can I map a normal non T form image to a cube map? and if there is no manner with which to do this, is it possible to, via DX11, split the image, as the image may be generated on the fly? ...
0
votes
0answers
22 views

Update part of dynamic Vertex Buffer. SharpDX

I'm creating application to draw simple 2D charts in a fast way. Updating my VertexBuffer is implemented as below: Device.ImmediateContext.MapSubresource(_signalVertexBuffer, ...
0
votes
0answers
21 views

Directx11 Shadow Mapping Not Rendering

I'm reading luna directx11 book,i want to implement shadow mapping using it but i'v got a problem with it here is the image from my scene(at bottom right you can see shadow map,why is it in red color? ...
0
votes
1answer
48 views

Transformation problems with hardware instancing in DirectX 11

I'm getting some wonky geometry in my application when trying to use instancing. I'm not sure if I'm doing the mapping of my per instance data wrong. This is how my mapping looks like: XMMATRIX scale ...
0
votes
2answers
27 views

How to handle mesh update in its vertex buffer

suppose i have a mesh, it can undergo any kind of changes - bend, stretch, even been torn. How should i update vertex buffer in DirectX for this mesh. For now i recreate it every time, and i don't see ...
1
vote
2answers
1k 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
0answers
72 views

Using a Unity RenderTexture in a native plugin (4.6.1)

I am trying to create a RenderTexture in unity, but I want to update it using a plugin. I am doing this on Windows 7 Pro 64bit and I wrote the plugin using VS2010 professional. Here is the code in ...
0
votes
1answer
53 views

Will DirectCompute run this HLSL code

I found a sample about how to run a HLSL code with DirectCompute. https://code.msdn.microsoft.com/windowsdesktop/DirectCompute-Basic-Win32-7d5a7408 This is the HLSL script I want to run ...
0
votes
1answer
23 views

DirectX 11 throws out my pixel shader when I multiply verts by MVP

Been following some tutorials online for DirectX 11. I was able to successfully get a triangle to render in screen space. But the moment I add a MVP matrix, my triangle disappears! Looking at it in ...
1
vote
1answer
115 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 ...
0
votes
0answers
50 views

Animations in games

I wonder how skeletal animations in games work. I am Writing my own Graphics Engine for "fun", and I have come across several problems with animations. Here is how I do it right now: 1: Load the ...
0
votes
1answer
74 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. ...
0
votes
0answers
47 views

DirectX 11, Render vertices as points in Unity

I'm attempting to asses what is the most efficient manner to render vertexes as points in Unity with DirectX 11. I'm attempting to create a point-cloud instancing shader, that creates vertices in ...
0
votes
0answers
41 views

Buffer resource as shader resource view

I am trying to build a shader that change the output color according to something that happen in my c++ code In my code I create a buffer with four element(each element containe four float - RGBA) ...
0
votes
0answers
23 views

Rotating a directional light about y axis (DirectX11)

I have 2 fixed objects in a scene and a directional light which I am rotating on each update but I am not sure if I am doing it correctly after looking at the results. Here is the code: rot += ...
0
votes
1answer
100 views

How to access raw texture data in DirectX 11?

I want to get access to a texture's pixel color data on the CPU. When trying to map the texture, I get E_INVALIDARG in return from ID3D11DeviceContext::Map. ID3D11ShaderResourceView* resourceView; ...
0
votes
2answers
82 views

Disable/Remove Warning about a not bound Render Target View

So to render into my shadow map depthstencil buffer i only bind a DepthStencilView to the Output Merger. Like this m_pContext->OMSetRenderTargets(0,0, m_pShadowMapDV); ...
0
votes
1answer
59 views

VS Graphics Diagnostic Tools and IDXGIFactory::EnumAdapters()

I have the following constructor for my main application class where i enumerate all adapters, that looks something like this: CApplication::CApplication() { IDXGIFactory* factory; ...
33
votes
3answers
10k views

How does hardware tessellation work?

I would just like someone to explain in relativly clear terms how hardware tessellation works considering it is the new buzzword with DX11. Thanks.