Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- vec4 sampledDiffuse = terrain_text_1_r_color + terrain_text_1_g_color + terrain_text_1_b_color + terrain_text_1_a_color;
- vec4 sampledNormal = normalize(calcNormal(p3d_Texture0, vOutput.texcoord));
- vec4 sampledSpecular = vec4(0.3, 0.3, 0.3, 0.3);
- vec4 sampledRoughness = vec4(0.0, 0.0, 0.0, 0.0);
- .....
- vec3 normal = sampledNormal.xyz;
- //vec3 tangent_a = cross(normal.xyz, vec3(1.0, 0.0, 0.0));
- //vec3 tangent_b = cross(normal.xyz, vec3(0.0, 0.0, 1.0));
- //vec3 tangent = mix(tangent_a, tangent_b, step(length(tangent_a), length(tangent_b)));
- vec3 tangent = cross(vec3(1.0, 0.0, 0.0), normal);
- vec3 binormal = cross(tangent, normal);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement