Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / 3D Theory & Graphics / inhibiting writing to second render target, flipcode edition Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
ganchmaster

April 15, 2005, 10:49 AM

I have a situation where I have multiple render targets set up, and I want to have a shader that only writes to one of them. Of course I could do this by SetRenderTarget(1, NULL), but I'd rather not be issuing a bunch of SetRenderTarget commands when COLORWRITEENABLE1 is supposed to do this for me. But it's not. No matter what I do, the shader ends up writing black into the second render target. Here's what I've tried:

pDevice->SetRenderState(D3DRS_COLORWRITEENABLE1, 0) doesn't seem to work
HLSL: ColorWriteEnable1 = 0 doesn't seem to work
Simply not writing anything to oC1 in the shader still writes black
Setting the render target to NULL does work, but as I mentioned I'd rather not resort to that.

I have verified that, for instance, ordinary D3DRS_COLORWRITEENABLE works as expected in the same situations. I'm using DX9.0c, and the most recent drivers with my NVidia 6800GT. The caps viewer shows that I have multiple independent write masks.

Anyone got this to work? It's probably not a commonly used feature and I wonder if the NVidia drivers don't work right with it.

 
This thread contains 1 message.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.