DirectX is a set of multimedia APIs from Microsoft aimed primarily at game developers. Popular APIs within the DirectX collection include Direct3D, XInput, and XAudio.

learn more… | top users | synonyms (1)

0
votes
2answers
45 views

Shadow mapping too slow and ugly!

As many of you are, I am working on a game. I have just added my first attempt at shadow mapping (standard variation) and quite frankly I am very disappointed. I am literally squeezing as much out ...
0
votes
2answers
15 views

How to copy FrontBuffer to BackBuffer in DirectX11

I want to render the surface base on the the last surface. So I try to copy FrontBuffer to BackBuffer, but not work: //Get the BackBuffer(it will be FrontBuffer after SwapChain swapped the BackBuffer ...
0
votes
1answer
58 views

Load 2 triangles in a simple DX11 example

I'm following this tutorial, where they show how to setup a simple dx11 demo with a green triangle in the middle. I'd like to be able to modify it so that it shows 2 triangles instead, i modified the ...
1
vote
1answer
117 views

How to Load and Apply a Cube Map with DDS Texture Loader?

So I have been spending a lot of time recently implementing a working skybox/skysphere, and have almost completed it. The last thing that I need to do is to load my given texture, a skybox texture ...
0
votes
0answers
10 views

How to Copy the Contents of a DirectX Stream-Output Buffer to a Vertex Buffer?

I'm writing a very simple particle system in DirectX using the SharpDX wrapper. I use a constant buffer to pass a delta time to the vertex shader, which updates the position of the particles by simply ...
2
votes
1answer
213 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 = Models....
1
vote
1answer
23 views

DirecX 11 R8G8B8 24bit format without alpha channel?

This is maybe a stupid question but I can't seem to find texture format for simple 24bit R8G8B8? There is only 32bit R8G8B8A8, but some of my textures don't have alpha channel. Is there any way to do ...
1
vote
1answer
40 views

Texture mapping artifacts on certain surfaces

I am currently working on a 3d game engine, but am complete stumped on a problem involving texture rendering. Here is the rundown. My game engine renders meshes of the OBJ wavefront type. I have ...
2
votes
0answers
16 views

Problem Rendering a Wireframe Cube and Grid with DirectX 11

I am trying to draw a 3D Wireframe (just the lines that connect each vertex) Cube and a 10x10 grid with D3D11. So far, this is my code //************************************************************ //...
3
votes
1answer
2k views

Reading from a staging 2D texture array in DirectX10

I have a DX10 program, where I create an array of 3 16x16 textures, then map, read, and unmap each subresource in turn. I use a single mip level, set resource usage to staging and CPU access to read. ...
1
vote
0answers
22 views

Controllable color blending?

I'm relatively new to color blending in DirectX, and I'm hoping there is a relatively simple answer to this question. I am targeting Direct10.1. What I am trying to achieve is colour blending of two ...
1
vote
1answer
121 views

FBX SDK - Animation not Correctly Displaying in Game

This issue seems to arise with joint rotation animation. If anybody knows how to help, it would be greatly appreciated. //-------------------------------------------------------------------------...
3
votes
1answer
302 views

Why does writing to a D3DFMT_R32F render target clamp to 1?

I'm currently implementing a picking system. I render some objects in a frame buffer, which has a render target, which has the D3DFMT_R32F format. For each mesh, I set an integer constant evaluator, ...
4
votes
1answer
43 views

How to display unicode text in monogame?

I'm looking for ways to draw any characters that may be entered in any language, on any keyboard, so that I don't have any trouble with limited language support in a monogame project. So far I've ...
3
votes
0answers
25 views

Flicker when drawing multiple shapes over image based texture

I'm rendering video frames with multiple color filled shapes over it using SharpDx and D3D11. Rendering seems to be fine when just rendering the video frame and is as expected. Now if i draw a ...
1
vote
1answer
160 views

DX9 How to Apply HLSL Shader with StretchRect

Using DirectX 9,I'm trying to run a HLSL pixel shader on video frame data while copying it from one texture buffer to another texture buffer without displaying it. StretchRect at the end is what ...
1
vote
0answers
14 views

Problems setting up dx12 [closed]

