1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Support for SSAO

This commit is contained in:
Juan Linietsky
2016-12-04 12:45:30 -03:00
parent 27a46d78ec
commit a299c3ebf1
17 changed files with 927 additions and 7 deletions

View File

@@ -534,6 +534,15 @@ float CameraMatrix::get_aspect() const {
return w/h;
}
int CameraMatrix::get_pixels_per_meter(int p_for_pixel_width) const {
Vector3 result = xform(Vector3(1,0,-1));
return int((result.x * 0.5 + 0.5) * p_for_pixel_width);
}
float CameraMatrix::get_fov() const {
const float * matrix = (const float*)this->matrix;