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.
1
vote
0answers
25 views
Subsurface Scattering - Transmittance
I have a question related to SSS and especially transmittance. I've looked at several papers about that topic, most of them from Jorge Jimenez, which are very interesting and, I admit, a bit hard for ...
1
vote
2answers
36 views
What's the reasoning behind using “redistributable” packages?
On Windows, many if not all games require some DirectX package and some VC++ runtime. Others also need OpenAL, wmfaredist, nvidia physx, windows live and probably others.
I'm trying to figure out why ...
2
votes
1answer
50 views
How to store renderer vertex / index data in scene graph objects?
I have a SceneNode class which contains a Mesh instance. The Mesh class stores client side information such as vertex and index arrays (before they're uploaded to the GPU). I also have an abstracted ...
0
votes
0answers
15 views
Is it possible to Change the vertex format of a Model from line list to Triangle strip using DirectX
So I have a DirectX game library and using DirectX models in a game I am developing.
All the models I am using have a Triangle Strip topology and thats fine as ID3DXMesh uses triangle strips for ...
1
vote
0answers
20 views
Direct3D11: Directional Shadow Maps
I've recently implemented shadow maps on my project. However, I'd like to add a feature that allows the light direction to be dynamically changed, so that the terrain can be viewed using different ...
3
votes
0answers
20 views
How to link assimp lib to universal app
I cannot make assimp object loader work with universal app, and I got the same problem as this one: Assimp and directX12 universal apps
I tried the static library approach mentioned in the answer of ...
3
votes
1answer
56 views
How to determine what color will be written into single pixel framebuffer?
I thinking about rendering into single pixel (1x1) framebuffer.
For example we have two triangles which covers whole NDC area, one is green second red.
What color will be written to 1x1 framebuffer? ...
3
votes
1answer
41 views
Issues with depth calculation in HLSL shader
I'm currently trying to implement shadow maps in my graphics framework.
I ran into an issue with depth calculations I wasn't able to solve myself (yet). I did a lot of testing and debugging and think ...
0
votes
1answer
16 views
Texture being stretched when using D3DTADDRESS_CLAMP
I'm trying to create a skybox using a cube and using one of this textures: http://forum.unity3d.com/threads/mundus-skybox-pack-01-released.202748/
I've got it working well, but I noticed there are ...
5
votes
2answers
202 views
What are other sources of screen tearing?
I have a DirectX11 based engine / application that is showing screen tearing on a certain system. The system has a large TV monitor with a GTX 980 graphics card. The tearing tends to happen in ...
1
vote
1answer
56 views
Rotate camera with quaternion around axis going through the origin
I am trying to implement my own third person camera using quaternions in DirectX. I first wanted to check that the camera rotates as expected so I started to rotate it around the world y-axis (0,1,0) ...
3
votes
1answer
42 views
How can I get projected coordinates of vertex on screen
I want to check picking for faces and for that I need projected X Y coordinates of my vertexes in -1 to 1 range:
For that I multiply my vertex array with matrices and then get projected triangle ...
3
votes
1answer
67 views
Getting rid of texture bleeding
Edit: I figured out what problem I was facing, it's called Texture/Pixel bleeding, which I was not aware of yet. I posted an answer below consisting of a small description of the problem and a link to ...
1
vote
1answer
82 views
Quaternion rotation problems [duplicate]
I want to rotate my model and I have X and Y rotations. Here is my code:
D3DXQUATERNION q, qrotation;
D3DXQuaternionRotationAxis(&q, &D3DXVECTOR3(1.0f, 0.0f, 0.0f), ...
2
votes
1answer
55 views
How can I use shaders in Unity to write a scientific computing program?
I want to write a GPU shallow water code on Unity3D. For sure, performance matters a lot. I've done this before using DirectX and C++. But for a couple of reasons I want to redo it in Unity3D.
I ...
5
votes
3answers
246 views
How to pass rendered frames from OpenGL to DirectX 11?
I have a dll that does some rendering using OpenGL. I need to render it to a texture and use that texture in direct x 11. My current attempt has been to render the OpenGL to a texture on one ...
2
votes
0answers
72 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 ...
1
vote
0answers
34 views
applying two Vertex shaders on two model with the same pixel shader
i want to apply two HLSL vertex shader on two different models but with the same pixel shader. what i've done is wrong but i didn't know how can I use both vertex shader with one pixel shader (and i ...
3
votes
0answers
33 views
Perspective division by zero yields unexpected results
Usually, this is how a shape in clip space is defined:
[0.25, 0.25, 0.0, 1.0]
[0.25, 0.75, 0.0, 1.0]
[0.75, 0.75, 0.0, 1.0]
[0.75, 0.25, 0.0, 1.0]
After perspective division to NDC space the result ...
3
votes
0answers
36 views
Nothing drawn in Window, not even the clear color
A few years ago I have followed RasterTek's Direct3D11 tutorials to create a simple application in C++. I'm not trying to convert this very simple sample to C# using SharpDX.
I've got the Window ...
3
votes
1answer
149 views
Is there a way to bypass Directx Effect Files?
I am now trying to abstract my rendering pipeline, and I've been able to abstract OpenGL fairly easily. But now I have ran into a rather ugly problem with Directx.
Most of my knowledge about Dx9, 10, ...
1
vote
1answer
100 views
How do I render a 2D overlay with DirectX 9?
I'm working in C++ with DirectX 9 on a 3D game, but I want a 2D overlay for rendering a HUD.
I've heard that I could use D3DXMatrixOrthoLH, but I'm very confused on how to use it. I'm more familiar ...
1
vote
0answers
36 views
Textured trapezoid in Monogame DirectX
I'm working on a 2D game, so most of the graphics are sprites. However, some elements are drawn using trianglestrips in Orthographic projection. The thing is that I can't do a 3D projection because ...
3
votes
1answer
67 views
Separating rendering from HWND
I'm considering separating my game simulation from the message loop. It seems odd to me to have other systems tied directly to the window in which my game is running. Most examples I see are ...
1
vote
1answer
29 views
Modifying alpha of pixels in sufrace/texture
I have a texture who's surface I've loaded with an image. Some areas of this image are completely transparent (alpha = 0), some completely opaque, and some are somewhere in the middle.
The issue I'm ...
3
votes
0answers
21 views
Combining two surfaces
I have two surfaces. One is the back-buffer, the other is a surface with some user-interface overlay graphics already rendered onto it. Both surfaces have identical properties (size, format...etc).
I ...
2
votes
1answer
23 views
Windows Phone 8.1 Monogame Content.Load<Effect> exception
need some help, just trying to load compiled .fx (.xnb) file by monogame (version 3.4.0.456) in Windows Phone 8.1 enviroment by this code
MainEffect = Game.Content.Load<Effect>("chessboard");
...
2
votes
1answer
76 views
In My Direct2D Gui System, Is It Safe To Use A Bitmap Render Target Per Gui Element?
I am trying to implement a relatively simple GUI system for use in a few simple games.
In this system, all Gui elements extend BaseControl. BaseControl has an update and draw method, as well as ...
1
vote
0answers
23 views
What is Purpose of pIntermediate in UpdateSubresources?
DX11 used ID3D11DeviceContext::UpdateSubresource but now DX12 seems to use a new method UpdateSubresources. I think I can figure out most of the differences between these two functions but the ...
2
votes
1answer
101 views
How can I recover polygons and normal maps from compiled games through emulation of D3D or OpenGL?
I am trying to generate labeled training data for an artificial visual cortex to learn on. I'm looking for a tool that will, instead of rendering the scene at each pixel just give me the pre-rendered ...
1
vote
0answers
24 views
DirectX 9 Light projection
I am trying to see changes of component 'z' from light space. In vertex shader component 'z' divide 'w' is not 0. But after sending float4 with texcoord1 to pixel shader its 0. All matrices are good. ...
2
votes
2answers
83 views
If IDXGISwapChain::Present blocks, does that mean I'm GPU bound?
I updated my DirectX11 renderer to render on multiple threads using deferred contexts. Before my change, the Present method took a negligible amount of time (according to VTune analysis). After my ...
1
vote
1answer
44 views
View Matrix to Texture Matrix
I'm converting view coordinates to texture coordinates for both my shadow maps and Screen space reflections.
I keep seeing this conversion in examples:
var T = new Matrix
{
...
1
vote
0answers
25 views
Is it normal in skeletal animation to NOT consider the translation component in bone transform matrices?
I'm using assimp to load a model, and DirectX11 and DirectX ToolKit to render it.
In the document of DirectXTK's IEffectSkinning, it says:
As an optimization, SkinnedEffect and DGSLEffect assume ...
0
votes
2answers
49 views
Shader value remap - Blend Falloff
I would like to know if there's a way to remap a value that goes from 0 to 1 constantly like this.
Into those values (those are examples).
This might be some function transformation but I can't ...
1
vote
1answer
28 views
What happenes if you leave out buffers for the inputassembler that the vertex shader expects?
I'm working through my first attempt at a "graphics engine" (I use the term loosely as I'm not aiming for much more than something that will display a few meshes). I want to leave my classes as ...
2
votes
1answer
97 views
When does the memory transfer from CPU to GPU happen when creating a buffer?
I just finished my first DirectX 11 program. But I have several questions on memory transfer between CPU and GPU.
In my program, I create a vertex buffer first:
bool InitializeGeometry() {
...
2
votes
3answers
447 views
Do the lookDirection vector and upVector have to be orthogonal? What happens if they are not?
I'm currently starting with DirectX and building a small framework for myself and ran into a problem comprehending the camera vectors (position, lookDir, up).
What they represent exactly is clear, ...
3
votes
2answers
178 views
How to achieve a dynamic soft see-through hole effect in a wall with shaders?
I'm looking for a way to create a dynamic soft see-through hole effect for room walls. I know a few ways how to do it (for example multitexturing with second layer being the hole mask in screenspace), ...
0
votes
1answer
42 views
D3D12 ConstantBuffer - Shader receives wrong values
im having trouble with one constantbuffer:
struct CameraConstData
{
urd::Matrix projection; // 64 ( 16 floats)
urd::Matrix view; // 64 ( 16 floats)
urd::Vec3 viewPosition; // 12 ( 3 ...
2
votes
2answers
123 views
How can I test DXGI_ERROR_DEVICE_REMOVED error handling?
My application uses DX11 and it periodically gets a DXGI_ERROR_DEVICE_REMOVED error on startup. It is an infrequent thing (I can go days or weeks without seeing it) but according to the documentation ...
1
vote
1answer
62 views
DirectX11 - AlphaBlending Rendering problem
So.. I completed this tutorial on the following site rastertek.com/dx11tut12.html. The tutorial is all about rendering Text in an orthographic space. Basically just 2D rendering on DirectX 11.
Now ...
0
votes
1answer
35 views
Direct3D - Get screen coordinates for printing multiple text elements
I have a function that I use to print text PrintText(char* text) that stores the text to a vector, which is then displayed if the vector is not empty. I'm trying to figure out how can I correctly ...
0
votes
0answers
36 views
My texture is doing weird, either not loaded correctly or not rendered correctly. DirectX11
I'm loading a texture from a file called owl.png. But it renders really weird.
Original picture(512 X 512):
But it renders like this:
It's rendered on a square, that is initialized like this:
{ ...
2
votes
1answer
111 views
Assimp and directX12 universal apps
I started a directX 12 universal app project on visual studios and started coding some stuff to create a physics engine. I was currently working on implmenting Assimp into the engine too load whatever ...
1
vote
1answer
83 views
Why would this scaling matrix have no effect?
To draw a simple model using the DirectXTk, I'm doing the following. It all works perfectly, draws correct, and so on. Except changing the scaling factor makes NO difference, and I can't figure out ...
1
vote
0answers
52 views
Set Render Target usage
I am using Unity and I have some difficulties about understanding the way Set Render Target works and how it can behave with the shaders.
Is it possible to render a shader pass in multiple render ...
7
votes
1answer
446 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
59 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 ...
0
votes
0answers
138 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, ...