Culling and Z buffering without using the ID3DXEffect interface
Members - Reputation: 1183
Posted 16 March 2012 - 04:07 AM
After reading http://www.two-kings.de/tutorials/dxgraphics/dxgraphics18.html I have implemented a Vertex Shader and a Pixel shader without using the ID3DXEffect interface. Shortly after finishing this tutorial with my project I was plagued with culling and zbuffering glitches.
Aren't Techniques and Passes a part of the ID3DXEffect interface? If so, how do I implement culling and z buffering etc without the effect interface?
Crossbones+ - Reputation: 8760
Posted 16 March 2012 - 09:05 AM
SetSamplerState may be still used, although it may also be superseded by sampler options set in your shader code.
SetTextureStageState is removed.
Some SetRenderState calls - like lighting - are however obsoleted; most are not. You need to understand the various pipeline stages, where each state applies to each stage, and whether or not each state is superseded by the programmable pipeline (and where this is optional or mandatory).
The effects framework actually provides a wrapper around the standard Set*State calls (with the exception of SetTextureStageState) - you can see this in action (and confirm it for yourself) by creating an ID3DXEffectStateManager and examining what it does in your debugger of choice (or by using PIX).
It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.