diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/SCsub | 1 | ||||
-rw-r--r-- | drivers/gles3/rasterizer_gles3.cpp | 10 | ||||
-rw-r--r-- | drivers/gles3/rasterizer_gles3.h | 2 | ||||
-rw-r--r-- | drivers/gles3/rasterizer_storage_gles3.cpp | 8 | ||||
-rw-r--r-- | drivers/gles3/shaders/scene.glsl | 9 | ||||
-rw-r--r-- | drivers/unix/os_unix.cpp | 14 |
6 files changed, 22 insertions, 22 deletions
diff --git a/drivers/SCsub b/drivers/SCsub index 938927f3a9..d96d0ed7a9 100644 --- a/drivers/SCsub +++ b/drivers/SCsub @@ -46,4 +46,5 @@ if env.split_drivers: else: env.add_source_files(env.drivers_sources, "*.cpp") lib = env.Library("drivers", env.drivers_sources) + env.NoCache(lib) env.Prepend(LIBS=[lib]) diff --git a/drivers/gles3/rasterizer_gles3.cpp b/drivers/gles3/rasterizer_gles3.cpp index ee61481a86..cd0adbd0d1 100644 --- a/drivers/gles3/rasterizer_gles3.cpp +++ b/drivers/gles3/rasterizer_gles3.cpp @@ -352,7 +352,7 @@ void RasterizerGLES3::blit_render_target_to_screen(RID p_render_target, const Re canvas->canvas_end(); } -void RasterizerGLES3::end_frame() { +void RasterizerGLES3::end_frame(bool p_swap_buffers) { #if 0 canvas->canvas_begin(); @@ -384,7 +384,10 @@ void RasterizerGLES3::end_frame() { canvas->draw_generic_textured_rect(Rect2(0,0,15,15),Rect2(0,0,1,1)); #endif - OS::get_singleton()->swap_buffers(); + if (p_swap_buffers) + OS::get_singleton()->swap_buffers(); + else + glFinish(); /* print_line("objects: "+itos(storage->info.render_object_count)); print_line("material chages: "+itos(storage->info.render_material_switch_count)); @@ -412,7 +415,8 @@ void RasterizerGLES3::make_current() { void RasterizerGLES3::register_config() { GLOBAL_DEF("rendering/quality/filters/use_nearest_mipmap_filter", false); - GLOBAL_DEF("rendering/quality/filters/anisotropic_filter_level", 4.0); + GLOBAL_DEF("rendering/quality/filters/anisotropic_filter_level", 4); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/filters/anisotropic_filter_level", PropertyInfo(Variant::INT, "rendering/quality/filters/anisotropic_filter_level", PROPERTY_HINT_RANGE, "1,16,1")); GLOBAL_DEF("rendering/limits/time/time_rollover_secs", 3600); } diff --git a/drivers/gles3/rasterizer_gles3.h b/drivers/gles3/rasterizer_gles3.h index 4bfec09bf3..c27af7d019 100644 --- a/drivers/gles3/rasterizer_gles3.h +++ b/drivers/gles3/rasterizer_gles3.h @@ -59,7 +59,7 @@ public: virtual void restore_render_target(); virtual void clear_render_target(const Color &p_color); virtual void blit_render_target_to_screen(RID p_render_target, const Rect2 &p_screen_rect, int p_screen = 0); - virtual void end_frame(); + virtual void end_frame(bool p_swap_buffers); virtual void finalize(); static void make_current(); diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp index 89d3d7ff75..fc9150ecdc 100644 --- a/drivers/gles3/rasterizer_storage_gles3.cpp +++ b/drivers/gles3/rasterizer_storage_gles3.cpp @@ -5694,13 +5694,9 @@ void RasterizerStorageGLES3::update_particles() { else frame_time = 1.0 / 30.0; - float delta = particles->pre_process_time; - if (delta > 0.1) { //avoid recursive stalls if fps goes below 10 - delta = 0.1; - } - float todo = delta; + float todo = particles->pre_process_time; - while (todo >= frame_time) { + while (todo >= 0) { _particles_process(particles, frame_time); todo -= frame_time; } diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl index a3792371af..b2b10fdb11 100644 --- a/drivers/gles3/shaders/scene.glsl +++ b/drivers/gles3/shaders/scene.glsl @@ -458,12 +458,7 @@ VERTEX_SHADER_CODE #endif //RENDER_DEPTH - -#if !defined(SKIP_TRANSFORM_USED) && !defined(RENDER_DEPTH_DUAL_PARABOLOID) gl_Position = projection_matrix * vec4(vertex_interp,1.0); -#else - gl_Position = vertex; -#endif position_interp=gl_Position; @@ -1423,7 +1418,7 @@ uniform highp float gi_probe_normal_bias2; uniform bool gi_probe2_enabled; uniform bool gi_probe_blend_ambient2; -vec3 voxel_cone_trace(sampler3D probe, vec3 cell_size, vec3 pos, vec3 ambient, bool blend_ambient, vec3 direction, float tan_half_angle, float max_distance, float p_bias) { +vec3 voxel_cone_trace(mediump sampler3D probe, vec3 cell_size, vec3 pos, vec3 ambient, bool blend_ambient, vec3 direction, float tan_half_angle, float max_distance, float p_bias) { float dist = p_bias;//1.0; //dot(direction,mix(vec3(-1.0),vec3(1.0),greaterThan(direction,vec3(0.0))))*2.0; float alpha=0.0; @@ -1445,7 +1440,7 @@ vec3 voxel_cone_trace(sampler3D probe, vec3 cell_size, vec3 pos, vec3 ambient, b return color; } -void gi_probe_compute(sampler3D probe, mat4 probe_xform, vec3 bounds,vec3 cell_size,vec3 pos, vec3 ambient, vec3 environment, bool blend_ambient,float multiplier, mat3 normal_mtx,vec3 ref_vec, float roughness,float p_bias,float p_normal_bias, inout vec4 out_spec, inout vec4 out_diff) { +void gi_probe_compute(mediump sampler3D probe, mat4 probe_xform, vec3 bounds,vec3 cell_size,vec3 pos, vec3 ambient, vec3 environment, bool blend_ambient,float multiplier, mat3 normal_mtx,vec3 ref_vec, float roughness,float p_bias,float p_normal_bias, inout vec4 out_spec, inout vec4 out_diff) { diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index 0d102902e8..0b1aebaaab 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -447,13 +447,17 @@ int OS_Unix::get_processor_count() const { String OS_Unix::get_user_data_dir() const { - String appname = get_safe_application_name(); + String appname = get_safe_dir_name(ProjectSettings::get_singleton()->get("application/config/name")); if (appname != "") { - bool use_godot_dir = ProjectSettings::get_singleton()->get("application/config/use_shared_user_dir"); - if (use_godot_dir) { - return get_data_path().plus_file(get_godot_dir_name()).plus_file("app_userdata").plus_file(appname); + bool use_custom_dir = ProjectSettings::get_singleton()->get("application/config/use_custom_user_dir"); + if (use_custom_dir) { + String custom_dir = get_safe_dir_name(ProjectSettings::get_singleton()->get("application/config/custom_user_dir_name"), true); + if (custom_dir == "") { + custom_dir = appname; + } + return get_data_path().plus_file(custom_dir); } else { - return get_data_path().plus_file(appname); + return get_data_path().plus_file(get_godot_dir_name()).plus_file("app_userdata").plus_file(appname); } } |