Questions tagged [directx9]

Questions which are specifically related to version 9.0 of DirectX SDK. If your question is not specific to this version of SDK (i.e. it could apply to DirectX 10 and 11 as well), use the 'directx' tag.

Filter by
Sorted by
Tagged with
0
votes
0answers
19 views

Huge input lag in C++ DX9 application when having many entities

So I have created a 2D game engine used for creating top down singleplayer shooters and now I encounter some massive input lags when I have spawned a few entities (maybe 20 opponents). This results in ...
0
votes
1answer
62 views

What to do with d3dx9math.h when converting to DirectX11?

I'm converting an old game from DirectX9 to DirectX11 and I have a question: What I should use instead of d3dx9math.h? Do I have to convert everything for ...
0
votes
0answers
20 views

Shadow rendering through wall

In our game, shadows generated for dynamic objects through a shadowmap render on the wrong sides of walls. Here you can see the issue: In the top right corner you see the shadow from a box I placed on ...
0
votes
1answer
604 views

Failed LockRect of IDirect3DSurface9

I have hooked Present method of the IDirect3DDevice9 interface, and I want to be able to start video capturing. Taking a screenshoot like this work ...
0
votes
0answers
44 views

How to include a FX shader to my game?

I have an old game source from 2004, the game runs DirectX9, and I want to improve the graphics. I downloaded NVIDIA FX Composer 2.5, and I created a “...
0
votes
1answer
53 views

HLSL defined render states

As described in this article you can define render states such as ZFunc inside of the HLSL shader. You can also set these from application code. If you set the same state (e.g. ZFunc) in both ...
1
vote
1answer
51 views

Need help converting LPDIRECT3DTEXTURE9 to openGl libgdx Pixmap

What i'm trying to achieve. I need to know the equivalent of LPDIRECT3DTEXTURE9 to openGL, the problem is I only know Pixmap ...
0
votes
0answers
34 views

Fog white outlines

I am having weird artifacts when using fog. Some meshes get white outline around it. It happens mostly to objects close to the terrain. Does anyone know what causes this? You might need to open the ...
1
vote
1answer
53 views

Rendering differences between ps_1_3 and ps_2_a

I am trying to update a shader from ps_1_3 inline assembly to ps_2_a HLSL. However the HLSL shader causes things to render ...
1
vote
1answer
160 views

WDDM Managing Memory in D3DPOOL_DEFAULT

In this question I saw that I was running out of memory in D3DPOOL_DEFAULT in DX9EX. After changing my usage from ...
1
vote
1answer
191 views

D3DXLoadSurfaceFromResource failed to load bitmap image

I'm working on a small DX9 game project for learning purpose. I'm current dealing with resources manager file (*.rc) which I'm not used to (I have only worked with direct file until now). If I use <...
1
vote
1answer
63 views

Polygon draw order issue

I'm working on a software and I'd to move the rendering API from SlimDX to SharpDX. I've done that but I noticed that the solid polygon are not drawn correctly i.e., even if the polygon is at the back ...
1
vote
1answer
863 views

DirectX 11, support for Font drawing

I have recently started to work with DirectX 11 and 12, I am using Microsoft Visual Studio Community Edition. I am under a 64-bit machine. I am currently rendering a frame with background and a window ...
4
votes
1answer
560 views

Why is my DX9 render target restricted to 512×512?

When I use a render target higher in resolution than 512×512, I receive an image with black borders, depending on how big this texture was. Why is this? How can I fix it? Here's how I create the ...
0
votes
1answer
36 views

How to perform alpha blending on saved raw argb videos(a image and a video will also work) using direct3d9 , direct3d10 or direct3d11?

I'm trying to perform alpha blending on videos using direct3d11. I've wrote the code snippet below to achieve this. I've tried to read the video file out2.argb frame by frame and store it in the ...
4
votes
3answers
3k views

What is the issue with my model rendering from .obj files?

