1
\$\begingroup\$

My question is a simple one.

Functionally, practically, and performance-wise, what are the differences between using a D3DX Texture Shader, and using a Pixel/Fragment Shader rendered with a full width/height quad to a texture?

D3DXCreateTextureShader(
  _In_   const DWORD *pFunction,
  _Out_  LPD3DXTEXTURESHADER *ppTextureShader
);
HRESULT D3DXFillTextureTX(
  _Inout_  LPDIRECT3DTEXTURE9 pTexture,
  _In_     LPD3DXTEXTURESHADER pTextureShader
);

Are the above methods just syntactic sugar for performing the same task?

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

Texture shaders actually does not exists on a GPU. They are just emulated in drivers. What it means is, that using them is very slow and you shouldn't use them in a real-time application like game.

If you looking for clearing textures just use clear function. If you want to create texture procedurally i do recommend binding it as a rendertarget and using rendering pipeline

\$\endgroup\$
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .