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)

-1
votes
0answers
12 views

May dynamically loaded an XInput1_4 library crach in an UWP Bridge application?

The DXUT framework has a file DXUTmisc. In that code is dynamically loaded an XInput library. It is possible that a converted by Windows Bridge application crash there? Should the LoadLibraryEx be ...
0
votes
1answer
14 views

Error binding indices to device context [ STATE_SETTING ERROR #241: IASETINDEXBUFFER_INVALIDBUFFER]

This is how i initialized the D3D11_BUFFER_DESC for my indices. When i go to bound it to the deviceContext i get this error. D3D11 ERROR: ID3D11DeviceContext::IASetIndexBuffer: The Buffer trying to ...
0
votes
0answers
32 views

Measure elapsed gpu time of draw call

I'm rendering to a texture via DrawIndexedPrimitive (SharpDx). In some specific situations, the framerate drops significantly when doing this render. The framerate can be improved by rendering to a ...
0
votes
1answer
78 views

Why is fog in games exponential and has a start distance?

In most tutorials I see on how to achieve fog with shaders the fog is exponential and has a minimum / start distance from the camera. Why? Both seem counterintuitive, especially the minimum distance. ...
0
votes
1answer
15 views

D3DX11CompileFromFile() function problem DirectX11

What do i have to include to use the D3DX11CompileFromFile() function on DirectX11? I'm using visual studio 2015 and reading the "3D Game programming guide" (Frank Luna) and i'm having problem using ...
0
votes
0answers
33 views

What's the first step in implementing Sparse Voxel Octree

What should we do first? To voxelize the triangular mesh then save the data to the octree or implement the octree first? I found some papers but no step by step tutorial. For instance, I can't ...
1
vote
1answer
19 views

texlod() is not supported on ps_4_0_level_9_3 , how can I do a similar operation in this case?

Ihave an interesting problem for you guys I am trying to compile a pixel shader that I ported from GLSL and I am having trouble with a texCUBElod() function that the compiler say's is not supported ...
0
votes
0answers
11 views

XML defined UI loading

For the past few days I have been working on an XML defined UI system where I define my UI in XML files, parse them and use sprtiebatch(sharpdx.toolkit) to draw the UI elements. I have a texture atlas ...
0
votes
0answers
53 views

How do I “hook into” Direct3D 11 calls made by a closed-source game?

This publication mentions a technique they are using to inspect how GTA 5's draw calls work: Screen shots are captured by “hooking” into Direct3D 11’s present callback. A process by which the ...
-3
votes
1answer
37 views

Direct3D 11. GenerateMips not work [closed]

I try use this D3D11_TEXTURE2D_DESC desc{}; desc.Width = texture->width; desc.Height = texture->height; desc.SampleDesc.Count = 1; desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; desc....
0
votes
1answer
32 views

How can I send effects to joystick connected to my PC USB using C# and sharpdx?

I can get a list of the joysticks connected to my PC. But now I want to send effects for example to send a command that will make a button click for example the triangle button or the square button. ...
0
votes
1answer
29 views

How do i get a list of all joysticks connected to my pc in usb using sharpdx with c# ? Getting errors

The code: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; ...
0
votes
1answer
50 views

Directx 11 How to set Texture2D in constant buffer

I have a texture2D packed within my constant buffer. how do i set the texture using ID3D11DeviceContext::UpdateSubresource or another method?
0
votes
0answers
12 views

GBAA\ AMD Driver Extensions, Problems

thanks once again for taking the time to read this! Ill get right to it, I'm trying to implement GBAA(Geometry Buffer AA) without the geometry shader I got the idea from here page 46-51 and the part ...
1
vote
0answers
29 views

Import Quaternions from a different coordinate system to perform an animation (DirectX to 3ds/Maya)

I'm working on a tool to import a biped from a DirectX engine that uses Left-handed coordinate system to 3ds Max that uses a right-handed one. I managed to achieve the initial positions of the biped ...
0
votes
0answers
27 views

Direct3D9 fails to render primitive on 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
30 views

How to rotate to look at target

I have found other questions like this, but none seem to quite cover the situation I have. I am using DirectX 11 I have an object that has: Position (vector) Rotation (quaternion) View angle (pitch,...
0
votes
2answers
43 views

Why is my Direct3D 9 floating point texture clamping values 0–1?

I'm using Direct3D 9 to draw some primitives into a texture. The format used at texture creation is D3DFMT_A16B16G16R16F, and the primitives are drawn using additive blending. The additive blending ...
1
vote
1answer
25 views

DirectXTK C++ : How do you use the Spritebatch.Draw() function with overloaded for RECT?

I am trying to make use of the DirectXTK's SpriteBatch for the C++ version on github. Which is heavily based on the one for XNA. However I can't seem to get the darned thing to work properly. I have ...
1
vote
1answer
70 views

Texture coordinates projection

I have some classic texture coordinates and as a normal behaviour they follow the mesh's transformations. I am trying to use the same texture coordinates behaviour but without being affected by the ...
0
votes
0answers
30 views

Exactly what does the rasterizer stage of the directx pipeline do.

For sake of simplicity I assume my primitive topology to be a triangle list or basically a list of vertices (points) for which 3 of them constitute a triangle. So for n triangles you would have 3n ...
0
votes
0answers
8 views

Piping DirectX debug messages into log4net? i.e. “D3D11 WARNING: Live Object at …”

I'm working on a DirectX 11 application and I'm wondering if there is any way to pipe the debug messages from the VS Output debug window through to log4net? i.e. "D3D11 WARNING: Live Object at ...
0
votes
0answers
77 views

Instancing Woe in DX12

When you run the DX12 template in VS2015, it displays a single rotating cube. I'm trying to hack that template so it will display the same cube in many different places. At first, I tried the old ...
-3
votes
1answer
129 views

DirectX 12 using Visual studio 2015 on Windows 7 SP1

I'm trying to work with a directx 12 sample using windows 10 sdk, visual studio 2015, on windows 7 SP1. I get the following error The procedure entry point CreateFile2 could not be located in the ...
1
vote
1answer
60 views

Softshadows create graphical errors

I have been implementing soft shadows into my game engine and it all looks ok in the beginning, but when I rotate the camera I get this... https://puu.sh/rQ7yG/8cd692aaab.png When I move around I also ...
0
votes
1answer
96 views

Eye Parallax Refraction Shader

I am trying to implement the Parallax Refraction effect explained by Jorge Jimenez on this presentation: http://www.iryoku.com/downloads/Next-Generation-Character-Rendering-v6.pptx and I am facing ...
0
votes
1answer
75 views

Specular Lighting Error

At the moment I am implementing Specular Lighting for my engine in DirectX on top of Diffuse Lighting. I am using a physically based technique and as you can see from the image below something is ...
0
votes
2answers
101 views

Having problems sending multiple lights to my shader

I have a lightstruct in C++ which holds the color and direction of the light. const int NUM_LIGHTS = 1; struct lightStruct { XMFLOAT4 Color; XMFLOAT4 Direction; }; And this is how I ...
0
votes
2answers
106 views

Debugging .FX files in Visual Studio not working

So I have been learning how to use DirectX 11 for a while now and I have chosen to use the .FX framework rather than seperate .vs & .ps files. (I know it's deprecated but I found it a little ...
0
votes
1answer
51 views

Cbuffer Packing

So I recently had this error: Cbuffer Padding Error Which has led me to ask this question. Can somebody explain packing/padding in a Buffer for DirectX? I cannot get my head around it, rather than ...
0
votes
1answer
68 views

Cbuffer Padding Error

In my cbuffer in DirectX, I send 2 variables over to my HLSL shader called Light & Roughness. If I remove the Roughness variable my program compiles fine but as soon as I introduce Roughness I get ...
0
votes
1answer
102 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
29 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
2answers
135 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
131 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 ...
6
votes
1answer
249 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
83 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
84 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
84 views

“Highlighting” Faces/Edges/Corners

How would I "highlight" faces/edges/corners? I would prefer an explanation OpenGL if possible. Here's an example:
-3
votes
1answer
142 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
108 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
49 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
43 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
49 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
158 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
1answer
34 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
50 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
114 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
54 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
98 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 ...