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)

2
votes
1answer
361 views

Fog shader camera problem

I have some difficulties with my vertex-fragment fog shader in Unity. I have a good visual result but the problem is that the gradient is based on the camera's position, it moves as the camera moves. ...
2
votes
1answer
1k views

Reading from a staging 2D texture array in DirectX10

I have a DX10 program, where I create an array of 3 16x16 textures, then map, read, and unmap each subresource in turn. I use a single mip level, set resource usage to staging and CPU access to read. ...
1
vote
1answer
31 views

CopySubresourceRegion results in no-op

I'm having some trouble copying a subregion from a source texture (2D) to a destination texture. Both textures are mipmapped 2D textures, with dimensions (at mip 0) of 512 x 32. Rather than tell you ...
1
vote
1answer
44 views

Texture R8_FLOAT format?

I'm working on SAO (http://graphics.cs.williams.edu/papers/SAOHPG12/) and I want to store my ambient obscurance term (a value between 0.0 and 1.0) in a texture. When I did shadowmapping, I created ...
1
vote
1answer
67 views

What is DirectX 11's equivalent of D3DCAPS9::MaxVertexIndex of DirectX 9?

I'm porting a DirectX 9 program to DirectX 11. How do I get the value in DirectX 11 that is retrieved using D3DCAPS9::MaxVertexIndex in DirectX 9? Thanks in advance.
0
votes
1answer
110 views

SSAO all jagged

So I've been working on SSAO for awhile, and I thought I had it right, untill I loaded up the sponza scene that accompanied the SAO technique I'm implementing ...
0
votes
1answer
74 views

Animation, Interpolation, & Structure

I have been working on animation in my small game engine recently and I am implementing some interpolation to be used with skeletal animations. I know how to do interpolation but I am not sure where ...
0
votes
1answer
67 views

Constant buffer not updating

I'm trying to rotate models independently of each other however I cannot for the life of my figure out how. I have gotten to the stage of writing this: std::vector<int>::size_type st = ...
0
votes
1answer
99 views

DirectX9 Drawing Sprites out of place due to offset

This is my very first time into DirectX. Im trying to make a simple 2D game, just for learning the basics. And i've achieved that. The next step is to draw an animation using sprites. For that, i ...
2
votes
0answers
88 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
137 views

HLSL defines vs static const

So far I've been declaring all my constant variables as static const in my hlsl shader code, yet virtually every single shader piece I've come across uses #defines instead. I know the reasons I would ...
2
votes
0answers
90 views

Enable IME in a non-windows control

I'm writing my own game in DirectX using C#. I'm at the point where I'm implementing my own textbox, written from scratch. It has the very basic functions for now, but works well. I want, however, to ...
2
votes
0answers
122 views

How to implement simple shadows on XNA?

UPDATE: See photos below the description I try desperately to implement shadows on my XNA games. My game is a style of games like Voxel (minecraft). The problem is that I do not find support / ...
2
votes
0answers
195 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
136 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
93 views

How to setup a particular blend state where the alpha channel is additive?

I would like to set a blend state to be "additive" and do the following: Result.R = Source.R + Destination.R; Result.G = Source.G + Destination.G; Result.B = Source.B + Destination.B; Result.A = ...
1
vote
0answers
259 views

Windows Phone 8.1 emulator for DirectX landscape

July 16, 2014 update: I have converted the SharpDX "MiniCube" sample project to a Universal 8.1 project. It is 100% self-contained. It will demonstrate this issue. There is a "READ ME.txt" file ...
1
vote
0answers
98 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
35 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
179 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
265 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
122 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
237 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
240 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
368 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
239 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
44 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
23 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
35 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
65 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
35 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
39 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
79 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
39 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 ...
0
votes
0answers
35 views

Having trouble getting shader to work with sprite batch in XNA #4

I found a neat "CRT screen" effect shader on the web, but I've never used shaders before and I can't seem to get it working properly. If I do the second sprite batch in my code here normally without ...
0
votes
0answers
69 views

