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
0answers
15 views

HLSL Function Problem

Right now I am trying to implement Specular lighting in my DirectX Engine. Whenever I create the DirectSpecularBRDF function in my .HLSL file, my program crashes. Can anybody help me? The problem is ...
0
votes
1answer
19 views

Problem with Basic Diffuse Lighting

So recently I have been learning how to implement Diffuse Lighting in DirectX and I have done so with the following code: float4 PS(VS_OUTPUT input) : SV_TARGET { input.normal = normalize(input....
0
votes
1answer
30 views

How to Draw 2D Shapes in DirectX

I am currently trying to draw a simple 2D circle and an arc in DirectX but there are no resources online with info on how I can do this. Lines & Points are built into DirectX anyway so that has ...
4
votes
1answer
97 views

Directional light type

I am currently trying to implement a specific directional light type. This light type has been used in the game INSIDE and is called orthogonal spotlight (aka local directional light). I assume that ...
0
votes
0answers
85 views

Video Game Development in 2016 for newbies. Vulkan vs DirectX vs OpenGL? [closed]

I am a 17 years old guy who finally decided that text/shell (or JavaScript browser) based games are enough for me, and want to taste the sweet fruit of a real game experience. I know it's gonna be a ...
6
votes
1answer
113 views

What are screen space derivatives and when would I use them?

I see the ddx and ddy glsl functions and the hlsl equivalents come up in shader code every now and then. I'm currently using them to do bump mapping without a tangent or bitangent but I basically copy-...
0
votes
1answer
42 views

How to put different textures on different sides of a Cube in DirectX 11?

I have recently learned how to texture a cube in DirectX with a single texture but I am now trying to put multiple textures on a cube. If your confused the photo below should clarify. I am aware of ...
1
vote
2answers
66 views

Problem with Diffuse Lighting

So I am currently implementing Diffuse & Ambient Lighting based off this tutorial: https://www.braynzarsoft.net/viewtutorial/q16390-simple-lighting I think I have implemented everything correctly,...
3
votes
1answer
66 views

“Highlighting” Faces/Edges/Corners

How would I "highlight" faces/edges/corners? I would prefer an explanation OpenGL if possible. Here's an example:
-2
votes
1answer
95 views

How do graphics libraries work? [closed]

I have made many different game engines with OpenGL, but still struggle to understand how they work and the process in which the library tells the computer what to do. How do graphics libraries such ...
-1
votes
2answers
44 views

How do .HLSL files work together compared to .FX?

So I have been slowly reading and working through Frank Luna's D3D11 book which uses the .FX file format which uses effects, techniques and passes which I understand now. However I have read online ...
1
vote
1answer
42 views

How do multiple shaders in a DirectX Engine work?

So as I have been learning DirectX 11, I have been looking at a few tutorials online and in the sample code provided there are more than the usual pixel and vertex shaders (along with the geometry ...
1
vote
1answer
28 views

Color Correction in DirectX

After playing games like Star Wars Battlefront & GTA 5 I was wondering how dev's implement Color Correction in their Engines. I know that this can be done through the use of 3D LUT's but I was ...
0
votes
0answers
26 views

Directx D3D9 fails to render a primitive on a RenderTarget surface

So for some reason DrawPrimitive() doesn't seem to work with my render target surface. // The current target, we must set it back as target afterwards IDirect3DSurface9* temp_target; device->...
0
votes
1answer
55 views

Cannot enable 4X MSAA Anti-Aliasing in DirectX 11

I am currently learning how to use DirectX11 but I am unable to use 4X MSAA. Here is my code (Since I'm just learning I haven't used any headers or classes, sorry for the messy code) If anybody can ...
0
votes
0answers
34 views

DX12 Domain Shader texture mapping using WRAP despite setting CLAMP on AMD hardware

My application works fine on my NVidia GTX 960, but my AMD Radeon R9 380 is incorrectly setting the address mode to WRAP, despite setting it as CLAMP in my application. This totally caught me off ...
0
votes
1answer
28 views

What compatibility checks should i do while creating Direct3D device, swap chain etc

I've done DirectX apps for 1.5 years now, mainly to teach myself but now i would like to make games for public. So i was wondering would it work for others just leaving the values default ie. swap ...
1
vote
0answers
24 views

Automated animation retargeting

I am currently developing a video game using my own game engine I develop at the same time. While making a good progress in the past months, I am currently stuck. I assume I only miss a minor thing, ...
1
vote
2answers
75 views

How to read rendered textures back without killing performance

I have an application where I need to render some OpenGL based dlls, read the rendered textures back, and send them to another directx based application that will render them in directx. Right now, I ...
0
votes
1answer
35 views

Why do I get this error about DllMain when using D3D from within a DLL?

I am trying to create a Dll that will handle all my rendering, I am trying to initialize Direct X but I am getting the following error message: DXGI ERROR: CreateDXGIFactory cannot be called from ...
0
votes
2answers
48 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
2answers
80 views

Shadow mapping too slow and ugly! [closed]

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
0answers
47 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 ...
1
vote
1answer
45 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 ...
2
votes
0answers
34 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 //************************************************************ //...
1
vote
0answers
25 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
47 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 ...
1
vote
0answers
18 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
90 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 ...
4
votes
2answers
49 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 ...
0
votes
0answers
73 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
votes
1answer
89 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 ...
0
votes
1answer
46 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 ...
0
votes
1answer
31 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 ...
3
votes
0answers
32 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
2answers
387 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 ...
4
votes
1answer
65 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 ...
2
votes
0answers
113 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 ...
1
vote
1answer
65 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
57 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
108 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
1answer
70 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
36 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 ...
1
vote
0answers
29 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....
-2
votes
1answer
40 views

Stream Output (SO) stage in Directx 12?

Does Directx 12 have a Stream output Stage?
2
votes
0answers
31 views

DirectX 11 - Problem with low resolution decals

I'm trying to add a decal system in my DirectX engine but i'm facing some problems with the quality of the textures projected. Every other no decal texture look fine, but these ones look really bad. ...
0
votes
1answer
17 views

Set up a basic D3DXQUATERNION

I'm trying to set up a D3DXQUATERNION to operate a rotation of 90 degrees around the Y axis. I tried in the following way: D3DXQUATERNION tempRot1(0.0f, 1.0f, 0.0f, cos(XM_PIDIV2/2)); because in ...
0
votes
0answers
56 views

Implementing Depth of Field in DirectX 11

I have created a procedural dungeon demo in DirectX 11 as part of an assignment, and am now looking to add some post processing to it. I have implemented whole scene Gaussian Blur in the past, but ...
0
votes
0answers
59 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'...
2
votes
1answer
81 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 ...