Advertisement
Guest User

Untitled

a guest
Jul 25th, 2014
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. vec4 sampledDiffuse = terrain_text_1_r_color + terrain_text_1_g_color + terrain_text_1_b_color + terrain_text_1_a_color;
  2. vec4 sampledNormal = normalize(calcNormal(p3d_Texture0, vOutput.texcoord));
  3. vec4 sampledSpecular = vec4(0.3, 0.3, 0.3, 0.3);
  4. vec4 sampledRoughness = vec4(0.0, 0.0, 0.0, 0.0);
  5.  
  6. .....
  7.  
  8. vec3 normal = sampledNormal.xyz;
  9. //vec3 tangent_a = cross(normal.xyz, vec3(1.0, 0.0, 0.0));
  10. //vec3 tangent_b = cross(normal.xyz, vec3(0.0, 0.0, 1.0));
  11. //vec3 tangent = mix(tangent_a, tangent_b, step(length(tangent_a), length(tangent_b)));
  12. vec3 tangent = cross(vec3(1.0, 0.0, 0.0), normal);
  13. vec3 binormal = cross(tangent, normal);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement