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.
3
votes
0answers
200 views
SSAO and normal issues
I'm using a SSAO alghorithm called "SAO", seen here: http://graphics.cs.williams.edu/papers/SAOHPG12/
I'm currently having issues with "smooth" normals, for example when using normal/height maps.
To ...
2
votes
0answers
38 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
0answers
56 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 ...
2
votes
0answers
261 views
Chunk Texture3D GPU generated vertices
I read GPU Gems 3 from NVidia about procedural terrain.
It's quite interesting but not applicable for me because I only read the online version without the shipped DVD so I'm not able to download the ...
2
votes
0answers
212 views
Writing to a D3DFMT_R32F render target clamps 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 ...
1
vote
0answers
16 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 ...
1
vote
0answers
44 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 ...
1
vote
0answers
43 views
Simulating sun 3d direction
At the moment I got the following to simulate the suns direction:
void Sun::Update()
{
if (!mIsMoving)
return;
const auto now = Clock::now();
const auto timeDiff = now - ...
1
vote
0answers
52 views
how to rotate a 3d instance using an HLSL shader
ok, im experimenting a little with HLSL shaders, i have the following code for a vertex shader, it is used to render a few instances of a 3d model. Let's say i want to rotate these instances on their ...
1
vote
0answers
128 views
tex2Dlod to limit max mip level to use for a texture (atlas)
I'm developing a 3D multitexturing terrain engine in C# on Monogame (XNA) plateform. I would like my engine works on Windows XP or upper, so on DirectX 9c minimum.
Monogame allow me to build a DirectX ...
1
vote
0answers
64 views
SharpDX - Character Skinning Different in Windows Phone 8.1 Emulator and Real Device
I have an engine written using SharpDX, that can load a character mesh and animation stored in a FBX file, then it renders a scene and animates a character. It is written as an Universal Windows Store ...
1
vote
0answers
137 views
Directx 11 full screen
I build simple directx 11 application in c++ that draw square to screen.
Also check in the end of the program when I close the last peace of directx the number of free reference.
This work great in ...
1
vote
0answers
75 views
Matching the 3ds max camera view in my game 1:1
I want to match 1:1 the 3ds max camera render with my 3d engine (DirectX 11, C++).
I believe that my mesh exporter (coded with MaxScript) works fine, I see the right shapes.
But something about the ...
1
vote
0answers
178 views
AddFontMemResourceEx and D3DXCreateFont corruption
I'm trying to load a font from a buffer using AddFontMemResourceEx and then creating a D3D font with D3DXCreateFont. This works fine on every platform except Windows XP, where it causes the wrong ...
1
vote
0answers
44 views
Align Object With Triangle
I currently am trying to figure out how rotate an object so it's aligned with a triangle along the Z Axis. I have the world matrix of the object and a triangle, which has it's 3 points and the normal. ...
1
vote
0answers
209 views
Connecting smoothly N textures on terrain
I started to create my own terrain in a quite common way, just like this: http://www.rastertek.com/tertut18.html . It is infinite and automatically generated (by using coherent noise). The areas are ...
1
vote
0answers
378 views
2D Camera transformation sidescroller
i am currently trying to dive into 2D programming with DirectX, especially bulding a tile based sidescroller. I have worked with some chapters from a book (Advanced 2D Game Development) but always ...
1
vote
0answers
203 views
How to correctly synchronize a shared surface?
I am trying to share a direct3d9 surface between two processes. One process (let's call it A) writes to the surface, and the other (B) displays it on screen. Currently, process A does a StretchRect of ...
1
vote
0answers
326 views
Why is my XInput gamepad press stamp not working?
I'm trying to add basic gamepad input to my c++ DirectX game but i'm having some trouble creating a press stamp (registers the press only the first time it's pressed if button held down).
The entire ...
1
vote
0answers
294 views
Converting Animation data from Maya to DirectX in C++
I am currently trying to export an animation from Maya and import to a program I am working on. One of the problems I currently have is that when imported, the mesh and animation data looks reversed ...
1
vote
0answers
426 views
Managing many draw calls for dynamic objects
We are developing a game (cross-platform) using Irrlicht. The game has many (around 200 - 500) dynamic objects flying around during the game. Most of these objects are static mesh and build from 20 - ...
1
vote
0answers
256 views
Rendering transparent textures in directX
I am working with a directX application with WPF, I am facing a problem with videos and images that contains transparent pixels, I have to draw a color in background an then a video/image over it. ...
0
votes
0answers
10 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 ...
0
votes
0answers
33 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:
{ ...
0
votes
0answers
91 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, ...
0
votes
0answers
28 views
Device.SetRenderTarget Prevents Shader From Executing
Using DirectX 9 and C++. I'm trying to finalize this code to run a HLSL shader on in-memory data. In theory it should be working. In practice the shader doesn't run.
...
0
votes
0answers
25 views
How to Set Compiled Pixel Shader
When compiling a shader with D3DXCompileShaderFromFile, it works. But what if the shaders are pre-compiled into .cso files?
I have this function. It fails. What's the proper way of loading the pixel ...
0
votes
0answers
30 views
DX9 StretchRect to Texture Fails
Alright, I got the code almost working to copy memory data to a texture, process it with DirectX9 into another texture and copy the result back to memory. Almost all the errors are gone and the code ...
0
votes
0answers
74 views
Run Simple HLSL Pixel Shader with DirectX 9
I'm trying to run HLSL Pixel Shaders with DirectX 9 where I feed a texture in, run the HLSL code and copy the resulting texture back from memory. I think I'm getting pretty close, although a LOT of ...
0
votes
0answers
39 views
OpenGL textureGather and DirectX gather
These functions sample multiple RGBA pixels but return only a single component.
OpenGL: https://www.opengl.org/sdk/docs/man/html/textureGather.xhtml
DirectX: ...
0
votes
0answers
79 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 ...
0
votes
0answers
17 views
Retrieving shared video memory using SharpDX
I am trying to retrieve the total available video memory using SharpDX via DXGI, using the Description of the best available adapter.
The DedicatedVideoMemory is correct (1GB in my case), but the ...
0
votes
0answers
51 views
Shader - Simple SSS lighting issue
I am trying to create a simple subsurface scattering effect using a shader but I am facing a small issue.
Look at those screenshots. The three images represents three lighting states (above surface, ...
0
votes
0answers
53 views
Directx 9 Obj Model
There's is a error with my obj load/render that I can't solve
I'm a newbie in directx 9, I'm trying to do this in the best way
The model is not displayed properly, do not know if this correct model ...
0
votes
0answers
59 views
How can I determine the position of Direct Sound buffer
I'm using Direct Sound to play WAV files in my environment, however I am unsure of how to check if the file has finished playing, I know DirectSound operates on a circular buffer, however my sounds ...
0
votes
0answers
70 views
XNA/C# Shadows look strange in orthographic
I have implemented shadows in to my game engine. They look fine when rendered in projection mode as a projected light, however I get a strange "blocky" look when they are put into orho'. I will be ...
0
votes
0answers
77 views
DirectX My texture does work in my pixelshader
I got a bit of a mystery as I have a problem that should not be a problem. I am working on a fog feature which is similar to other things that I have done. Not very hard at all. The only real ...
0
votes
0answers
47 views
Good system for experimenting with shaders in different languages
I'm trying to experiment a bit with shaders and they have been programmed in several different languages (GLSL, Cg and HLSL). Now most systems (dirrectX, openGL) have only support for one of them. ...
0
votes
0answers
62 views
Loading skinned mesh - initially rotated bones, how to set the weights?
I have an mesh that I've exported from 3ds max to my own file format.
I use the left-handed coordinate system with Y up and the orientation is expressed as quaternions (both for models and bones). ...
0
votes
0answers
72 views
Not seeing the right colors on my Cube
I have a book by Frank Luna, Directx 11
The question is:
If vertex memory is significant, then reducing from 128-bit color values to 32-bit color values may be worthwhile. Modify the
“Box” demo by ...
0
votes
0answers
79 views
Frustum Culling not working when objects are transformed
I've been implementing some frustum culling and my code looks like this.
// Frustum Culling
XMVECTOR detView = XMMatrixDeterminant(cam->View());
XMMATRIX invView = XMMatrixInverse(&detView, ...
0
votes
0answers
51 views
Encoding Floats to RGBA and Blending causing artifacts
I am using float packing to encode a float value inside a RGBA texture because I don't have access to float texture unfortunately.
Here are the function I am using for encoding and decoding.
inline ...
0
votes
0answers
173 views
Trying to bounce a box with a plane using bullet physics
I'm trying to simulate a box that bounces with a plane and I'm beginner with bullet physics. I created a plane (box) and and a box that is falling. The problem is the ball is stalled while colliding ...
0
votes
0answers
40 views
Collada 3d file type
For animations in the Collada file type. How does it store them? I'm reading them in with Assimp and I got the keys. mNumPositionKeys = 24. I made the animation and it had 24 frames. But only 2 were ...
0
votes
0answers
99 views
Getting a Rect of a SpriteBatch
I'm using DirectXTK, https://directxtk.codeplex.com/wikipage?title=SpriteBatch
it's a port of XNA spritebatch.
I'm trying to get a bounding rect of my sprite for testing collisions AABB.
I draw ...
0
votes
0answers
201 views
How to use D3D11_SHADER_RESOURCE_VIEW_DESC.Buffer.ElementWidth?
If I want to create an ID3D11ShaderResourceView* to a buffer with a given DXGI_FORMAT (e.g. DXGI_FORMAT_R32G32B32), do I have to also supply a value for ...
0
votes
0answers
133 views
marshaling c# struct with array to const buffer
I am trying to use a const buffer to pass a structure with an array of values into the pixel shader. However, all my color[] array values are coming in as zeros.
I have the struct defined as:
...
0
votes
0answers
134 views
Depth Map not rendering properly in DirectX / HLSL / SharpDX
I've been struggling with this for awhile, and everything I find online says this SHOULD be working, but I apparently missed something.
I'm attempting to run Deferred Rendering in SharpDX on a ...
0
votes
0answers
94 views
Particle System Tracking
I have a particle system where instead of tracking the time each particle is alive, I just track the time of the oldest particle and the time of the youngest particle. Basically, the oldest particle ...
0
votes
0answers
80 views
How to translate vertex buffer coordinates in 2D
I am trying to (using a 2D Directx9 engine library) rotate/translate a set of points in a vertex buffer.
I understand how this would be done in a 3D system - i.e using the vertex shader stage of ...