Skip to content

Commit cbb5c94

Browse files
Calinouaaronfranke
authored andcommitted
Allow 3D demos to fallback to GLES2
A GLES2-specific tweak is now documented for the GUI in 3D demo. This also tweaks shadow quality and performance to find a better balance and result in smoother shadows, including when using GLES2 (thanks to the use of PCF13 shadow filter mode). In demos that allow falling back to GLES2, ETC1 texture import is enabled to allow exporting to Android or HTML5 without having to tweak anything.
1 parent 44aefae commit cbb5c94

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+193
-138
lines changed

3d/ik/addons/sade/editor_gizmo_texture.png.import

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ importer="texture"
44
type="StreamTexture"
55
path.s3tc="res://.import/editor_gizmo_texture.png-be14d96c2d7829c8511766ceb15d5a7f.s3tc.stex"
66
path.etc2="res://.import/editor_gizmo_texture.png-be14d96c2d7829c8511766ceb15d5a7f.etc2.stex"
7+
path.etc="res://.import/editor_gizmo_texture.png-be14d96c2d7829c8511766ceb15d5a7f.etc.stex"
78
metadata={
8-
"imported_formats": [ "s3tc", "etc2" ],
9+
"imported_formats": [ "s3tc", "etc2", "etc" ],
910
"vram_texture": true
1011
}
1112

1213
[deps]
1314

1415
source_file="res://addons/sade/editor_gizmo_texture.png"
15-
dest_files=[ "res://.import/editor_gizmo_texture.png-be14d96c2d7829c8511766ceb15d5a7f.s3tc.stex", "res://.import/editor_gizmo_texture.png-be14d96c2d7829c8511766ceb15d5a7f.etc2.stex" ]
16+
dest_files=[ "res://.import/editor_gizmo_texture.png-be14d96c2d7829c8511766ceb15d5a7f.s3tc.stex", "res://.import/editor_gizmo_texture.png-be14d96c2d7829c8511766ceb15d5a7f.etc2.stex", "res://.import/editor_gizmo_texture.png-be14d96c2d7829c8511766ceb15d5a7f.etc.stex" ]
1617

1718
[params]
1819

3d/ik/fps/fps_example.tscn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ shape = SubResource( 6 )
377377
transform = Transform( 0.388878, -0.754027, 0.529355, 0, 0.574581, 0.818448, -0.921289, -0.318277, 0.223442, -9.77531, 11.5204, 11.766 )
378378
light_color = Color( 1, 0.925598, 0.820313, 1 )
379379
shadow_enabled = true
380+
directional_shadow_mode = 0
380381

381382
[node name="Control" type="Control" parent="."]
382383
anchor_right = 1.0

3d/ik/fps/gun_textures.png.import

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ importer="texture"
44
type="StreamTexture"
55
path.s3tc="res://.import/gun_textures.png-ff36b37294b2a7b89d70248caaea5848.s3tc.stex"
66
path.etc2="res://.import/gun_textures.png-ff36b37294b2a7b89d70248caaea5848.etc2.stex"
7+
path.etc="res://.import/gun_textures.png-ff36b37294b2a7b89d70248caaea5848.etc.stex"
78
metadata={
8-
"imported_formats": [ "s3tc", "etc2" ],
9+
"imported_formats": [ "s3tc", "etc2", "etc" ],
910
"vram_texture": true
1011
}
1112

1213
[deps]
1314

1415
source_file="res://fps/gun_textures.png"
15-
dest_files=[ "res://.import/gun_textures.png-ff36b37294b2a7b89d70248caaea5848.s3tc.stex", "res://.import/gun_textures.png-ff36b37294b2a7b89d70248caaea5848.etc2.stex" ]
16+
dest_files=[ "res://.import/gun_textures.png-ff36b37294b2a7b89d70248caaea5848.s3tc.stex", "res://.import/gun_textures.png-ff36b37294b2a7b89d70248caaea5848.etc2.stex", "res://.import/gun_textures.png-ff36b37294b2a7b89d70248caaea5848.etc.stex" ]
1617

