Skip to main content
Share Your Experience: Take the 2024 Developer Survey
4 votes
Accepted

Transform texture coordinates when using shader

I just stumbled back on this question, so I figure I should supply an answer. :) The shader code I wrote in the question is almost right. I forgot that to convert a point with these transformations, ...
Scott Oliver's user avatar
4 votes
Accepted

Why do a lot of games use DirectX9

The vast majority of game developers today don't deal with graphic APIs like DirectX, OpenGL, Mantle or Vulkan directly. They delegate that to a library or game engine, so they can focus on the fun ...
Philipp's user avatar
  • 120k
3 votes
Accepted

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

I can see that you're checking the HRESULTs returned from D3D functions in some cases (but not all of them), and where you're checking them you just silently handle the error. I'd suggest adding debug ...
Adam's user avatar
  • 7,374
3 votes

DirectX poor Sprite Performance

Sprites in Direct3D are just textured triangles (or rather two triangles forming a quadrilateral). As such, the performance hit is because each time you change the source texture it has to flush the ...
Chuck Walbourn's user avatar
3 votes

Which DirectX Version to use for a low poly game?

You generally want to use the latest version that is compatible with your target platform. For most people that means DirectX11, since DirectX12 is not supported on versions of Windows (i.e. Windows 7)...
Jack Aidley's user avatar
  • 2,126
2 votes

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

A C++ code implementation of the separating axis theorem for simple collision detection between two 3D OBB would be this: ...
Haalef's user avatar
  • 121
2 votes

Need help converting LPDIRECT3DTEXTURE9 to openGl libgdx Pixmap

LPDIRECT3DTEXTURE9 is a texture object. OpenGL, by comparison to Direct3D, is weakly-typed, so there is no class or struct that is equivalent; instead texture objects are represented by unsigned ...
Maximus Minimus's user avatar
2 votes

HLSL defined render states

This article is specific to using HLSL with the Effects Framework; it's not general to HLSL. The Effects Framework is a high-level software wrapper over the Direct3D 9 (in this case) API. It has no ...
Maximus Minimus's user avatar
2 votes

Why do a lot of games use DirectX9

I can't answer this definitively as I don't use DirectX, but two reasons I can think of: support for more (older) systems, if they don't need the new features of later versions, why put in the ...
MadMan's user avatar
  • 753
1 vote

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

It's just a math library, so as long as it doesn't interact with the actual D3D API, then you can in theory use any math library you wish. Things to watch out for might include row-major vs column-...
Maximus Minimus's user avatar
1 vote
Accepted

Rendering differences between ps_1_3 and ps_2_a

I haven't (yet) found definitive confirmation of this (and it's likely lost in the mists of time, in ancient documentation that no longer exists), but SM1.3 is clearly clamping intermediates to 1.0 ...
Maximus Minimus's user avatar
1 vote
Accepted

DirectX 11, support for Font drawing

For DirectX Tool Kit, you should walk through the first few lessons of the tutorials which covers the basic of SpriteBatch and ...
Chuck Walbourn's user avatar
1 vote

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

https://docs.microsoft.com/en-us/windows/win32/api/d3d11/ne-d3d11-d3d11_usage Resource Bind Options Dynamic: Input to a Stage: yes³ 3 - The resource can only be created with a single ...
Maximus Minimus's user avatar
1 vote

Failed LockRect of IDirect3DSurface9

The device needs to be created with D3DPRESENTFLAG_LOCKABLE_BACKBUFFER: Set this flag if the application requires the ability to lock the back buffer directly. Note that back buffers are not ...
Maximus Minimus's user avatar
1 vote
Accepted

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

SetTransform/GetTransform only apply if the programmer is using the legacy fixed-function pipeline. They don't apply at all if a vertex shader is used, so yes, I would say that it is very common to ...
Maximus Minimus's user avatar
1 vote

Unresolved external symbols

Based on the comments, you likely have misconfigured your x86 vs. x64 library paths for using the legacy DirectX SDK with VS 2010. In the Project Settings under VC++ Directories. For all ...
Chuck Walbourn's user avatar
1 vote

D3D9CAPS gives unusual maximum shader instructions value

These two caps - MaxVShaderInstructionsExecuted and MaxPShaderInstructionsExecuted - are both of type DWORD, which is an unsigned int type. From d3d9caps.h: ...
Maximus Minimus's user avatar
1 vote

Retrieving DirectX9 Shader Input Parameters (vertex Input Layout)

There doesn't appear to be any way to do this in Direct3D 9. In theory the D3D11 shader reflection API looks as though it should work, since there's nothing in (at least this part of) it that ...
Maximus Minimus's user avatar
1 vote
Accepted

texlod() is not supported on ps_4_0_level_9_3 , how can I do a similar operation in this case?

Yes, it's not available on the ps_4_0_level_9_3 target. If we look at the documentation for texCUBElod we see that it's only available in the pixel shader and only for Shader Model 3 and 4 targets; ...
Maximus Minimus's user avatar
1 vote
Accepted

Why is my Direct3D 9 floating point texture clamping values 0–1?

I am the author of the comment referred to in this question. Unfortunately since Microsoft have pulled all of the old DirectX SDKs it's no longer possible to cite a reference to one of those for the ...
Maximus Minimus's user avatar
1 vote

Picking a specific point of a map in Direct 3D

Do you know how the triangles are created? If you have access to that, you could choose a random triangle at creation and store that. I don't see a reason you should need to use the GPU or DirectX for ...
RichardJones's user avatar
1 vote

Converting ARGB surface to NV12 surface

The latest NVENC SDK (7.1) allows ARGB input directly. See here.
Michael IV's user avatar
1 vote

Run Simple HLSL Pixel Shader with DirectX 9

Since this question has been viewed 1000 times, I might as well post a follow-up. This is the code I ended up with, processing Avisynth video scripts through pixel shaders. https://github.com/...
Etienne Charland's user avatar
1 vote

Partial Shader Signatures HLSL D3D11 C++

thanks to @xoofx 's good answer, and I found this MSDN doc: https://msdn.microsoft.com/en-us/library/windows/desktop/bb509650(v=vs.85).aspx
crazii's user avatar
  • 111

Only top scored, non community-wiki answers of a minimum length are eligible