예제 #1
0
 public WaterMaterial(Viewer viewer, string waterTexturePath)
     : base(viewer, waterTexturePath)
 {
     waterTexture = Viewer.TextureManager.Get(waterTexturePath, true);
     shader       = Viewer.MaterialManager.SceneryShader;
     for (int i = 0; i < shader.Techniques.Count; i++)
     {
         if (shader.Techniques[i].Name == "ImagePS")
         {
             techniqueIndex = i;
             break;
         }
     }
 }
예제 #2
0
        public void PrepareFrame(Viewer viewer)
        {
            if (viewer.Settings.UseMSTSEnv == false)
            {
                solarDirection = viewer.World.Sky.solarDirection;
            }
            else
            {
                solarDirection = viewer.World.MSTSSky.mstsskysolarDirection;
            }

            if (shadowMapMaterial == null)
            {
                shadowMapMaterial = (ShadowMapMaterial)viewer.MaterialManager.Load("ShadowMap");
            }
            if (sceneryShader == null)
            {
                sceneryShader = viewer.MaterialManager.SceneryShader;
            }
        }