From eb2121d513c1c5fee126a784bafe891666996f46 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Tue, 30 Jun 2020 12:11:42 +0200 Subject: [PATCH] Fix RasterizerDummy after SDF GI changes. Re-enable JavaScript CI. --- .travis.yml | 18 ++++++++--------- drivers/dummy/rasterizer_dummy.h | 33 ++++++++++++++++++++++++++------ 2 files changed, 36 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9376fbcc065..2639cf96614 100644 --- a/.travis.yml +++ b/.travis.yml @@ -100,15 +100,15 @@ matrix: packages: - *linux_deps -# - name: Javascript export template (release, emscripten latest) -# stage: build -# env: PLATFORM=javascript TOOLS=no TARGET=release CACHE_NAME=${PLATFORM}-emcc-latest EXTRA_ARGS="use_closure_compiler=yes" -# os: linux -# compiler: clang -# addons: -# apt: -# packages: -# - *linux_deps + - name: JavaScript export template (release, emscripten latest) + stage: build + env: PLATFORM=javascript TOOLS=no TARGET=release CACHE_NAME=${PLATFORM}-emcc-latest EXTRA_ARGS="use_closure_compiler=yes" + os: linux + compiler: clang + addons: + apt: + packages: + - *linux_deps before_install: - eval "${MATRIX_EVAL}" diff --git a/drivers/dummy/rasterizer_dummy.h b/drivers/dummy/rasterizer_dummy.h index 7af7678f63b..636a885c89a 100644 --- a/drivers/dummy/rasterizer_dummy.h +++ b/drivers/dummy/rasterizer_dummy.h @@ -51,6 +51,14 @@ public: int get_directional_light_shadow_size(RID p_light_intance) { return 0; } void set_directional_shadow_count(int p_count) {} + /* SDFGI UPDATE */ + + virtual void sdfgi_update(RID p_render_buffers, RID p_environment, const Vector3 &p_world_position) {} + virtual int sdfgi_get_pending_region_count(RID p_render_buffers) const { return 0; } + virtual AABB sdfgi_get_pending_region_bounds(RID p_render_buffers, int p_region) const { return AABB(); } + virtual uint32_t sdfgi_get_pending_region_cascade(RID p_render_buffers, int p_region) const { return 0; } + virtual void sdfgi_update_probes(RID p_render_buffers, RID p_environment, const RID *p_directional_light_instances, uint32_t p_directional_light_count, const RID *p_positional_light_instances, uint32_t p_positional_light_count) {} + /* SKY API */ RID sky_create() { return RID(); } @@ -87,6 +95,11 @@ public: virtual void environment_set_ssao(RID p_env, bool p_enable, float p_radius, float p_intensity, float p_bias, float p_light_affect, float p_ao_channel_affect, RS::EnvironmentSSAOBlur p_blur, float p_bilateral_sharpness) {} virtual void environment_set_ssao_quality(RS::EnvironmentSSAOQuality p_quality, bool p_half_size) {} + virtual void environment_set_sdfgi(RID p_env, bool p_enable, RS::EnvironmentSDFGICascades p_cascades, float p_min_cell_size, RS::EnvironmentSDFGIYScale p_y_scale, bool p_use_occlusion, bool p_use_multibounce, bool p_read_sky, bool p_enhance_ssr, float p_energy, float p_normal_bias, float p_probe_bias) {} + + virtual void environment_set_sdfgi_ray_count(RS::EnvironmentSDFGIRayCount p_ray_count) {} + virtual void environment_set_sdfgi_frames_to_converge(RS::EnvironmentSDFGIFramesToConverge p_frames) {} + void environment_set_tonemap(RID p_env, RS::EnvironmentToneMapper p_tone_mapper, float p_exposure, float p_white, bool p_auto_exposure, float p_min_luminance, float p_max_luminance, float p_auto_exp_speed, float p_auto_exp_scale) {} void environment_set_adjustment(RID p_env, bool p_enable, float p_brightness, float p_contrast, float p_saturation, RID p_ramp) {} @@ -114,6 +127,7 @@ public: RID light_instance_create(RID p_light) { return RID(); } void light_instance_set_transform(RID p_light_instance, const Transform &p_transform) {} + virtual void light_instance_set_aabb(RID p_light_instance, const AABB &p_aabb) {} void light_instance_set_shadow_transform(RID p_light_instance, const CameraMatrix &p_projection, const Transform &p_transform, float p_far, float p_split, int p_pass, float p_shadow_texel_size, float p_bias_scale = 1.0, float p_range_begin = 0, const Vector2 &p_uv_scale = Vector2()) {} void light_instance_mark_visible(RID p_light_instance) {} @@ -137,9 +151,13 @@ public: virtual bool gi_probe_needs_update(RID p_probe) const { return false; } virtual void gi_probe_update(RID p_probe, bool p_update_light_instances, const Vector &p_light_instances, int p_dynamic_object_count, InstanceBase **p_dynamic_objects) {} + virtual void gi_probe_set_quality(RS::GIProbeQuality) {} + virtual void render_scene(RID p_render_buffers, const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, InstanceBase **p_cull_result, int p_cull_count, RID *p_light_cull_result, int p_light_cull_count, RID *p_reflection_probe_cull_result, int p_reflection_probe_cull_count, RID *p_gi_probe_cull_result, int p_gi_probe_cull_count, RID *p_decal_cull_result, int p_decal_cull_count, InstanceBase **p_lightmap_cull_result, int p_lightmap_cull_count, RID p_environment, RID p_camera_effects, RID p_shadow_atlas, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass) {} void render_shadow(RID p_light, RID p_shadow_atlas, int p_pass, InstanceBase **p_cull_result, int p_cull_count) {} virtual void render_material(const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, InstanceBase **p_cull_result, int p_cull_count, RID p_framebuffer, const Rect2i &p_region) {} + virtual void render_sdfgi(RID p_render_buffers, int p_region, InstanceBase **p_cull_result, int p_cull_count) {} + virtual void render_sdfgi_static_lights(RID p_render_buffers, uint32_t p_cascade_count, const uint32_t *p_cascade_indices, const RID **p_positional_light_cull_result, const uint32_t *p_positional_light_cull_count) {} void set_scene_pass(uint64_t p_pass) {} virtual void set_time(double p_time, double p_step) {} @@ -148,7 +166,7 @@ public: virtual RID render_buffers_create() { return RID(); } virtual void render_buffers_configure(RID p_render_buffers, RID p_render_target, int p_width, int p_height, RS::ViewportMSAA p_msaa, RS::ViewportScreenSpaceAA p_screen_space_aa) {} - virtual void screen_space_roughness_limiter_set_active(bool p_enable, float p_curve) {} + virtual void screen_space_roughness_limiter_set_active(bool p_enable, float p_amount, float p_curve) {} virtual bool screen_space_roughness_limiter_is_active() const { return false; } virtual void sub_surface_scattering_set_quality(RS::SubSurfaceScatteringQuality p_quality) {} @@ -158,6 +176,7 @@ public: bool free(RID p_rid) { return true; } virtual void update() {} + virtual void sdfgi_set_debug_probe_select(const Vector3 &p_position, const Vector3 &p_dir) {} RasterizerSceneDummy() {} ~RasterizerSceneDummy() {} @@ -576,7 +595,8 @@ public: void light_set_negative(RID p_light, bool p_enable) {} void light_set_cull_mask(RID p_light, uint32_t p_mask) {} void light_set_reverse_cull_face_mode(RID p_light, bool p_enabled) {} - void light_set_use_gi(RID p_light, bool p_enabled) {} + void light_set_bake_mode(RID p_light, RS::LightBakeMode p_bake_mode) {} + void light_set_max_sdfgi_cascade(RID p_light, uint32_t p_cascade) {} void light_omni_set_shadow_mode(RID p_light, RS::LightOmniShadowMode p_mode) {} @@ -595,7 +615,8 @@ public: AABB light_get_aabb(RID p_light) const { return AABB(); } float light_get_param(RID p_light, RS::LightParam p_param) { return 0.0; } Color light_get_color(RID p_light) { return Color(); } - bool light_get_use_gi(RID p_light) { return false; } + virtual RS::LightBakeMode light_get_bake_mode(RID p_light) { return RS::LIGHT_BAKE_DISABLED; } + virtual uint32_t light_get_max_sdfgi_cascade(RID p_light) { return 0; } uint64_t light_get_version(RID p_light) const { return 0; } /* PROBE API */ @@ -604,9 +625,9 @@ public: void reflection_probe_set_update_mode(RID p_probe, RS::ReflectionProbeUpdateMode p_mode) {} void reflection_probe_set_intensity(RID p_probe, float p_intensity) {} - void reflection_probe_set_interior_ambient(RID p_probe, const Color &p_ambient) {} - void reflection_probe_set_interior_ambient_energy(RID p_probe, float p_energy) {} - void reflection_probe_set_interior_ambient_probe_contribution(RID p_probe, float p_contrib) {} + void reflection_probe_set_ambient_mode(RID p_probe, RS::ReflectionProbeAmbientMode p_mode) {} + void reflection_probe_set_ambient_color(RID p_probe, const Color &p_color) {} + void reflection_probe_set_ambient_energy(RID p_probe, float p_energy) {} void reflection_probe_set_max_distance(RID p_probe, float p_distance) {} void reflection_probe_set_extents(RID p_probe, const Vector3 &p_extents) {} void reflection_probe_set_origin_offset(RID p_probe, const Vector3 &p_offset) {}