1718
[params]
1819

3d/ik/model/godot_battle_bot_colors.png.import

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ importer="texture"
44
type="StreamTexture"
55
path.s3tc="res://.import/godot_battle_bot_colors.png-db0edfc662d0fffff287aad7600ab21a.s3tc.stex"
66
path.etc2="res://.import/godot_battle_bot_colors.png-db0edfc662d0fffff287aad7600ab21a.etc2.stex"
7+
path.etc="res://.import/godot_battle_bot_colors.png-db0edfc662d0fffff287aad7600ab21a.etc.stex"
78
metadata={
8-
"imported_formats": [ "s3tc", "etc2" ],
9+
"imported_formats": [ "s3tc", "etc2", "etc" ],
910
"vram_texture": true
1011
}
1112

1213
[deps]
1314

1415
source_file="res://model/godot_battle_bot_colors.png"
15-
dest_files=[ "res://.import/godot_battle_bot_colors.png-db0edfc662d0fffff287aad7600ab21a.s3tc.stex", "res://.import/godot_battle_bot_colors.png-db0edfc662d0fffff287aad7600ab21a.etc2.stex" ]
16+
dest_files=[ "res://.import/godot_battle_bot_colors.png-db0edfc662d0fffff287aad7600ab21a.s3tc.stex", "res://.import/godot_battle_bot_colors.png-db0edfc662d0fffff287aad7600ab21a.etc2.stex", "res://.import/godot_battle_bot_colors.png-db0edfc662d0fffff287aad7600ab21a.etc.stex" ]
1617

1718
[params]
1819

3d/ik/model/godot_battle_bot_emission.png.import

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ importer="texture"
44
type="StreamTexture"
55
path.s3tc="res://.import/godot_battle_bot_emission.png-59fd27c1839e5b7c5584f3c2131bce33.s3tc.stex"
66
path.etc2="res://.import/godot_battle_bot_emission.png-59fd27c1839e5b7c5584f3c2131bce33.etc2.stex"
7+
path.etc="res://.import/godot_battle_bot_emission.png-59fd27c1839e5b7c5584f3c2131bce33.etc.stex"
78
metadata={
8-
"imported_formats": [ "s3tc", "etc2" ],
9+
"imported_formats": [ "s3tc", "etc2", "etc" ],
910
"vram_texture": true
1011
}
1112

1213
[deps]
1314

1415
source_file="res://model/godot_battle_bot_emission.png"
15-
dest_files=[ "res://.import/godot_battle_bot_emission.png-59fd27c1839e5b7c5584f3c2131bce33.s3tc.stex", "res://.import/godot_battle_bot_emission.png-59fd27c1839e5b7c5584f3c2131bce33.etc2.stex" ]
16+
dest_files=[ "res://.import/godot_battle_bot_emission.png-59fd27c1839e5b7c5584f3c2131bce33.s3tc.stex", "res://.import/godot_battle_bot_emission.png-59fd27c1839e5b7c5584f3c2131bce33.etc2.stex", "res://.import/godot_battle_bot_emission.png-59fd27c1839e5b7c5584f3c2131bce33.etc.stex" ]
1617

1718
[params]
1819

3d/ik/project.godot

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,8 @@ enabled=PoolStringArray( "sade" )
2929

3030
[rendering]
3131

32+
quality/driver/fallback_to_gles2=true
33+
vram_compression/import_etc=true
34+
quality/shadows/filter_mode=2
3235
quality/filters/msaa=2
3336
environment/default_environment="res://default_env.tres"

