Skip to main content

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
1 vote
2 answers
289 views

Why do a lot of games use DirectX9

A lot of older games use DirectX9 which makes sense, however several modern games such as Sonic Mania, Terraria and Undertale all use DirectX9. Is there some benefit to using an older version of the ...
Auxy's user avatar
  • 13
0 votes
1 answer
35 views

Error in directional light shadow projection matrix

I have VC++ code for DX9 that draws shadows perfectly. ...
black4joss's user avatar
0 votes
1 answer
140 views

Texture does not draw with ATI Radeon RX, but does with NVIDIA/no GPU

I am getting a problem when trying to draw a texture on the following hardware (configuration 1): ATi Radeon RX 6600 XT Screen (OS Windows 11): I have other hardware (configuration 2): nVidia Geforce ...
Range's user avatar
  • 159
0 votes
1 answer
46 views

How to remove the influence of a region of a texture, using texture stages?

I created a 512x512 shadow texture, and I don't want to render the center part on my Terrain. Can something like this be done? I didn't find anything on the internet about this (Example as in the ...
Tiberius's user avatar
0 votes
0 answers
144 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 ...
frontend-newb's user avatar
0 votes
0 answers
105 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 ...
Mats391's user avatar
  • 113
0 votes
1 answer
382 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 ...
Cosma Eduard's user avatar
0 votes
0 answers
227 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 “...
Cosma Eduard's user avatar
0 votes
1 answer
273 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 ...
Mats391's user avatar
  • 113
1 vote
1 answer
73 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 ...
Mats391's user avatar
  • 113
1 vote
1 answer
96 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 ...
Pankaj Sachdeva's user avatar
1 vote
1 answer
2k 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 ...
John Smith's user avatar
1 vote
1 answer
82 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 ...
ronscript's user avatar
  • 501
0 votes
1 answer
51 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 ...
Chandana's user avatar
0 votes
0 answers
345 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 ...
ryspbsk's user avatar
1 vote
1 answer
210 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 ...
Valerio Nenci's user avatar
1 vote
0 answers
100 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: ...
Cyan_Cap's user avatar
1 vote
1 answer
129 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 ...
Ryen Sekret's user avatar
1 vote
0 answers
806 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 ...
cxw's user avatar
  • 155
0 votes
1 answer
143 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, ...
GamerH2's user avatar
0 votes
1 answer
898 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 ...
John's user avatar
  • 1
1 vote
0 answers
181 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. ...
user1983877's user avatar
-1 votes
1 answer
1k 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 ...
L. Terrat's user avatar
1 vote
1 answer
280 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 ...
Apollo13's user avatar
0 votes
1 answer
364 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 ...
Mohamed Hanafy's user avatar
0 votes
1 answer
206 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 ...
TheRarebit's user avatar
1 vote
1 answer
1k 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 ...
the.punisher's user avatar
0 votes
1 answer
401 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 ...
Joey Muiser's user avatar
0 votes
0 answers
495 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 ...
Roy T.'s user avatar
  • 10.2k
0 votes
1 answer
82 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 ...
Zachary Burns's user avatar
1 vote
1 answer
749 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 ...
DemetrioProgramerOsorio's user avatar
1 vote
1 answer
285 views

Texture with D3DUSAGE_RENDERTARGET failing to release before IDirect3DDevice9::Reset

Creating the texture: ...
Maximus Minimus's user avatar
0 votes
2 answers
828 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 ...
the.punisher's user avatar
0 votes
1 answer
1k views

Standard unit value for 3d game character height?

Basically I'm building a first person shooter game using DirectX9. And now, I'm working on the modeling side. But before I start modeling, I have to make sure that I create all the models with ...
Farhad Reza's user avatar
0 votes
1 answer
126 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 ...
Hee Jong Cho's user avatar
1 vote
1 answer
294 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 <...
Hai Hoang's user avatar
  • 113
4 votes
0 answers
137 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 ...
Kartik150's user avatar
  • 163
0 votes
0 answers
334 views

Linear gradient shader ( Photoshop-like)

I'm searching a way to implement a linear gradient shader that behaves as the linear gradient in Photoshop (only the vertical case is necessary). It will be applied to 2D sprites. Currently I'm ...
enigma's user avatar
  • 395
0 votes
0 answers
235 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 ...
Anonymous Anonymous's user avatar
0 votes
1 answer
754 views

Why when releasing a DirectX Texture it fail

I have an instance where a class creates a DX9 texture via ...
unknownSPY's user avatar
3 votes
1 answer
1k 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 ...
David Davidson's user avatar
1 vote
0 answers
344 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 <...
victorio's user avatar
1 vote
0 answers
1k views

Loading FBX Files into a DirectX 9 Application

I'm having an extremely difficult time trying to convert an FBX file into a format that can be used with DirectX. I've read a lot of articles on forums all over the internet and have followed ...
P. Avery's user avatar
  • 575
1 vote
1 answer
712 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 ...
postcar999's user avatar
2 votes
2 answers
9k 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 ...
Anonymous Anonymous's user avatar
1 vote
1 answer
555 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 ...
eric.m's user avatar
  • 123
1 vote
2 answers
183 views

Direct3D9: How to switch from one full-screen monitor to another?

I know how to display my game in full-screen on a specific monitor by specifying an adapter number when the D3D device is created. However, I don't know how to switch from one monitor to another ...
Walt D's user avatar
  • 153
4 votes
1 answer
965 views

Where do you put the game window in fullscreen mode?

My game, like most games, supports running in fullscreen exclusive mode. And I'd like to give my players the choice of which monitor the game will display on. In order to prevent the player from ...
Walt D's user avatar
  • 153
1 vote
2 answers
133 views

Most efficient way to optimize based on gpu type?

So, I'm writing an optimization button that should optimize a game based on the type of hardware the user has. I know I can use d3dadapter_identifier9 to achieve this, but what would be the most ...
Jeff's user avatar
  • 13
0 votes
1 answer
1k views

Collisions between mesh (bounding-box) and Vertex/Index Buffer

I have a short Question: I'm trying to add Collisions in my 3D DirectX9 game and my World is Stored in a LPDIRECT3DVERTEXBUFFER9 and ...
Anonymous Anonymous's user avatar

1
2 3 4 5