uniform samplerCube envMap;
in vec2 texCoord;
uniform float testvalue;


void main()
{
    float PI=3.1415926535897932384626433832795;
    
    vec2 uv=texCoord;
    
    

    float phi=uv.x*PI*2;
    float theta=(-uv.y+0.5)*PI;
        
    vec3 dir = vec3(cos(phi)*cos(theta),sin(theta),sin(phi)*cos(theta));
    vec4 color = texture( envMap, dir );

    gl_FragColor = color;
}












