mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2025-12-31 09:49:06 +03:00
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.
This commit is contained in:
committed by
Aaron Franke
parent
44aefaecb6
commit
cbb5c94c6f
@@ -24,3 +24,8 @@ window/stretch/aspect="expand"
|
||||
[gdnative]
|
||||
|
||||
singletons=[ ]
|
||||
|
||||
[rendering]
|
||||
|
||||
quality/driver/fallback_to_gles2=true
|
||||
vram_compression/import_etc=true
|
||||
|
||||
@@ -22,6 +22,12 @@ func _ready():
|
||||
if node_quad.get_surface_material(0).params_billboard_mode == 0:
|
||||
set_process(false)
|
||||
|
||||
if OS.get_current_video_driver() == OS.VIDEO_DRIVER_GLES2:
|
||||
# Required to prevent the texture from being too dark when using GLES2.
|
||||
# This should be left to `true` in GLES3 to prevent the texture from looking
|
||||
# washed out there.
|
||||
node_quad.get_surface_material(0).flags_albedo_tex_force_srgb = false
|
||||
|
||||
|
||||
func _process(_delta):
|
||||
# NOTE: Remove this function if you don't plan on using billboard settings.
|
||||
|
||||
@@ -26,6 +26,11 @@ singletons=[ ]
|
||||
|
||||
[rendering]
|
||||
|
||||
quality/driver/fallback_to_gles2=true
|
||||
quality/intended_usage/framebuffer_allocation=3
|
||||
vram_compression/import_etc=true
|
||||
quality/shadow_atlas/size=2048
|
||||
quality/shadow_atlas/size.mobile=1024
|
||||
quality/shadows/filter_mode=2
|
||||
quality/filters/msaa=2
|
||||
environment/default_environment="res://default_env.tres"
|
||||
|
||||
Reference in New Issue
Block a user