Shader - Objects Depth or Thickness

I am using Unity and would like to render the thickness of an object.My first thought was to use the ZBuffer and the depth but it is always depend to the camera, it seems legit.But I would like to ...
0
votes
0answers
35 views

Volumetric spotlight

Hy I'm working on the a volumetric spotlight into my engine(DirectX 11). I read quite a lot about it and would like to find a relatively quick solution. ShaderX3's approach dividing the light volume ...
0
votes
0answers
43 views

HLSL - Binary operations

I'm trying to do binary operations with integers in the hlsl code. For example: int n = 10 & 15; Binary value of 10 = 1010 and Binary value of 15 = 1111. With this, n = 10, because (1010 & ...
0
votes
0answers
31 views

How to render many regions from the same texture using UV mapping?

I tried to apply some things that look like a "texture atlas". I would like to load 1 big texture which includes many small textures, my goal is to render each texture separately. I tried to use UV ...
0
votes
0answers
45 views

Transform texture coordinates when using shader

Assuming I define four vertices of a quad with texture coordinates that cover a whole texture or region of a texture, I can animate these coordinates by setting a transform using SetTransform( ...
0
votes
0answers
52 views

DirectX9 Normal/Bump Mapping Weird Texturing Artifact

As you can see the artifact here is like a triangle of the mesh getting more light. The important part of my code is below. This is the vertex declaration. VertexElement[0].Stream = 0; ...
0
votes
0answers
63 views

DXGI - IDXGISwapChain::ResizeTarget _com_error 0x887A0022 (DXGI_ERROR_NOT_CURRENTLY_AVAILABLE)

I have (yet another) issue with DXGI in that I get a very strange error when I attempt to change display resolution while in fullscreen and I just can't seem to find the solution to it. This only ...
0
votes
0answers
121 views

How do I find the camera direction vector for 3D sound purposes? (C++, DirectX)

Question I'm trying to make a sound class for playing 3D sound effects with DirectSound and DirectX, without using DirectSound's 3D libraries. The plan is to have every game object constantly play ...
0
votes
0answers
97 views

Bilinear filter in repeating texture, HLSL

I have a repeating texture that I'm using as a scroll surface. The idea is that as I pan the surface I adjust the texture coordinates, filling in what gets wrapped on the right as it disappears from ...
0
votes
0answers
155 views

How to make an Game Intro

How do I display my logo (a short video) before displaying the main menu? For example when you start Call of Duty, it displays the IW / 3ARC logo, Activision, and then a cinematic. I just need to ...
0
votes
0answers
80 views

Dealing with 2D tiled maps in DirectX

I'm new to DirectX. I'm pretty much to the point to where I can create some sprites and attach textures to them, but I'm not fully cognizant of the entire model of textures and sprites or exactly how ...
0
votes
0answers
77 views

Skinning mesh with Hermite Interpolation

I'm trying to implement an skinning mesh and I use Hermite Interpolation for evaulating frame's position. When I use the normal interpolation t*p1 + (1-t)*p2, it run well, but when I change to ...
0
votes
0answers
41 views

IndexedInstanced logic

I'm using SharpDX.Toolkit with three buffers: two vertex and one index buffer. The first vertex buffer is bound to slot 0 for per-vertex data with following data: static VertexPosition[] vertexData = ...
0
votes
0answers
31 views

Blendshapes workflow in mudbox

I am new to mudbox. I want to create a face with blendshapes. Currently my face has 24576 polygons on level 3. I would like to go to level 2 or level 1, ie lower than 6000, but there, detail suffers. ...
0
votes
0answers
526 views

Anti-aliasing with Direct2D and Direct3D Interoperability

I am trying to create a CAD drafting application that uses Direct2D to draw all the 2D graphics and uses Direct3D for all the 3D graphics like engine or machine etc. I am using Direct2D and Direct3D ...