#version 3.0;

#include "colors.inc"
#include "skies.inc" 
#include "textures.inc" 


/* The sky */
sky_sphere {
    pigment {
      gradient y
      color_map {
        [0.000 0.002 color rgb <1.0, 0.2, 0.0>
                     color rgb <1.0, 0.2, 0.0>]
        [0.002 0.200 color rgb <0.8, 0.1, 0.0>
                     color rgb <0.1, 0.2, 0.3>]
      }
      scale 2
      translate -1
    }
    pigment {
      bozo
      turbulence 0.65
      octaves 6
      omega 0.7
      lambda 2
      color_map {
          [0.0 0.1 color rgb <0.75, 0.75, 0.75>
                   color rgb <0.65, 0.65, 0.65>]
          [0.1 0.5 color rgb <0.65, 0.65, 0.65>
                   color rgbt <0.80, 0.80, 0.80, 1>]
          [0.5 1.0 color rgbt <0.85, 0.85, 0.85, 1>
                   color rgbt <0.85, 0.85, 0.85, 1>]
      }
      scale <0.2, 0.5, 0.2>
    }
    rotate 75*x
    rotate 45*z
  }

/* Water */
height_field {
    tga "HeightField.tga"
    smooth
    pigment { color rgbt <0.1,0.1,0.1,0.6> }
      finish {
        ambient 0
        diffuse .1
//        crand 0.03
//        specular 0.25
//        roughness 1.8
        reflection 0.5 //25
        refraction 1
        ior 1.3 //42
//        caustics .9
      }
    rotate <180, 50, 0>
    scale <5000, 100.0, 4000>
    translate <100,-20,2800>
  }
/**/

 plane { y, 300.0
   pigment {
      Aquamarine /*DarkSlateBlue*/ }
      normal {
         waves 20
         frequency 30
         scale 3000.0 
   
        }   
        finish { ambient 0.5 specular 0.0 reflection 0.05 }
} 

// Background:
//background { color rgb <0.752941176470588,0.752941176470588,0.658823529411765>}

// Camera (Latitude,Longitude,Radius = 30,45,0)
camera {
    #declare PCT = 300 // Percentage further away
	#declare STEREO = 0; // Normal view
	//#declare STEREO =  degrees(atan2(1,12))/2; // Left view
	//#declare STEREO = -degrees(atan2(1,12))/2; // Right view
    location <-3000,-750,-2200>
	sky      -y
	right    -4/3*x
    look_at <-900, -300, 250>
    angle 32
	rotate   <0,1e-5,0> // Prevent gap between adjecent quads
	//orthographic
}

// Lights:

light_source {
	<6800,-1400,-6660>  // Latitude,Longitude,Radius: 45,0,1537.22
	color rgb <1,1,1>
	shadowless
}


light_source {
	<-8720,-1082,-1085>  // Latitude,Longitude,Radius: 30,120,1537.22
	color rgb <1,1,1>
}


light_source {
	<-13450,-1645,-804>  // Latitude,Longitude,Radius: 60,-120,1537.22
	color rgb <1,1,1>
	shadowless
}