3d/kinematic_character/level.tscn

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ __meta__ = {
5353
mesh_library = ExtResource( 1 )
5454
cell_size = Vector3( 1, 1, 1 )
5555
data = {
56-
"cells": PoolIntArray( 0, 0, 0, 1, 0, 0, 2, 0, 0, 3, 0, 0, 4, 0, 0, 65530, 0, 0, 65531, 0, 0, 65532, 0, 0, 65533, 0, 0, 65534, 0, 0, 65535, 0, 0, 196603, 0, 0, 196604, 0, 0, 524292, 0, 0, 589820, 0, 0, 786432, 0, 0, 851967, 0, 0, 0, 1, 0, 1, 1, 0, 2, 1, 0, 3, 1, 0, 4, 1, 0, 65530, 1, 0, 65531, 1, 0, 65532, 1, 0, 65533, 1, 0, 65534, 1, 0, 65535, 1, 0, 131075, 1, 0, 196603, 1, 0, 196604, 1, 0, 524292, 1, 0, 589820, 1, 0, 786432, 1, 0, 851967, 1, 0, 0, 2, 0, 1, 2, 0, 2, 2, 0, 3, 2, 0, 4, 2, 0, 65530, 2, 0, 65531, 2, 0, 65532, 2, 0, 65533, 2, 0, 65534, 2, 0, 65535, 2, 0, 131075, 2, 0, 196603, 2, 0, 196604, 2, 0, 524292, 2, 0, 589820, 2, 0, 786432, 2, 0, 786433, 2, 0, 851966, 2, 0, 851967, 2, 0, 0, 3, 0, 1, 3, 0, 2, 3, 0, 3, 3, 0, 4, 3, 0, 65530, 3, 0, 65531, 3, 0, 65532, 3, 0, 65533, 3, 0, 65534, 3, 0, 65535, 3, 0, 196603, 3, 0, 524291, 3, 0, 524292, 3, 0, 589820, 3, 0, 786432, 3, 0, 786433, 3, 0, 851966, 3, 0, 851967, 3, 0, 0, 4, 0, 1, 4, 0, 2, 4, 0, 3, 4, 0, 4, 4, 0, 65530, 4, 0, 65531, 4, 0, 65532, 4, 0, 65533, 4, 0, 65534, 4, 0, 65535, 4, 0, 196603, 4, 0, 786432, 4, 0, 851967, 4, 0, 0, 5, 0, 1, 5, 0, 2, 5, 0, 3, 5, 0, 4, 5, 0, 65530, 5, 0, 65531, 5, 0, 65532, 5, 0, 65533, 5, 0, 65534, 5, 0, 65535, 5, 0, 131075, 5, 0, 0, 6, 0, 1, 6, 0, 2, 6, 0, 3, 6, 0, 4, 6, 0, 65530, 6, 0, 65531, 6, 0, 65532, 6, 0, 65533, 6, 0, 65534, 6, 0, 65535, 6, 0, 131075, 6, 0, 196603, 6, 0, 0, 7, 0, 1, 7, 0, 2, 7, 0, 3, 7, 0, 4, 7, 0, 65530, 7, 0, 65531, 7, 0, 65532, 7, 0, 65533, 7, 0, 65534, 7, 0, 65535, 7, 0, 131075, 7, 0, 196603, 7, 0, 0, 8, 0, 1, 8, 0, 2, 8, 0, 3, 8, 0, 4, 8, 0, 65530, 8, 0, 65531, 8, 0, 65532, 8, 0, 65533, 8, 0, 65534, 8, 0, 65535, 8, 0, 131075, 8, 0, 196603, 8, 0, 196604, 8, 0, 0, 9, 0, 1, 9, 0, 2, 9, 0, 3, 9, 0, 4, 9, 0, 65530, 9, 0, 65531, 9, 0, 65532, 9, 0, 65533, 9, 0, 65534, 9, 0, 65535, 9, 0, 131073, 9, 0, 131074, 9, 0, 131075, 9, 0, 196603, 9, 0, 196604, 9, 0, 196605, 9, 0, 196608, 9, 0, 262142, 9, 0, 0, 10, 0, 1, 10, 0, 2, 10, 0, 3, 10, 0, 4, 10, 0, 65530, 10, 0, 65531, 10, 0, 65532, 10, 0, 65533, 10, 0, 65534, 10, 0, 65535, 10, 0, 0, 11, 0, 1, 11, 0, 2, 11, 0, 3, 11, 0, 4, 11, 0, 65530, 11, 0, 65531, 11, 0, 65532, 11, 0, 65533, 11, 0, 65534, 11, 0, 65535, 11, 0, 0, 65532, 0, 1, 65532, 0, 2, 65532, 0, 3, 65532, 0, 4, 65532, 0, 65530, 65532, 0, 65531, 65532, 0, 65532, 65532, 0, 65533, 65532, 0, 65534, 65532, 0, 65535, 65532, 0, 0, 65533, 0, 1, 65533, 0, 2, 65533, 0, 3, 65533, 0, 4, 65533, 0, 65530, 65533, 0, 65531, 65533, 0, 65532, 65533, 0, 65533, 65533, 0, 65534, 65533, 0, 65535, 65533, 0, 262145, 65533, 0, 262146, 65533, 0, 262147, 65533, 0, 589822, 65533, 0, 589823, 65533, 0, 655363, 65533, 0, 655364, 65533, 0, 720897, 65533, 0, 720898, 65533, 0, 786432, 65533, 0, 851967, 65533, 0, 0, 65534, 0, 1, 65534, 0, 2, 65534, 0, 3, 65534, 0, 4, 65534, 0, 65530, 65534, 0, 65531, 65534, 0, 65532, 65534, 0, 65533, 65534, 0, 65534, 65534, 0, 65535, 65534, 0, 65536, 65534, 0, 131071, 65534, 0, 196603, 65534, 0, 196604, 65534, 0, 196605, 65534, 0, 196606, 65534, 0, 196607, 65534, 0, 589822, 65534, 0, 589828, 65534, 0, 786432, 65534, 0, 851967, 65534, 0, 0, 65535, 0, 1, 65535, 0, 2, 65535, 0, 3, 65535, 0, 4, 65535, 0, 65530, 65535, 0, 65531, 65535, 0, 65532, 65535, 0, 65533, 65535, 0, 65534, 65535, 0, 65535, 65535, 0, 196603, 65535, 0, 196604, 65535, 0, 196611, 65535, 0, 589820, 65535, 0, 589821, 65535, 0, 589822, 65535, 0, 589828, 65535, 0, 786432, 65535, 0, 851967, 65535, 0 )
56+
"cells": PoolIntArray( 0, 0, 0, 1, 0, 0, 2, 0, 0, 3, 0, 0, 4, 0, 0, 65530, 0, 0, 65531, 0, 0, 65532, 0, 0, 65533, 0, 0, 65534, 0, 0, 65535, 0, 0, 196603, 0, 0, 196604, 0, 0, 524292, 0, 0, 589820, 0, 0, 786432, 0, 0, 851967, 0, 0, 0, 1, 0, 1, 1, 0, 2, 1, 0, 3, 1, 0, 4, 1, 0, 65530, 1, 0, 65531, 1, 0, 65532, 1, 0, 65533, 1, 0, 65534, 1, 0, 65535, 1, 0, 131075, 1, 0, 196603, 1, 0, 196604, 1, 0, 524292, 1, 0, 589820, 1, 0, 786432, 1, 0, 851967, 1, 0, 0, 2, 0, 1, 2, 0, 2, 2, 0, 3, 2, 0, 4, 2, 0, 65530, 2, 0, 65531, 2, 0, 65532, 2, 0, 65533, 2, 0, 65534, 2, 0, 65535, 2, 0, 131075, 2, 0, 196603, 2, 0, 196604, 2, 0, 524292, 2, 0, 589820, 2, 0, 786432, 2, 0, 786433, 2, 0, 851966, 2, 0, 851967, 2, 0, 0, 3, 0, 1, 3, 0, 2, 3, 0, 3, 3, 0, 4, 3, 0, 65530, 3, 0, 65531, 3, 0, 65532, 3, 0, 65533, 3, 0, 65534, 3, 0, 65535, 3, 0, 196603, 3, 0, 524291, 3, 0, 524292, 3, 0, 589820, 3, 0, 786432, 3, 0, 786433, 3, 0, 851966, 3, 0, 851967, 3, 0, 0, 4, 0, 1, 4, 0, 2, 4, 0, 3, 4, 0, 4, 4, 0, 65530, 4, 0, 65531, 4, 0, 65532, 4, 0, 65533, 4, 0, 65534, 4, 0, 65535, 4, 0, 196603, 4, 0, 786432, 4, 0, 851967, 4, 0, 0, 5, 0, 1, 5, 0, 2, 5, 0, 3, 5, 0, 4, 5, 0, 65530, 5, 0, 65531, 5, 0, 65532, 5, 0, 65533, 5, 0, 65534, 5, 0, 65535, 5, 0, 131075, 5, 0, 0, 6, 0, 1, 6, 0, 2, 6, 0, 3, 6, 0, 4, 6, 0, 65530, 6, 0, 65531, 6, 0, 65532, 6, 0, 65533, 6, 0, 65534, 6, 0, 65535, 6, 0, 131075, 6, 0, 196603, 6, 0, 0, 7, 0, 1, 7, 0, 2, 7, 0, 3, 7, 0, 4, 7, 0, 65530, 7, 0, 65531, 7, 0, 65532, 7, 0, 65533, 7, 0, 65534, 7, 0, 65535, 7, 0, 131075, 7, 0, 196603, 7, 0, 0, 8, 0, 1, 8, 0, 2, 8, 0, 3, 8, 0, 4, 8, 0, 65530, 8, 0, 65531, 8, 0, 65532, 8, 0, 65533, 8, 0, 65534, 8, 0, 65535, 8, 0, 131075, 8, 0, 196603, 8, 0, 196604, 8, 0, 0, 9, 0, 1, 9, 0, 2, 9, 0, 3, 9, 0, 4, 9, 0, 65530, 9, 0, 65531, 9, 0, 65532, 9, 0, 65533, 9, 0, 65534, 9, 0, 65535, 9, 0, 131073, 9, 0, 131074, 9, 0, 131075, 9, 0, 196603, 9, 0, 196604, 9, 0, 196605, 9, 0, 196608, 9, 0, 262142, 9, 0, 0, 10, 0, 1, 10, 0, 2, 10, 0, 3, 10, 0, 4, 10, 0, 65530, 10, 0, 65531, 10, 0, 65532, 10, 0, 65533, 10, 0, 65534, 10, 0, 65535, 10, 0, 0, 11, 0, 1, 11, 0, 2, 11, 0, 3, 11, 0, 4, 11, 0, 65530, 11, 0, 65531, 11, 0, 65532, 11, 0, 65533, 11, 0, 65534, 11, 0, 65535, 11, 0, 0, 65532, 0, 1, 65532, 0, 2, 65532, 0, 3, 65532, 0, 4, 65532, 0, 65530, 65532, 0, 65531, 65532, 0, 65532, 65532, 0, 65533, 65532, 0, 65534, 65532, 0, 65535, 65532, 0, 0, 65533, 0, 1, 65533, 0, 2, 65533, 0, 3, 65533, 0, 4, 65533, 0, 65530, 65533, 0, 65531, 65533, 0, 65532, 65533, 0, 65533, 65533, 0, 65534, 65533, 0, 65535, 65533, 0, 262145, 65533, 0, 262146, 65533, 0, 262147, 65533, 0, 589822, 65533, 0, 589823, 65533, 0, 655363, 65533, 0, 655364, 65533, 0, 720897, 65533, 0, 720898, 65533, 0, 786432, 65533, 0, 851967, 65533, 0, 0, 65534, 0, 1, 65534, 0, 2, 65534, 0, 3, 65534, 0, 4, 65534, 0, 65530, 65534, 0, 65531, 65534, 0, 65532, 65534, 0, 65533, 65534, 0, 65534, 65534, 0, 65535, 65534, 0, 65536, 65534, 0, 131071, 65534, 0, 196603, 65534, 0, 196604, 65534, 0, 196605, 65534, 0, 196606, 65534, 0, 196607, 65534, 0, 589822, 65534, 0, 589828, 65534, 0, 786432, 65534, 0, 851967, 65534, 0, 0, 65535, 0, 1, 65535, 0, 2, 65535, 0, 3, 65535, 0, 4, 65535, 0, 65530, 65535, 0, 65531, 65535, 0, 65532, 65535, 0, 65533, 65535, 0, 65534, 65535, 0, 65535, 65535, 0, 196603, 65535, 0, 196604, 65535, -1073741824, 196611, 65535, -2147483648, 589820, 65535, -1073741824, 589821, 65535, -1073741824, 589822, 65535, -1610612736, 589828, 65535, -1610612736, 786432, 65535, -1610612736, 851967, 65535, -1610612736 )
5757
}
5858
__meta__ = {
5959
"_editor_clip_": 0,
@@ -70,8 +70,12 @@ data = ExtResource( 4 )
7070
transform = Transform( -0.173649, 0.806707, -0.564863, 0, 0.573576, 0.819152, 0.984808, 0.142244, -0.0996007, 0, 0, 0 )
7171
light_energy = 1.3
7272
shadow_enabled = true
73-
shadow_bias = 1.0
74-
directional_shadow_normal_bias = 0.2
73+
shadow_bias = -0.02
74+
shadow_reverse_cull_face = true
75+
directional_shadow_mode = 0
76+
directional_shadow_normal_bias = 0.0
77+
directional_shadow_bias_split_scale = 0.0
78+
directional_shadow_max_distance = 20.0
7579

7680
[node name="Cubio" parent="." instance=ExtResource( 2 )]
7781
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1.5, 2, 4 )

3d/kinematic_character/models/white_wood.png.import

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ importer="texture"
44
type="StreamTexture"
55
path.s3tc="res://.import/white_wood.png-821b7bf9b3881778c9bff1c965d8a87c.s3tc.stex"
66
path.etc2="res://.import/white_wood.png-821b7bf9b3881778c9bff1c965d8a87c.etc2.stex"
7+
path.etc="res://.import/white_wood.png-821b7bf9b3881778c9bff1c965d8a87c.etc.stex"
78
metadata={
8-
"imported_formats": [ "s3tc", "etc2" ],
9+
"imported_formats": [ "s3tc", "etc2", "etc" ],
910
"vram_texture": true
1011
}
1112

1213
[deps]
1314

1415
source_file="res://models/white_wood.png"
15-
dest_files=[ "res://.import/white_wood.png-821b7bf9b3881778c9bff1c965d8a87c.s3tc.stex", "res://.import/white_wood.png-821b7bf9b3881778c9bff1c965d8a87c.etc2.stex" ]
16+
dest_files=[ "res://.import/white_wood.png-821b7bf9b3881778c9bff1c965d8a87c.s3tc.stex", "res://.import/white_wood.png-821b7bf9b3881778c9bff1c965d8a87c.etc2.stex", "res://.import/white_wood.png-821b7bf9b3881778c9bff1c965d8a87c.etc.stex" ]
1617

1718
[params]
1819

3d/kinematic_character/project.godot

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ shadow_filter=3
8383

8484
[rendering]
8585

86+
quality/driver/fallback_to_gles2=true
87+
vram_compression/import_etc=true
88+
quality/shadows/filter_mode=2
8689
quality/filters/anisotropic_filter_level=16
8790
quality/filters/msaa=2
8891
environment/default_environment="res://default_env.tres"

3d/material_testers/project.godot

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,14 @@ multithread/thread_rid_pool_prealloc=60
3434

3535
[rendering]
3636

37+
quality/driver/fallback_to_gles2=true
3738
quality/intended_usage/framebuffer_allocation=3
38-
quality/filters/anisotropic_filter_level=16
39+
vram_compression/import_etc=true
3940
vram_compression/import_etc2=false
41+
quality/shadow_atlas/size=1024
42+
quality/shadow_atlas/size.mobile=512
43+
quality/shadows/filter_mode=2
44+
quality/filters/anisotropic_filter_level=16
4045
quality/filters/msaa=2
4146
quality/filters/msaa.mobile=0
4247
quality/filters/anisotropic_filter_level.mobile=4

0 commit comments

Comments
 (0)