Original Post
I'm attempting to work out a simple planet renderer. At one point, I figured I'd turn on lighting to see things shaded somewhat properly, only to find myself having problems getting the full lighting effect I want. I'm using textured spheres, but in order to have them textured, I'm having to set the texture stage with SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1). When I do this, the light I have set no longer affects the spheres. I've tried with a material set, and without, to the same effect. Issue two is that if I have a z-buffer setup (format D16, I'm in windowed mode with D3D9), if I clear the buffer to any value under 1.0f, nothing gets rendered at all. However, any values cleared to above 1.0f, everything renders as if the z-buffer is off. I know that the value is supposed to be between 0.0 and 1.0, but clearing the z-buffer to 0.0f doesn't lead to any visible rendering. Thanks in advance, - Pfhoenix