Move SSAO gInvProj to the CPU instead of GPU
Also make Mat4f.invert() return void instead of boolean to prevent confusion about trying to pass the result into shader uniforms.
This commit is contained in:
@@ -287,17 +287,18 @@ public class Mat4f
|
||||
this.m23 = f;
|
||||
}
|
||||
|
||||
public boolean invert()
|
||||
public boolean canInvert()
|
||||
{
|
||||
float det = this.adjudicateAndDet();
|
||||
return (Math.abs(det) > 1.0E-6F);
|
||||
}
|
||||
|
||||
public void invert()
|
||||
{
|
||||
float det = this.adjudicateAndDet();
|
||||
if (Math.abs(det) > 1.0E-6F)
|
||||
{
|
||||
this.multiply(det);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user