I'm following the Frank Luna directX12 book, I have installed the windows 10 SDK etc but now, when I compile any project from his demo they wont build. Error I am getting is Cannot open source file ...
1
vote
0answers
25 views

How to Convert DirectX Texture2D to a DXGI Surface for WPF Rendering?

I have an image in my WPF application that uses a D3DImage to render DirectX content. On the DirectX side I render everything to a Texture2D using SharpDX (a C# DirectX wrapper), but I'm not sure how ...
7
votes
3answers
3k views

Why can't I get a bool packed and aligned into a D3D constant buffer?

Alright, I'm having a hard time getting a bool packed and aligned into a hlsl constant buffer and I'm not sure why. Here is the buffer in hlsl cbuffer MaterialBuffer : register(b1) { float3 ...
3
votes
2answers
37 views

How is a DirectX Adapter Different from a Device?

I'm relatively new to DirectX programming, and this is one of the more confusing issues I've encountered to date. According to the MSDN Documentation for DirectX 11: "A device is used to create ...
2
votes
1answer
67 views

How to get depth of vertex in 0 - 1 range

I want to get the depth of vertex in 0 to 1 range(like it done in the shader) and I do it like this D3DXVec3TransformCoord(&vertex, &vertex, &wvp); depth = vertex.z; It works(...
0
votes
0answers
51 views

A few questions about Order Independent Transparency

I've been looking through several different Order Independent Transparency algorithms. But very few of them seem to answer a few things. I understand that the idea of OIT is to not worry so much ...
1
vote
2answers
398 views

DirectX map/unmap

In my 2d game i want to use dynamic buffers to render sprites. My question is, when should i map unmap buffer? The 2 possibilities are: #1 //game logic map() fill buffer unmap() render() #2 //...
-1
votes
1answer
52 views

Volumetric Lighting/Light Shafts in DirectX

So currently I am trying to implement Light Shafts into my DirectX Engine. I read the Nvidia GPU Gems Article (http://http.developer.nvidia.com/GPUGems3/gpugems3_ch13.html) I am new to Graphics ...
2
votes
1answer
334 views

Run HLSL in C++ Basic Sample

I'm considering the idea of taking shaders written in HLSL and running them in an AviSynth plugin to process videos. This would allow accessing various shaders, and also to have GPU acceleration. I'm ...
1
vote
1answer
45 views

Dynamic Shader Linkage in DirectX12?

Do the dynamic shader linking concepts introduced in DirectX11 ShaderModel 5.0 still work in DirectX12? In the documentation the reflection API is still available (e.g. ID3D12LibraryReflection), ...
1
vote
1answer
53 views

DX11 CreateTexture2D

When i want to load texture i can either call CreateTexture2D without passing pointer to texture content passing Default usage and call UpdateSubResource or CreateTexture2D with pointer to texture ...
2
votes
1answer
107 views

Second pass in multipass effect is ignored

I am trying to render my vertecies in 2 passes, but it seems I am doing something wrong, because only one pass applying. I cannot make the second one work despite that second pass is applying. Here ...
0
votes
1answer
29 views

How to draw Alpha Masked fragments' depth to depth buffer?

I feel like an absolute idiot for asking this. But how exactly do safely draw the depth of a fragment featuring a Masked ( Alpha 1) texture on it's surface? So far I've literally been doing a depth ...
3
votes
1answer
733 views

rendering an image within c# & sharpdx dirext3d9 [game overlay]

I'm following this guide and the related blog post to implement a basic game overlay for DirectX 9 games using SharpDX. So the tutorial already have an example for text rendering but I need to be ...
0
votes
1answer
22 views

Problem with Frustum Culling Right-Handed(LookAtRH GLM)

I am trying to do Frustum Culling based on Goemetric Approach, however don't matter how much i try, the frustrum rotate to opposite side, i tried to find a solution over all internet, but couldn't ...
4
votes
1answer
407 views

Modifying depth values in PixelShader (SharpDX)

I'm relatively new to DirectX, and am currently converting some WPF 2D graphics code that displays geo-located sonar returns. I am using SharpDX, and rendering via a D3DImage. I've got the basics ...
0
votes
1answer
157 views

Windows 10 User has only DX 10.1 API

A user of ours has an issue whereby they cannot run our application, which requires DX11 API support and hardware support for DX10.1. The strange this about this issue is that the user is running ...
2
votes
3answers
1k views

How do I determine the look-at vector of a free-look camera?

I'm trying to create a free-look camera with DirectX 10. I've figured out how to get the directions for forward and back and left to right. However, I don't know how to rotate the look-at vector of ...
1
vote
1answer
135 views

Scene Graph: Does anybody have a real world example?

I'm trying to wrap my head around how scene graphs work, and how to apply that to my game, in the context of all my game objects, including assets, cameras, units, shaders, etc. All I can find are ...
0
votes
0answers
47 views

How to make Level Editor in C# for a DirectX engine in C++ [duplicate]

I have been trying for months to make a Level Editor for my C++ DirectX Engine. I have tried using a C++/CLI wrapper or P/Invoke to do this. Neither seems to work. Can someone let me see a sample of ...
1
vote
1answer
237 views

How do I render my DirectX C++ engine to a C# Panel?

The title pretty much sums it up. I'd like to know how I can get the HWND of my C# Panel object to my DirectX engine so I can render to it. I know it involves making a C++/CLI wrapper, but I'm not ...
0
votes
1answer
76 views

Game crashes when sound is finished

I'm trying to code a simple audio playback test game (which will be used in my actual project), and everything works fine, except for the fact that after the audio has finished playing, the game will ...
0
votes
0answers
17 views

HLSL DXGI_x_UNORM vs DXGI_x_UINT

I have a texture resource with a format of DXGI_x_UNORM I can then access the data in the HLSL using .sample or .load and it works exactly as expected. However if i simply change my format from ...
2
votes
0answers
103 views

Texture Mapping to procedurally generated geometry

How can I calculate texture coordinates of such geometry? The angle shown in the image (89.90 degree) may vary, therefore the geometry figure is changing and is not always such uniform.(maybe like ...
0
votes
1answer
120 views

Doing legacy DirectX Coding on Windows 10

I decided to study couple of old computer graphics books like Andre LaMothe's Tricks of 3D Game Programming Gurus. I feel like this book is full of great general computer graphics knowledge and I want ...
0
votes
1answer
37 views

DirectX 12: Problem with render target

I've got a problem with DirectX 12 I cannot figure out by myself. I wrote a small program that should render a triangle onto the screen. When I executed the application, however, there was no triangle ...
0
votes
1answer
47 views

DirectX 12 Questions about the command queue and command list?

I have been wondering this question for a while. Would this command ThrowIfFailed(m_command_list->Reset(m_command_allocator.Get(), nullptr)); m_command_list->ResourceBarrier(1, &...
1
vote
2answers
78 views

How can I access the members of XMVECTOR?

So I have been reading these articles, and I find implementing them a trouble. Currently, all I am trying to do is add two vectors together, leaving my question more specifically this: How can I add ...
1
vote
2answers
92 views

Get the difference between 2 matrices

Hi I'm using C# and MonoGame, and have the world matrices of 2 objects. I need to get the difference between them, so I can effectively parent the second object onto the first. The aim is to get to a ...
0
votes
0answers
46 views

3d rotation of a cube using DirectX

I can't solve an apparently simple problem: i have a cube, similar to the one in the following picture I've tried to write a small demo where i can rotate the cube by dragging the mouse, but i can'...
0
votes
1answer
215 views

How to calculate spherical harmonic coefficients for indirect diffuse?

After reading the article "An Efficient Representation for Irradiance Environment Maps", I'm a bit confused as how to calculate the spherical harmonic coefficients. I'd like to generate these ...
1
vote
0answers
27 views

Light intensity on plain from angle

Given a vector (v) for the direction of light and a vector (n) for the normal of a plain. How can I calculate a rudimentary intensity value (i) where When (v) points at (n) directly/face on (i) = 1....
1
vote
1answer
28 views

DirectX 11 Vertex Shader Fragmentation

I was wondering how my vertex shader is causing my cube to be render weirdly? I am using the Visual Studio graphics tool and see that my input assembler is correctly receiving the cube and I can only ...
-2
votes
1answer
34 views

Stream Output (SO) stage in Directx 12?

Does Directx 12 have a Stream output Stage?