Quote:Original post by SchrompfThat means IDirect3DDevice9::SetTexture( ThatStageToWhichTheTextureWasBound, NULL); Most probably there's an effect equivalent of that call to bind a NULL texture to that specific sampler.
That's what I already said: I found that answer already for fixed function pipelines, but there is no equivalent in the HLSL pipeline. I can only set pEffect->SetTexture(handleTexture, NULL), but that didn't help a bit. We programmable pipeline guys know the Device->SetTexture() only from the tales of our ancestors ;-)
(Although it has its special meaning for programmable piepline, etc., read below.)
But anyway out of desperation I tried the fixed pipeline way again, although it didn't help earlier, combined with the other suggestions I got...
And it actually helped! I don't know what I made different that time, but this time it helped. I set blindly: Device->SetTexture(0..2, NULL) in a loop. But that's total guessing, because I never set the textures that way in the first time. I even guess the nr. of textures (3), because there a 3 different textures involved in my rendering process.
After that I set the texture I want to render from again in the effect, although this shouldn't be needed, and it works without it, I do it anyway.
Because: this use of Device->SetTexture(...) is mysteriously and actually
not correct for the programmable pipeline. Although it is documented and has its use for the programmable pipeline, DirectX sets it itself (in
this case) and I interfere blindly without exactly knowing why and how DirectX set and bound the texture sampler stages to the textures.
Does anyone know more how DirectX sets and binds the textures internally with SetTexture in the
programmable shader pipeline?