You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

13 lines
261 B

varying vec4 V_WorldPos;
varying vec3 V_Normal;
uniform samplerCube U_MainTexture;
void main()
{
vec3 eyeVec = normalize(V_WorldPos.xyz - vec3(0.0));
vec3 n = normalize(V_Normal);
vec3 r = reflect(eyeVec, n);
gl_FragColor=textureCube(U_MainTexture, r);
}