Quick question
heres my pixel shader:
PS_OUTPUT main_PS( VS_OUTPUT IN )
{
PS_OUTPUT OUT;
OUT.color.rgb = tex2D( waterTexture, IN.texcoord0.xy );
OUT.color.a = 0.5f;
return OUT;
}
and heres some my cpp code:
Device->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
Device->SetRenderState(D3DRS_SRCBLEND,D3DBLEND_SRCALPHA);
Device->SetRenderState(D3DRS_DESTBLEND,D3DBLEND_INVSRCALPHA);
I thought the point of shaders was to avoid the renderstate calls and stuff like that. I'm pretty sure setting D3DRS_ALPHABLENDENABLE to true is necessary regardless, but I still have to set the src and dest blend?
PS: Please don't insist I should use effects. ;)
thanks in advance!