protected override void OnMaterialRender(uint passId, Material material, ref bool skipPass)
        {
            base.OnMaterialRender(passId, material, ref skipPass);

            //update texture name
            if (passId == 100)
            {
                TextureUnitState textureUnit = material.Techniques[0].Passes[0].TextureUnitStates[1];

                //we can't change texture by means call SetTextureName() for compositor materials. use _Internal_SetTexture
                Texture texture = null;
                if (!string.IsNullOrEmpty(TextureName))
                {
                    texture = TextureManager.Instance.Load(TextureName, Texture.Type.Type2D);
                }
                if (texture == null)
                {
                    texture = TextureManager.Instance.Load("Base\\FullScreenEffects\\ColorCorrectionLUT\\Textures\\NoEffect.png");
                }
                textureUnit._Internal_SetTexture(texture);
                //if( textureUnit.TextureName != TextureName )
                //   textureUnit.SetTextureName( TextureName );

                GpuProgramParameters parameters = material.Techniques[0].Passes[0].FragmentProgramParameters;
                parameters.SetNamedConstant("multiply", multiply);
                parameters.SetNamedConstant("add", add);
            }
        }