1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

-Fix disable_3d flag

-Add extra flag optimize=[size,speed] to be able to prioritize size
This commit is contained in:
Juan Linietsky
2018-07-21 17:26:14 -03:00
parent cfcb6e11f2
commit 2b9902db06
12 changed files with 97 additions and 33 deletions

View File

@@ -1644,7 +1644,8 @@ void VisualServerScene::_light_instance_update_shadow(Instance *p_instance, cons
}
void VisualServerScene::render_camera(RID p_camera, RID p_scenario, Size2 p_viewport_size, RID p_shadow_atlas) {
// render to mono camera
// render to mono camera
#ifndef _3D_DISABLED
Camera *camera = camera_owner.getornull(p_camera);
ERR_FAIL_COND(!camera);
@@ -1679,6 +1680,7 @@ void VisualServerScene::render_camera(RID p_camera, RID p_scenario, Size2 p_view
_prepare_scene(camera->transform, camera_matrix, ortho, camera->env, camera->visible_layers, p_scenario, p_shadow_atlas, RID());
_render_scene(camera->transform, camera_matrix, ortho, camera->env, p_scenario, p_shadow_atlas, RID(), -1);
#endif
}
void VisualServerScene::render_camera(Ref<ARVRInterface> &p_interface, ARVRInterface::Eyes p_eye, RID p_camera, RID p_scenario, Size2 p_viewport_size, RID p_shadow_atlas) {
@@ -2102,6 +2104,8 @@ void VisualServerScene::_render_scene(const Transform p_cam_transform, const Cam
void VisualServerScene::render_empty_scene(RID p_scenario, RID p_shadow_atlas) {
#ifndef _3D_DISABLED
Scenario *scenario = scenario_owner.getornull(p_scenario);
RID environment;
@@ -2110,6 +2114,7 @@ void VisualServerScene::render_empty_scene(RID p_scenario, RID p_shadow_atlas) {
else
environment = scenario->fallback_environment;
VSG::scene_render->render_scene(Transform(), CameraMatrix(), true, NULL, 0, NULL, 0, NULL, 0, environment, p_shadow_atlas, scenario->reflection_atlas, RID(), 0);
#endif
}
bool VisualServerScene::_render_reflection_probe_step(Instance *p_instance, int p_step) {