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.
1
vote
1answer
17 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 ...
0
votes
1answer
17 views
Texture with D3DUSAGE_RENDERTARGET failing to release before IDirect3DDevice9::Reset
Creating the texture:
IDirect3DSurface9 *bbsurf;
if (SUCCEEDED (Device->GetRenderTarget (0, &bbsurf)))
{
D3DSURFACE_DESC desc;
if (SUCCEEDED (bbsurf->GetDesc (&desc)))
{
...
0
votes
0answers
27 views
Direct3D9 fails to render primitive on RenderTarget surface
So for some reason DrawPrimitive() doesn't seem to work with my render target surface.
// The current target, we must set it back as target afterwards
IDirect3DSurface9* temp_target;
device->...
0
votes
2answers
42 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 ...
0
votes
0answers
13 views
Issues with keyboard handling SDL_Input with Directx9 for graphics
I had a pseudo-engine made with OpenGL for 3D graphics and SDL2 for the window, input, files , textures, UI, audio... And it was just for especific purposes, so it didn't had an editor integrated, ...
0
votes
1answer
98 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 ...
0
votes
1answer
21 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 ...
1
vote
1answer
42 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 (Because I have only worked with direct file until now).
If I ...
3
votes
0answers
40 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 ...
0
votes
0answers
50 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 ...
0
votes
0answers
75 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 Callback, my Callback shows me, that a ...
1
vote
1answer
39 views
Convert Triangle/OBB Test to OBB/OBB Test
I'm using the collision library OZCollide (http://www.tsarevitch.org/ozcollide/) and I want to do OBB vs. OBB collision tests. The problem is, that this function doesn't seem to exist (see my other ...
0
votes
1answer
59 views
Why when releasing a DirectX Texture it fail
I have an instance where a class creates a DX9 texture via
UINT usage = D3DUSAGE_RENDERTARGET;
HRESULT hr = D3DXCreateTexture (m_D3DDevice,
200,
...
1
vote
1answer
259 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 ...
0
votes
0answers
36 views
How to get tearing-free present with D3D9 in windowed mode without DWM?
For a long time now I have assumed that it's impossible to get tearing-free presents with: Windows 7, no DWM (=Aero off), D3D9, windowed mode.
However, my Windows 7 PC at work just does it. My ...
1
vote
1answer
122 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 pSurface in my window. I want to have ...
1
vote
0answers
197 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 ...
1
vote
1answer
134 views
how to render to texture in single mip-level? [D3D9]
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 ...
2
votes
1answer
246 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 ...
0
votes
1answer
154 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 ...
1
vote
2answers
64 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 ...
4
votes
1answer
246 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 ...
1
vote
2answers
77 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 ...
0
votes
1answer
191 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 LPDIRECT3DINDEXBUFFER9 and Rendered per DrawIndexedPrimitive. My ...
7
votes
1answer
316 views
What is the easiest way to Implement a 3rd Person Camera in C++/DirectX9
I'm pretty new to C++ and DirectX9 and I want to Implement a Third Person Camera. After some reading about Quaternion-based Cameras I decided to try Implementing it. But it really blow my mind, so I ...
0
votes
1answer
86 views
Render time only equal half of fps
I'm working on a project that remakes mario 3 (NES). In my game loop, i face a strange thing. Here is my code:
while (true)
{
if (PeekMessage(&msg, 0, 0, 0, PM_REMOVE))
{
if (msg....
1
vote
1answer
37 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
32 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 ...
1
vote
0answers
30 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. ...
0
votes
1answer
37 views
3D space indexing for nearest neighbor searching
I am developing a CAD-like application where the user can draw (digitize) new geometries (points, polylines & polygons). While digitizing, I want the user to be able to (optionally) snap the ...
0
votes
1answer
460 views
How to Set HLSL Shader Input Textures?
Very simple question. With C++/Direct9, I'm creating a texture as RenderTarget with a full screen quad, creating a scene, setting a HLSL pixel shader, copying the image and then call Present.
1) How ...
2
votes
1answer
206 views
DX9 How to Apply HLSL Shader with StretchRect
Using DirectX 9,I'm trying to run a HLSL pixel shader on video frame data while copying it from one texture buffer to another texture buffer without displaying it. StretchRect at the end is what ...
0
votes
0answers
45 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 ...
1
vote
1answer
67 views
How to Create Device with D3DFMT_A32B32G32R32F
I'm trying to create a DirectX9 device to copy video frame data from one memory buffer to another while processing it through a HLSL shader. I will need half-float or float precision for each channel. ...
1
vote
1answer
174 views
Can DirectX9 be used without HWND handle?
I found an excellent code here that does almost everything I need: running an HLSL shader on memory texture to process video frames into another texture buffer without displaying it.
http://www....
0
votes
0answers
361 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
0answers
70 views
How can I simulate these two droplet? [duplicate]
Below is a two droplet merging together,in 2d.
I want to simulate the behavior when I exert combination force(through mouse or fling force on touch screen) on one of them to
make them to be a larger ...
1
vote
1answer
73 views
16-byte aligned matrix in DirectX9 and D3DX with Havok Physics 2012
I want to ask a question about D3DXMATRIX and D3DXMATRIXA16, and how to use them with Havok Physics.
I'm using Visual Studio 2012 on Windows 8.
I successfully created an instance of hkpWorld, added ...
-3
votes
1answer
57 views
How to draw a sprite without black transparency key?
I would like some help with the following. At the moment when I draw the sprite I want it to be full black with no transparency, i.e. 255 alpha channel. But what I get is half transparency. How can I ...
0
votes
1answer
133 views
How to set a struct as a Direct3D9 vertex shader constant?
I have a vs_2_0 shader like this:
struct ConstantBuffer
{
float4 diffuse;
float4 specular
};
shared uniform ConstantBuffer g_cb : app_constantBuffer;
void PS(out float4 Color: COLOR0)
{
...
1
vote
3answers
222 views
Grab depth buffer with unlockable D3DFORMAT
I'm currently piggy backing on a mod framework (Multitheft Auto) and trying to read the depth buffer in D3DFMT_D24S8 (DirectX9). I can read it if I change the format to D3DFMT_D32F_LOCKABLE and then ...
1
vote
1answer
114 views
FindNextValidTechnique fails
My effect file compiles successfully, but FindNextValidTechnique fails.
Technique part of the shader:
technique Diffuse
{
pass Pass0
{
VertexShader = compile vs_2_0 VertexShaderMain()...
0
votes
1answer
179 views
How can I implement triple buffering using Direct3D 9?
I am creating an application using Direct3D 9. I want to implement triple buffering with vsync. I can successfully create a graphics device object with 2 back buffers. How do I know which buffer to ...
1
vote
1answer
210 views
How can I manually syncronize render calls with a monitor's refresh rate in Direct3D 9?
I have an application that utilizes Direct3D 9 to render 3D graphics. I'm trying to manually control the number of frames rendered in a given second. Here is pseudocode:
while( bInGame )
{
// ...
1
vote
1answer
414 views
How to draw an ellipse with DirectX 9?
I can draw the outline of an ellipse but I want to draw a filled in ellipse, but I can't seem to get the code to work. Any help would be great! I am using DirectX 9 and D3DX.
0
votes
1answer
208 views
PointSprite in DirectX9
I was trying to implement a particle system using PointSprites. Draw calls return D3D_OK but I don't see any particle on the screen. I'm not using Vertex Buffer for the particles, but I use two ...
0
votes
1answer
193 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 D3DXCreateBox, D3DXCreateTeapot and D3DXCreateSphere) to perform some ...
-2
votes
1answer
2k views
Can I use my directx 9 code to visual studio 2013 that already has directx11? [closed]
I am facing problem with my directtx 9 code?
4
votes
1answer
1k 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
166 views
Blending Lightmaps and Dynamic Texture Shadows in HLSL/GLSL
I'm using Gile[s] as my lightmapper and my engine can execute GLSL/HLSL scripts.
I would like to accomplish something like this for performance reasons. I was told that this technique can only be ...