Using buffer reference instead of un-sized array
This commit is contained in:
parent
e3a57e6d63
commit
c8a0122dd6
248 changed files with 2593 additions and 2660 deletions
|
|
@ -18,7 +18,6 @@
|
|||
*/
|
||||
|
||||
|
||||
|
||||
//-
|
||||
// This utility compresses a normal(x,y,z) to a uint and decompresses it
|
||||
|
||||
|
|
@ -119,8 +118,7 @@ void ComputeDefaultBasis(const vec3 normal, out vec3 x, out vec3 y)
|
|||
// ZAP's default coordinate system for compatibility
|
||||
vec3 z = normal;
|
||||
const float yz = -z.y * z.z;
|
||||
y = normalize(((abs(z.z) > 0.99999f) ? vec3(-z.x * z.y, 1.0f - z.y * z.y, yz) :
|
||||
vec3(-z.x * z.z, yz, 1.0f - z.z * z.z)));
|
||||
y = normalize(((abs(z.z) > 0.99999f) ? vec3(-z.x * z.y, 1.0f - z.y * z.y, yz) : vec3(-z.x * z.z, yz, 1.0f - z.z * z.z)));
|
||||
|
||||
x = cross(y, z);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue