Add fallbacks and mention non-working features when using Compatibility or the Web platform (#1132)

- Make 3D lights with shadows darker when using Compatibility to better
  match the appearance of Forward+/Mobile, due to the use of sRGB blending
  for those lights.
- Silence some warnings when running projects with the Compatibility
  rendering method, such as the one about 2D MSAA not being supported.
- Rebake lightmaps in Global Illumination to improve quality and reduce
  light leaking with improvements from 4.3.
  - Increase probe density for dynamic objects, and mark the moving box
    as a dynamic object for GI purposes.

This is done to improve the experience with the web-based demos,
which always run with the Compatibility rendering method.
This commit is contained in:
Hugo Locurcio
2025-10-02 19:31:42 +02:00
committed by GitHub
parent a5bce2f144
commit 6424e02ebf
36 changed files with 374 additions and 86 deletions

View File

@@ -2,7 +2,15 @@ extends Control
@onready var variable_font_variation: FontVariation = $"TabContainer/Variable fonts/VariableFontPreview".get_theme_font("font")
func _ready() -> void:
if OS.has_feature("web"):
$"TabContainer/System fonts/LabelVarInfo".text = "Loading system fonts is not supported on the Web platform."
$"TabContainer/System fonts/ValueSetter".visible = false
$"TabContainer/System fonts/Italic".visible = false
$"TabContainer/System fonts/Weight".visible = false
$"TabContainer/System fonts/VBoxContainer".visible = false
var tree: Tree = $"TabContainer/Text direction/Tree"
var root := tree.create_item()
tree.set_hide_root(true)
@@ -15,6 +23,7 @@ func _ready() -> void:
var fourth := tree.create_item(third)
fourth.set_text(0, "fourth")
func _on_Tree_item_selected() -> void:
var tree: Tree = $"TabContainer/Text direction/Tree"
var path := ""
@@ -25,12 +34,15 @@ func _on_Tree_item_selected() -> void:
$"TabContainer/Text direction/LineEditST".text = path
$"TabContainer/Text direction/LineEditNoST".text = path
func _on_LineEditCustomSTDst_text_changed(new_text: String) -> void:
$"TabContainer/Text direction/LineEditCustomSTSource".text = new_text
func _on_LineEditCustomSTSource_text_changed(new_text: String) -> void:
$"TabContainer/Text direction/LineEditCustomSTDst".text = new_text
func _on_LineEditCustomSTDst_tree_entered() -> void:
# Refresh text to apply custom script once it's loaded.
$"TabContainer/Text direction/LineEditCustomSTDst".text = $"TabContainer/Text direction/LineEditCustomSTSource".text
@@ -123,7 +135,3 @@ func _on_system_font_italic_toggled(button_pressed: bool) -> void:
func _on_system_font_name_text_changed(new_text: String) -> void:
var system_font: SystemFont = $"TabContainer/System fonts/VBoxContainer/Custom/FontName".get_theme_font("font")
system_font.font_names[0] = new_text

View File

@@ -84,9 +84,12 @@ anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_font_sizes/font_size = 14
current_tab = 3
[node name="Line breaking and justification" type="Panel" parent="TabContainer"]
visible = false
layout_mode = 2
metadata/_tab_index = 0
[node name="LabelBrkInfo" type="Label" parent="TabContainer/Line breaking and justification"]
layout_mode = 0
@@ -165,6 +168,7 @@ text = "آنچ اندر وهم ناید آن شوم"
[node name="Text direction" type="Panel" parent="TabContainer"]
visible = false
layout_mode = 2
metadata/_tab_index = 1
[node name="LabelDirInfo" type="Label" parent="TabContainer/Text direction"]
layout_mode = 0
@@ -349,6 +353,7 @@ script = ExtResource("3")
[node name="Font features" type="Panel" parent="TabContainer"]
visible = false
layout_mode = 2
metadata/_tab_index = 2
[node name="LabelDisplay1" type="Label" parent="TabContainer/Font features"]
layout_mode = 0
@@ -489,8 +494,8 @@ Que fin 1/3 0
[opentype_features=frac=1,zero]Que fin 1/3 0[/opentype_features] [color=#fffa](frac=1,zero - fractions and slashed zero)[/color][/font_size]"
[node name="Variable fonts" type="Panel" parent="TabContainer"]
visible = false
layout_mode = 2
metadata/_tab_index = 3
[node name="LabelVarInfo" type="Label" parent="TabContainer/Variable fonts"]
layout_mode = 0
@@ -621,6 +626,7 @@ uri = "https://www.recursive.design/"
[node name="System fonts" type="Panel" parent="TabContainer"]
visible = false
layout_mode = 2
metadata/_tab_index = 4
[node name="LabelVarInfo" type="Label" parent="TabContainer/System fonts"]
layout_mode = 0