My terrain will randomly disappear when my cameras orientation and position is in certain places or angles. Could this mean there is a problem with my terrain? Too big?
I should also mention im using the "fx_modelTex3Nm" 3 texture terrain shader with normal mapping. Having a look in wireframe, its not that the terrain is disappearing, but the lights are randomly loosing there influence on the textures. But even with the shader off, same thing.
the light problem can ccme from the fact Sun is always the last dynamic light out of the 8 available, and this shader uses only the 1st 3 as I remember. you can define the actual number of light affecting a terrain chunk by iLights.
I had disappearing terrain only 2 times: 1) when scaled a terrain of a wmb level after, and 2) when applied a clipped or not check.
the demo works fine with less ligths but that uses a model not a terrain...
I know PASS_SOLID is set for the material, but try it to replace the last line of calcLightFalloff in the shader with return(float4(0,0,0,1)); to not to be transparent but intransparent black. you can also add an AlphaTestEnable = false; to both "pass one"-s in the end. moreover I don't know why ZWriteEnable is needed there.
Well, it stays lit as long as the two dynamic lights are shining on it. I have the sun turned off so I think that irritating it.. It doesn't want to react to spotlights tho, just renders as omni. Has anybody implemented spotlights into it? Or is it not easy/possible.
imo it's only for point lights, spots are a bit more difficult, but sorry I've never used them only saw e.g. in the Sponza demo (find in Showcase section).