Created
May 26, 2015 16:27
-
-
Save Kerollmops/cbb13f9f48a25dd07c68 to your computer and use it in GitHub Desktop.
vecteur texture
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vec3 vec111 = normalize(vec3(1, 1, 1)); | |
vec3 dist = vec3( abs(vert_normal_model.x - vec111.x), | |
abs(vert_normal_model.y - vec111.y), | |
abs(vert_normal_model.z - vec111.z)); | |
if (dist.z < dist.x && dist.z < dist.y) { | |
uv = vec2(vp_model.x, vp_model.y); | |
} | |
else if (dist.y < dist.x && dist.y < dist.z) { | |
uv = vec2(vp_model.x, vp_model.z); | |
} | |
else { | |
uv = vec2(vp_model.y, vp_model.z); | |
} | |
uv *= scale_ratio; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment