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.
0
votes
1answer
16 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
33 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
19 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
66 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
25 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
6 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
49 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
56 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
58 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
66 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
60 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
1answer
56 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
62 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
42 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
62 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
57 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
25 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
61 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
111 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
173 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
64 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
75 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
72 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
108 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
66 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
45 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
35 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
33 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
71 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
39 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
30 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
33 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
91 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
42 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
60 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
88 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
60 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
65 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
42 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
48 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
20 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
126 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
73 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
78 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
112 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
54 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
36 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
34 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
438 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 ...