Well I can clearly tell that what rendered is close to what I wanted, but there seems to be a few problems. The .obj files contained values like "f", "v", "vt". Image Of Problem: As you can see it ...
1
vote
0answers
469 views

Is there a quick-reference card for HLSL (DX9 or DX11)?

Does anyone know of a DX9 or DX11 counterpart to the GLSL quick-reference card from Khronos? The GLSL card is pages 8-11 here, and lists preprocessor directives, operators, types, and builtin ...
1
vote
1answer
501 views

How can I render to texture in single mip-level?

I'm trying to implement Hi-Z Screen-Space Cone-Traced Reflections using Direct3D9. I already know how to render to specific mip-level texture using Direct3D11, but not using Direct3D9. Has anyone ...
0
votes
0answers
115 views

How to fx low FPS in a single threaded Directx9 3D game

We're having issues with low FPS in a third-person shooter 3D game. This happens when you have too many polygons on screen. The FPS is locked to 60, and the gameplay is fine, but the moment when you ...
1
vote
1answer
71 views

Directx9 - Generate mesh from vertex and index buffer

I've got a single vertex buffer and an index buffer for a cube in Directx9. I now want to generate a LPD3DXMESH object from them, so that I can manage mouse picking and other stuff with the cube ...
1
vote
0answers
47 views

How do I get the proper swapchain enumeration for getting the backbuffer?

I have code that I'm trying to update from DirectX 8, and so far I have been doing just fine until I reached this line of code: ...
2
votes
1answer
1k views

GPU particle system using vertex texture fetch in Direct3D9

I've been reading up on particle systems amongst other stuff and one interesting approach uses rendertargets to store a particle's position, velocity, lifetime, etc. A pretty neat summary is given ...
1
vote
1answer
2k 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 ...
3
votes
1answer
870 views

Converting ARGB surface to NV12 surface

I'm trying to use NVENC to encode some frames that I'm capturing from a game. I've hooked EndScene() and I can get the data from the backbuffer, which is in ARGB format. Unfortunately, NVENC only ...
1
vote
1answer
107 views

Which DirectX Version to use for a low poly game?

Which DirectX Version (10, 11 or 12) is recommended to use, if you want to have a low-poly game with shaders, shadow and aliasing. But not normal or height maps. Moreover my question is, because once ...
2
votes
2answers
6k views

Simple 3D OBB-Collision (DirectX9, C++)

I'm trying to implement a simple OBB vs. OBB collision detection! I don't need to know where the collision occures, I only want to know whether a collision occures. The problem is, that after lot of ...
1
vote
1answer
447 views

How to retrieve vertex information from ID3DXMesh

