// eyeball
// m.miller 4.2.23

#declare Transparent = rgbt 1 ;

//--- eyeball
#declare imgDiffuse = "eyeball_diffuse.png" 
#declare T_eyeball =
texture {
   pigment { 
        image_map {
            png imgDiffuse     
            map_type 0
            interpolate 4 
            } 
            
  }
  finish {  emission .1 } 

}

//--- clear gloss
#declare M_clear_gloss =
material { 
    texture{
        pigment{ 
            Transparent
        } 
        finish { 
            ambient .2
            brilliance 4
            diffuse 1
            specular 1
            roughness 1/100
            phong 1
            phong_size 120 //fresnel 
            reflection {.01, .7 fresnel}
        }
    }
}


#declare eyeball = 
union {
    difference {
        sphere { <0,0,0>, .5 } 
        sphere { <0,0,0>, .5 translate <0,0,-.927> } 
        texture {T_eyeball translate <.5,.5,0>} 
        }
     sphere { <0,0,0>, .55 material {M_clear_gloss} }
}



#declare eyeball2 = 
union {
        sphere { <0,0,0>, .4  
            texture {T_eyeball translate <.5,.5,0>} 
        }
     sphere { <0,0,0>, .33 material {M_clear_gloss} }
}