示例#1
0
        private void CreateWater(WarpRenderer renderer)
        {
            float waterHeight = (float)m_scene.RegionInfo.RegionSettings.WaterHeight;

            renderer.AddPlane("Water", 256f * 0.5f);
            renderer.Scene.sceneobject("Water").setPos(127.5f, waterHeight, 127.5f);

            renderer.AddMaterial("WaterColor", ConvertColor(WATER_COLOR));
            renderer.Scene.material("WaterColor").setTransparency((byte)((1f - WATER_COLOR.A) * 255f));
            renderer.SetObjectMaterial("Water", "WaterColor");
        }
示例#2
0
        private void CreateWater(IScene scene, WarpRenderer renderer, ITerrain terrain)
        {
            float waterHeight = (terrain != null) ? terrain.WaterHeight : 0f;

            renderer.AddPlane("Water", 256f * 0.5f);
            renderer.Scene.sceneobject("Water").setPos(127.5f, waterHeight, 127.5f);

            renderer.AddMaterial("WaterColor", ConvertColor(WATER_COLOR));
            renderer.Scene.material("WaterColor").setTransparency((byte)((1f - WATER_COLOR.A) * 255f));
            renderer.SetObjectMaterial("Water", "WaterColor");
        }
示例#3
0
        private void CreateWater(WarpRenderer renderer)
        {
            float waterHeight = (float)m_scene.RegionInfo.RegionSettings.WaterHeight;

            renderer.AddPlane("Water", 256f * 0.5f);
            renderer.Scene.sceneobject("Water").setPos(127.5f, waterHeight, 127.5f);

            renderer.AddMaterial("WaterColor", ConvertColor(WATER_COLOR));
            renderer.Scene.material("WaterColor").setReflectivity(0);              // match water color with standard map module thanks lkalif
            renderer.Scene.material("WaterColor").setTransparency((byte)((1f - WATER_COLOR.A) * 255f));
            renderer.SetObjectMaterial("Water", "WaterColor");
        }
示例#4
0
        private void CreateWater(WarpRenderer renderer)
        {
            float waterHeight = (float)m_scene.RegionInfo.RegionSettings.WaterHeight;

            renderer.AddPlane("Water", 256f * 0.5f);
            renderer.Scene.sceneobject("Water").setPos(127.5f, waterHeight, 127.5f);

            renderer.AddMaterial("WaterColor", ConvertColor(WATER_COLOR));
			renderer.Scene.material("WaterColor").setReflectivity(0);  // match water color with standard map module thanks lkalif
            renderer.Scene.material("WaterColor").setTransparency((byte)((1f - WATER_COLOR.A) * 255f));
            renderer.SetObjectMaterial("Water", "WaterColor");
        }
示例#5
0
        private void CreateWater(WarpRenderer renderer)
        {
            float waterHeight = (float)m_scene.RegionInfo.RegionSettings.WaterHeight;

            renderer.AddPlane("Water", 256f * 0.5f);
            renderer.Scene.sceneobject("Water").setPos(127.5f, waterHeight, 127.5f);

            renderer.AddMaterial("WaterColor", ConvertColor(WATER_COLOR));
            renderer.Scene.material("WaterColor").setTransparency((byte)((1f - WATER_COLOR.A) * 255f));
            renderer.SetObjectMaterial("Water", "WaterColor");
        }
        private void CreateWater (WarpRenderer renderer)
        {
            float waterHeight = (float)m_scene.RegionInfo.RegionSettings.WaterHeight;

            renderer.AddPlane ("Water", m_scene.RegionInfo.RegionSizeX * 0.5f);
            renderer.Scene.sceneobject ("Water").setPos ((m_scene.RegionInfo.RegionSizeX / 2) - 0.5f, waterHeight, (m_scene.RegionInfo.RegionSizeY / 2) - 0.5f);

            RegionLightShareData rls = m_scene.RequestModuleInterface<Aurora.Framework.IWindLightSettingsModule> ().FindRegionWindLight ();
            
            AssetBase textureAsset = m_scene.AssetService.Get (rls.normalMapTexture.ToString ());
            warp_Material waterColormaterial;
            if (rls != null)
                waterColormaterial = new warp_Material (ConvertColor (new Color4 (rls.waterColor.X / 256, rls.waterColor.Y / 256, rls.waterColor.Z / 256, WATER_COLOR.A)));
            else
                waterColormaterial = new warp_Material (ConvertColor (WATER_COLOR));

            waterColormaterial.setTransparency ((byte)((1f - WATER_COLOR.A) * 255f) * 2);
            waterColormaterial.setReflectivity (50);
            renderer.Scene.addMaterial ("WaterColor", waterColormaterial);
            renderer.SetObjectMaterial ("Water", "WaterColor");

            /*if (textureAsset != null)
            {
                IJ2KDecoder decoder = m_scene.RequestModuleInterface<IJ2KDecoder> ();
                Bitmap bitmap = (Bitmap)decoder.DecodeToImage (textureAsset.Data);
                if (bitmap != null)
                {
                    textureAsset = null;
                    warp_Texture texture = new warp_Texture (bitmap);
                    warp_Material waterTextmaterial = new warp_Material (texture);
                    waterTextmaterial.setTransparency ((byte)((1f - WATER_COLOR.A) * 255f) * 4);
                    waterTextmaterial.setReflectivity (0);
                    renderer.AddPlane ("Water2", m_scene.RegionInfo.RegionSizeX * 0.5f);
                    renderer.Scene.sceneobject ("Water2").setPos ((m_scene.RegionInfo.RegionSizeX / 2) - 0.5f, waterHeight, (m_scene.RegionInfo.RegionSizeY / 2) - 0.5f);
                    renderer.Scene.addMaterial ("WaterColor2", waterTextmaterial);
                    renderer.SetObjectMaterial ("Water2", "WaterColor2");
                }
            }*/
        }
示例#7
0
        private void CreateWater(IScene scene, WarpRenderer renderer, ITerrain terrain)
        {
            float waterHeight = (terrain != null) ? terrain.WaterHeight : 0f;

            renderer.AddPlane("Water", 256f * 0.5f);
            renderer.Scene.sceneobject("Water").setPos(127.5f, waterHeight, 127.5f);

            renderer.AddMaterial("WaterColor", ConvertColor(WATER_COLOR));
            renderer.Scene.material("WaterColor").setTransparency((byte)((1f - WATER_COLOR.A) * 255f));
            renderer.SetObjectMaterial("Water", "WaterColor");
        }