예제 #1
0
        /// <summary>
        /// Initializes this instance.
        /// </summary>
        /// <param name="ginfo"></param>
        /// <param name="factory"></param>
        /// <param name="obj"></param>
        public override void  Initialize(Engine.GraphicInfo ginfo, Engine.GraphicFactory factory, IObject obj)
        {
            this._shader = factory.GetEffect("EMSHADER", true, true);

            if (texCube == null)
            {
                texCube = factory.GetTextureCube(texName, false);
            }


            base.Initialize(ginfo, factory, obj);
        }
        public override void  Initialize(Engine.GraphicInfo ginfo, Engine.GraphicFactory factory, IObject obj)
        {
            base.Initialize(ginfo, factory, obj);
            effect = factory.GetEffect("Water", true, true);
            normal = factory.GetTexture2D("waves2", true);
            //effect.Parameters["tNormalMap"].SetValue(factory.GetTexture2D("waves2",true));

            if (String.IsNullOrEmpty(TexureName) && environmentTexture == null)
            {
                ActiveLogger.LogMessage("WaterModel: TextCubeName cannot be null/empty", LogLevel.FatalError);
                throw new Exception("WaterModel: TextCubeName cannot be null/empty");
            }
            if (environmentTexture == null)
            {
                environmentTexture = factory.GetTextureCube(TexureName);
            }
        }
 public override void  Initialize(Engine.GraphicInfo ginfo, Engine.GraphicFactory factory, IObject obj)
 {
     this._shader = factory.GetEffect("effects/EMTransparencySHADER");
     texCube      = factory.GetTextureCube(texName, false);
     base.Initialize(ginfo, factory, obj);
 }