Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float3 normal = mul(normalize(input.Normal), World);
- // [0] Tangent / [1] Binormal / [2] Normal
- output.WorldToTangentSpace[0] = cross(normal, float3(-1.0, 0.0, 0.0));
- output.WorldToTangentSpace[1] = cross(output.WorldToTangentSpace[0], normal);
- output.WorldToTangentSpace[2] = normal;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement