Modified rendering to use cluster instead of foward
This commit is contained in:
parent
f8b5c5f063
commit
ee1e89f8c0
14 changed files with 685 additions and 181 deletions
|
|
@ -244,6 +244,18 @@ void Basis::scale_local(const Vector3 &p_scale) {
|
|||
*this = scaled_local(p_scale);
|
||||
}
|
||||
|
||||
float Basis::get_uniform_scale() const {
|
||||
return (elements[0].length() + elements[1].length() + elements[2].length()) / 3.0;
|
||||
}
|
||||
|
||||
void Basis::make_scale_uniform() {
|
||||
float l = (elements[0].length() + elements[1].length() + elements[2].length()) / 3.0;
|
||||
for (int i = 0; i < 3; i++) {
|
||||
elements[i].normalize();
|
||||
elements[i] *= l;
|
||||
}
|
||||
}
|
||||
|
||||
Basis Basis::scaled_local(const Vector3 &p_scale) const {
|
||||
Basis b;
|
||||
b.set_diagonal(p_scale);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue