feat: modules moved and engine moved to submodule
This commit is contained in:
parent
dfb5e645cd
commit
c33d2130cc
5136 changed files with 225275 additions and 64485 deletions
|
|
@ -722,6 +722,12 @@ SkyRD::SkyRD() {
|
|||
roughness_layers = GLOBAL_GET("rendering/reflections/sky_reflections/roughness_layers");
|
||||
sky_ggx_samples_quality = GLOBAL_GET("rendering/reflections/sky_reflections/ggx_samples");
|
||||
sky_use_cubemap_array = GLOBAL_GET("rendering/reflections/sky_reflections/texture_array_reflections");
|
||||
#if defined(MACOS_ENABLED) && defined(__x86_64__)
|
||||
if (OS::get_singleton()->get_current_rendering_driver_name() == "vulkan" && RenderingServer::get_singleton()->get_video_adapter_name().contains("Intel")) {
|
||||
// Disable texture array reflections on macOS on Intel GPUs due to driver bugs.
|
||||
sky_use_cubemap_array = false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void SkyRD::init() {
|
||||
|
|
@ -777,9 +783,9 @@ void SkyRD::init() {
|
|||
actions.renames["SCREEN_UV"] = "uv";
|
||||
actions.renames["FRAGCOORD"] = "gl_FragCoord";
|
||||
actions.renames["TIME"] = "params.time";
|
||||
actions.renames["PI"] = _MKSTR(Math_PI);
|
||||
actions.renames["TAU"] = _MKSTR(Math_TAU);
|
||||
actions.renames["E"] = _MKSTR(Math_E);
|
||||
actions.renames["PI"] = String::num(Math::PI);
|
||||
actions.renames["TAU"] = String::num(Math::TAU);
|
||||
actions.renames["E"] = String::num(Math::E);
|
||||
actions.renames["HALF_RES_COLOR"] = "half_res_color";
|
||||
actions.renames["QUARTER_RES_COLOR"] = "quarter_res_color";
|
||||
actions.renames["RADIANCE"] = "radiance";
|
||||
|
|
@ -1093,15 +1099,7 @@ void SkyRD::setup_sky(const RenderDataRD *p_render_data, const Size2i p_screen_s
|
|||
sky_light_data.enabled = true;
|
||||
|
||||
float angular_diameter = light_storage->light_get_param(base, RS::LIGHT_PARAM_SIZE);
|
||||
if (angular_diameter > 0.0) {
|
||||
// I know tan(0) is 0, but let's not risk it with numerical precision.
|
||||
// Technically this will keep expanding until reaching the sun, but all we care about
|
||||
// is expanding until we reach the radius of the near plane. There can't be more occluders than that.
|
||||
angular_diameter = Math::tan(Math::deg_to_rad(angular_diameter));
|
||||
} else {
|
||||
angular_diameter = 0.0;
|
||||
}
|
||||
sky_light_data.size = angular_diameter;
|
||||
sky_light_data.size = Math::deg_to_rad(angular_diameter);
|
||||
sky_scene_state.ubo.directional_light_count++;
|
||||
if (sky_scene_state.ubo.directional_light_count >= sky_scene_state.max_directional_lights) {
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue