Original Post
From reading the documentation, this call is suppose to store effect states at Begin and restore at end. So ALPHATESTENABLE should get set back to false, IF it was false before ::Begin. And the same for the D3DRS_ALPHAREF, it gets set with the original at the end. Concerning the following, it doesnt seem to restore the ALPHATESTENABLE state back to false, i have to add the commented bit at the end. So im guessing the state was already set before the call. But i cant find this anywhere in my code. Basically i just want to clarify that my understanding is correct.
m_FX->SetTechnique(this->m_hTech1);
m_FX->Begin(0, 0);
HR(m_D3dDevice->SetRenderState(D3DRS_ALPHAREF, (DWORD)0x00000999));
HR(m_D3dDevice->SetRenderState(D3DRS_ALPHATESTENABLE, true));
HR(m_D3dDevice->SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_GREATEREQUAL));
m_FX->BeginPass(0);
//render stuff
m_FX->EndPass();
m_FX->End();
//HR(m_D3dDevice->SetRenderState(D3DRS_ALPHATESTENABLE, false));