I need to know the position of each vertex (and triangles) from a mesh (a pointer to ID3DXMesh, created by calling functions like ...
1
vote
1answer
435 views

Efficient way to draw multiple separated quads

Let's assume I want to draw several separated (possibly textured) quads in Direct3D 9, each consisting of two triangles: How should I draw these for maximum performance, i.e. which of the following ...
3
votes
1answer
1k views

How does the Direct3D 9 rasterizer determine triangle coverage?

I'm working on a software rasterizer to use in my project. I have implemented one that works well, however, often my rasterizer under or overestimates triangle coverage. I need perfect emulation of ...
2
votes
1answer
3k views

Convert a .fbx to a .x model

I'm trying to convert a .fbx model to a .x for use in my DirectX 9 project. Does anyone know of any software to allow me to do this? Been googling for a few days and not really found anything that ...
0
votes
1answer
105 views

Picking a specific point of a map in Direct 3D

I'm trying to pick a specific point on a randomly generated terrain with bunch of tiny triangles. Right now, I'm just iterating through every triangle and picking a intersected triangle using ...
2
votes
1answer
178 views

Why is my picture distorted after switching from D3D9 to D3D11?

I have moved app from Directx9 into Directx11. After this upgrade strange thing happened with my world. Objects get skewed and became 2D, also they are clipped in unexpected places. The two arrows ...
0
votes
1answer
87 views

Why does my palette swapping code in D3D9 not have any effect?

I want to do palette swapping in my game, in a fast way and without shaders, so I couldn't replace pixels in a texture, then I tried to use the SetPaletteEntries and SetCurrentTexturePalette method, ...
0
votes
1answer
246 views

Retrieving DirectX9 Shader Input Parameters (vertex Input Layout)

Is it possible to retrieve the vertex input layout from an effect file in Direct3D9? In Direct3D11 I can achieve this by using ...
2
votes
1answer
169 views

FindNextValidTechnique fails

My effect file compiles successfully, but FindNextValidTechnique fails. Technique part of the shader: ...
1
vote
0answers
135 views

dx Shader Model 3.0 break, continue, and loop attributes not recognized

I've been stuck on this problem for just too long. Long story short, the compiler returns "syntax error: unexpected token" for break, continue, [loop], [unroll] and pretty much every other attribute. ...
-1
votes
1answer
776 views

DirectX poor Sprite Performance

I render an animation with 100+ frames. (Direct X9,Sprites / Pngs) I load them all in an array and render them. How i do it: Load all frames in an array of bytes. When i need the frame x, i create ...
0
votes
1answer
136 views

D3D9CAPS gives unusual maximum shader instructions value

I'm trying to implement a vertex and pixel shader on a piece of hardware we're developing a game for which uses the DirectX 9.0c runtime. The shaders are for boned mesh animation and is a bit more ...
0
votes
0answers
157 views

Weird Collisions in ODE

I'm trying to get a basic OBB/OBB Collision System working. For this I use ODE. My problem is: Whenever I use the dSpaceCollide and pass in my Space and my ...
4
votes
5answers
6k views

How to implement transition between screens

Last night I showed my game to my friends and they said it was a bit jumpy. The example he gave was in the pokemon games when a battle starts music plays, the screen flashes then pixels out then the ...
1
vote
1answer
168 views

Direct3D - ways to retrieve world position from depth buffer without matrix information

For an existing game (VBS3) I'd like to write a plugin which exports all the rendered pixels with their world position (basically something like a LIDAR point cloud). Actually I don't need the ...
0
votes
1answer
151 views

Unresolved external symbols

I have installed direct SDK and I have visual studio 2010 , I started to write code and compile and when I run I get error of unresolved external symbols or some sort of this , I searched and I found ...
6
votes
2answers
2k views

Partial Shader Signatures HLSL D3D11 C++

I had been debugging a problem I was having in a single shader file with 2 functions in it. I'm using DirectX 11, vs_5_0 and ps_5_0. I have stripped it down to its basic components to understand what ...
1
vote
1answer
863 views

How to correctly reference a texture bound using SetTexture in Direct3D 9

In Direct3D 9, after assigning a few textures to samplers using SetTexture, what is the correct way to access/create the samplers in the relevant pixel shader? Previously I was creating samplers like ...
0
votes
0answers
317 views

Using DirectWrite to write text on a IDirect3DTexture9

I'm trying to write text using the DirectWrite API on a IDirect3DTexture9. I've heard that people were capable of doing this but I do not see directly how I can glue these two APIs together. It seems ...
0
votes
1answer
66 views

Is the 'partially checked' build sufficient to run the debug version of Direct3D 9?

To run Direct3D 9 in debug, it is necessary to "install a 'checked' version of the OS". The checked version of Windows comes in both full and partial flavors. It seems that the partial version is ...
1
vote
1answer
517 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 ...
4
votes
1answer
2k views

rendering an image within c# & sharpdx dirext3d9 [game overlay]

I'm following this guide and the related blog post to implement a basic game overlay for DirectX 9 games using SharpDX. So the tutorial already have an example for text rendering but I need to be ...
1
vote
0answers
304 views

How to render IDirect3DSurface9 in my window?

I have some code that captures the screen and save data into a surface. g_pDirect3D_Device->GetFrontBufferData(0, pSurface); All is ok, now I want to display <...
1
vote
1answer
174 views

1
2 3 4 5