Пример #1
0
		public override bool PreAddToRenderState( TargetRenderState targetRenderState, Graphics.Pass srcPass,
		                                          Graphics.Pass dstPass )
		{
			if ( srcPass.LightingEnabled == false || srcPass.Parent.Parent.ReceiveShadows == false )
			{
				return false;
			}

			foreach ( var it in this.shadowTextureParamsList )
			{
				TextureUnitState curShadowTexture = dstPass.CreateTextureUnitState();

				//TODO
				//curShadowTexture.ContentType = TextureUnitState.ContentShadow;
				curShadowTexture.SetTextureAddressingMode( TextureAddressing.Border );
				curShadowTexture.TextureBorderColor = Core.ColorEx.White;
				it.TextureSamplerIndex = dstPass.TextureUnitStatesCount - 1;
			}

			return true;
		}