Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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

share|improve this answer
    
Perfect, thanks! –  Richard Copperwaite May 8 '13 at 7:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.