diff --git a/CHANGELOG.md b/CHANGELOG.md index 71a9c0b..6573183 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.2.0] - 2023-12-15 + +### Added + +- Support for indicating the use of FSR2 upscaling and antialiasing. +- Support for indicating Direct3D 12, Metal and custom rendering drivers (will be displayed as-is). +- Support for indicating ANGLE as rendering driver on Windows/macOS and OpenGL ES on Linux. + +### Changed + +- Vulkan on macOS and iOS is now displayed as "Vulkan via MoltenVK", since these platforms don't natively support Vulkan. + +### Fixed + +- TAA is no longer marked as enabled if FSR2 scaling mode is used, as FSR2 includes its own temporal antialiasing implementation. +- [Fixed not being able to set `DebugMenu.style`.](https://github.com/godot-extended-libraries/godot-debug-menu/pull/16) + ## [1.1.2] - 2023-08-23 ### Fixed @@ -47,7 +64,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Initial versioned release. -[Unreleased]: https://github.com/godot-extended-libraries/godot-debug-menu/compare/v1.1.2...HEAD +[Unreleased]: https://github.com/godot-extended-libraries/godot-debug-menu/compare/v1.2.0...HEAD +[1.2.0]: https://github.com/godot-extended-libraries/godot-debug-menu/compare/v1.1.2...v1.2.0 [1.1.2]: https://github.com/godot-extended-libraries/godot-debug-menu/compare/v1.1.1...v1.1.2 [1.1.1]: https://github.com/godot-extended-libraries/godot-debug-menu/compare/v1.1.0...v1.1.1 [1.1.0]: https://github.com/godot-extended-libraries/godot-debug-menu/compare/v1.0.1...v1.1.0 diff --git a/addons/debug_menu/debug_menu.gd b/addons/debug_menu/debug_menu.gd index 701ed14..a1ab064 100644 --- a/addons/debug_menu/debug_menu.gd +++ b/addons/debug_menu/debug_menu.gd @@ -153,8 +153,9 @@ func update_settings_label() -> void: if ProjectSettings.has_setting("application/config/version"): settings.text += "Project Version: %s\n" % ProjectSettings.get_setting("application/config/version") - var rendering_method_string := "" - match str(ProjectSettings.get_setting("rendering/renderer/rendering_method")): + var rendering_method := str(ProjectSettings.get_setting_with_override("rendering/renderer/rendering_method")) + var rendering_method_string := rendering_method + match rendering_method: "forward_plus": rendering_method_string = "Forward+" "mobile": @@ -178,8 +179,21 @@ func update_settings_label() -> void: # Display 3D settings only if relevant. if viewport.get_camera_3d(): + var scaling_3d_mode_string := "(unknown)" + match viewport.scaling_3d_mode: + Viewport.SCALING_3D_MODE_BILINEAR: + scaling_3d_mode_string = "Bilinear" + Viewport.SCALING_3D_MODE_FSR: + scaling_3d_mode_string = "FSR 1.0" + Viewport.SCALING_3D_MODE_FSR2: + scaling_3d_mode_string = "FSR 2.2" + var antialiasing_3d_string := "" - if viewport.use_taa: + if viewport.scaling_3d_mode == Viewport.SCALING_3D_MODE_FSR2: + # The FSR2 scaling mode includes its own temporal antialiasing implementation. + antialiasing_3d_string += (" + " if not antialiasing_3d_string.is_empty() else "") + "FSR 2.2" + if viewport.scaling_3d_mode != Viewport.SCALING_3D_MODE_FSR2 and viewport.use_taa: + # Godot's own TAA is ignored when using FSR2 scaling mode, as FSR2 provides its own TAA implementation. antialiasing_3d_string += (" + " if not antialiasing_3d_string.is_empty() else "") + "TAA" if viewport.msaa_3d >= Viewport.MSAA_2X: antialiasing_3d_string += (" + " if not antialiasing_3d_string.is_empty() else "") + "%d× MSAA" % pow(2, viewport.msaa_3d) @@ -187,7 +201,7 @@ func update_settings_label() -> void: antialiasing_3d_string += (" + " if not antialiasing_3d_string.is_empty() else "") + "FXAA" settings.text += "3D scale (%s): %d%% = %d×%d" % [ - "Bilinear" if viewport.scaling_3d_mode == Viewport.SCALING_3D_MODE_BILINEAR else "FSR 1.0", + scaling_3d_mode_string, viewport.scaling_3d_scale * 100, viewport_render_size.x * viewport.scaling_3d_scale, viewport_render_size.y * viewport.scaling_3d_scale, @@ -195,7 +209,7 @@ func update_settings_label() -> void: if not antialiasing_3d_string.is_empty(): settings.text += "\n3D Antialiasing: %s" % antialiasing_3d_string - + var environment := viewport.get_camera_3d().get_world_3d().environment if environment: if environment.ssr_enabled: @@ -252,15 +266,27 @@ func update_information_label() -> void: # Release export template build. release_string = "release" - var graphics_api_string := "" - if str(ProjectSettings.get_setting("rendering/renderer/rendering_method")) != "gl_compatibility": - graphics_api_string = "Vulkan" + var rendering_method := str(ProjectSettings.get_setting_with_override("rendering/renderer/rendering_method")) + var rendering_driver := str(ProjectSettings.get_setting_with_override("rendering/rendering_device/driver")) + var graphics_api_string := rendering_driver + if rendering_method != "gl_compatibility": + if rendering_driver == "d3d12": + graphics_api_string = "Direct3D 12" + elif rendering_driver == "metal": + graphics_api_string = "Metal" + elif rendering_driver == "vulkan": + if OS.has_feature("macos") or OS.has_feature("ios"): + graphics_api_string = "Vulkan via MoltenVK" + else: + graphics_api_string = "Vulkan" else: - if OS.has_feature("web"): - graphics_api_string = "WebGL" - elif OS.has_feature("mobile"): + if rendering_driver == "opengl3_angle": + graphics_api_string = "OpenGL via ANGLE" + elif OS.has_feature("mobile") or rendering_driver == "opengl3_es": graphics_api_string = "OpenGL ES" - else: + elif OS.has_feature("web"): + graphics_api_string = "WebGL" + elif rendering_driver == "opengl3": graphics_api_string = "OpenGL" information.text = ( diff --git a/addons/debug_menu/plugin.cfg b/addons/debug_menu/plugin.cfg index 851c3da..54100f7 100644 --- a/addons/debug_menu/plugin.cfg +++ b/addons/debug_menu/plugin.cfg @@ -3,5 +3,5 @@ name="Debug Menu" description="In-game debug menu displaying performance metrics and hardware information" author="Calinou" -version="1.1.2" +version="1.2.0" script="plugin.gd"