//All that belongs to the texture block

#declare GreenCol1 = color srgb < 83 / 255, 120 / 255, 67 / 255 >;
#declare GreenCol2 = color srgb < 67 / 255, 104 / 255, 47 / 255 >;
#declare Clear = color srgbt 1 filter 0;

#declare ScatteredGrassPig = 
pigment{
	wrinkles color_map{ [0 Clear ][0.4 Clear][0.4 GreenCol2][0.475 GreenCol1][0.55 GreenCol2][0.55 Clear][1.0 Clear]}
}

#declare GrassNormal = normal{ agate 0.85 }
#declare NullNormal = normal{ wrinkles 0 }

#declare ScatteredGrassNormal = 
normal{
	wrinkles normal_map{ [0 NullNormal][0.4 NullNormal][0.4 GrassNormal ][0.475 GrassNormal][0.55 GrassNormal][0.55 NullNormal][1.0 NullNormal ] }
}

#declare ScatteredGrassTexture = 
texture{ pigment{ ScatteredGrassPig scale 0.25 } normal{ ScatteredGrassNormal scale 0.25 } finish{ phong 0 phong_size 0 } }

#declare WaterTexture = 
texture{
	pigment{ color srgb < 0.1 * 1.2, 0.2 * 1.2, 0.15 * 1.2 > }
	finish{ ambient 0.15 diffuse 0.55 brilliance 6.0 phong 0.8 phong_size 120 reflection 0.45 emission 0 }
	normal{ bumps 0.5 scale <1,0.25,0.25> turbulence 0.6 }
}		
						
#declare BrownCol = color srgb < 101 / 255, 62 / 255, 53 / 255 >;
#declare DarkStoneCol = color srgb < 188 * 0.75 / 255, 179 * 0.75 / 255, 189 * 0.75 / 255 >;
#declare LightStoneCol = color srgb < 230 / 255, 219 / 255, 157 / 255 >;

#declare P_RockAndMud = pigment{ crackle color_map{ [0.2 LightStoneCol ][0.2 DarkStoneCol][0.8 DarkStoneCol][0.8 LightStoneCol] } }

#declare Pig_Flore = pigment{ granite color_map{ 
												[0.4 Clear]
												[0.4 GreenCol1]
												[0.5 GreenCol2]
												[0.6 GreenCol1]
												[0.6 Clear]
												[1.0 Clear] } scale 1.5}

#declare StrateFlorePig = pigment{ granite color_map{ 
														[0.4 Clear]
														[0.4 GreenCol1 *0.5]
														[0.6 GreenCol1*0.5]
														[0.6 GreenCol1*0.5]
														[0.6 Clear]
														[1.0 Clear] } scale 0.25}

#declare Pig_RiverStrate = texture{ pigment{gradient y pigment_map{ 
                                                        [ 0.0 Clear ]
                                                        [ 128/255 StrateFlorePig ]
                                                        [ 128/255  StrateFlorePig ]
                                                        [ 222/255 StrateFlorePig ]
                                                        [ 222/255 Clear ]
                                                        [ 1.0 Clear ]
                                                    }
                                scale <1, 4, 1>
                                }
                                finish{ phong 0 phong_size 0 }
                            }
                            
#declare T_Blue = texture{ pigment{ color srgb <0, 0, 1> } }                            

#declare DirtCol = color srgb < 159 / 255, 155 / 255, 112 / 255 >;
#declare BrightDirtCol = DirtCol * 1.2;
#declare DarkDirtCol = DirtCol * 0.8;

#declare DirtAndEarthTexture = T_5var_Wrinkles(1, DarkDirtCol, Brown2_srgb, DirtCol, Brown4_srgb, DirtCol)

#declare PigMixGrassEarth = pigment{ wrinkles pigment_map{[0.0 Pig_brown2 ][0.5 Pig_brown2][0.5 Pig_mediumGrass][1.0 Pig_mediumGrass]} scale 3}

#declare MountainSlopeTexture = texture{ slope y texture_map{ [0.55 T_rocks2][0.62 T_brown2][0.70 T_brown2][0.70 PigMixGrassEarth][1 PigMixGrassEarth] } }