Commit Graph

3260 Commits

Author SHA1 Message Date
Rémi Verschelde 82811367cb
Merge pull request #63571 from RandomShaper/conservative_validate_vrs 2022-07-28 15:34:47 +02:00
Pedro J. Estébanez 5f71b55380 Improve handling of the format of the VRS image
- Validate format conservatively. (This is to have VRS images created regardless whether VRS attachments are supported, which avoids errors in places where the code assumes such images were created on low-spec GPUs.)
- Create a non-layered default VRS image, which is what Vulkan (and D3D12, by the way) expect.
2022-07-28 12:24:03 +02:00
Rémi Verschelde 199ea349f5
Merge pull request #57698 from bluenote10/feature/rename_translated_to_translated_local 2022-07-28 10:03:07 +02:00
Bastiaan Olij 1dd671014b Add startup flag to override XR mode settings 2022-07-28 11:50:34 +10:00
Hugo Locurcio aaeb60eafc
Add a Movie Quit On Finish property to AnimationPlayer
This quits the project when an animation is done playing in the
given AnimationPlayer, but only in Movie Maker mode.
When this happens, a message is printed with the absolute path of the
AnimationPlayer node that caused the engine to quit.

This can be used to create videos that stop at a specified time
without having to write any script.

A report is now also printed to the console when the video is done
recording (as long as the engine was exited properly).
This report is unfortunately not always visible in the editor's
Output panel, as it's printed too late.

A method was also added to get the path to the output file from the
scripting API.
2022-07-27 18:50:28 +02:00
Rémi Verschelde bb94e16bd8
Merge pull request #63406 from Zylann/init_viewport_fields 2022-07-27 12:29:05 +02:00
Rémi Verschelde a7335b00e6
Merge pull request #62362 from clayjohn/VULKAN-halo 2022-07-27 11:17:34 +02:00
Rémi Verschelde cade90a807
Merge pull request #58296 from Calinou/decal-distance-fade-tweak-defaults 2022-07-27 09:44:47 +02:00
Rémi Verschelde d5ec1a9650
Merge pull request #63477 from Chaosus/shader_fix_fog 2022-07-27 09:35:30 +02:00
clayjohn 7e7c6995e3 Use full size mipmaps for reflections when in high-quality mode 2022-07-26 23:53:05 -07:00
Yuri Rubinsky 05bc55b2ad
Merge pull request #63522 from Chaosus/shader_fix_projection 2022-07-27 09:38:14 +03:00
Rémi Verschelde e8309d49e0
Merge pull request #63345 from BastiaanOlij/split_geometry_instance
Cleanup RendererSceneRender::GeometryInstance
2022-07-27 08:28:24 +02:00
Yuri Rubinsky 2dc59a3eea Fix incorrect conversion of default value for mat4 uniform in shaders 2022-07-27 09:06:18 +03:00
Yuri Rubinsky bbf76faf86 Fix `FOG` built-in in spatial/fragment shader 2022-07-27 08:31:06 +03:00
Bastiaan Olij 0bd042c601 Change RendererSceneRender::GeometryInstance so more code is shared among renderers 2022-07-27 12:32:07 +10:00
Hugo Locurcio a151a74a98
Tweak Decal distance fade defaults and add property hints
The new default values are more usable in real world scenarios
when smooth fading of distant decals is desired for performance reasons.

The Decal distance fade property hints were adjusted based on the
GeometryInstance3D visibility range fade property hints. `or_greater`
was also added to allow specifying larger values if needed.
2022-07-27 03:15:46 +02:00
Hugo Locurcio d1716c2e7a
Change window title in Movie Maker mode to display useful information
The frame number and movie time is now displayed in the window
title. This way, you can see how quickly the video recording is advancing
in real-time (and perhaps tweak your settings if it's going too slow).
2022-07-26 18:59:33 +02:00
Rémi Verschelde 2d2b85d400
Merge pull request #62972 from Chaosus/shader_groups
Implement shader uniform groups/subgroups
2022-07-26 15:16:33 +02:00
Rémi Verschelde f94b4dbe22
Merge pull request #63236 from halgriffiths/fix-texture-rect-transpose
send FLAGS_TRANSPOSE_RECT to Vulkan
2022-07-26 13:22:32 +02:00
Yuri Rubinsky 886c2d9681 Implement shader uniform groups/subgroups 2022-07-26 11:26:09 +03:00
Bastiaan Olij bad5c659a4 Move Sky(RD) into environment
Move Fog logic from render scene render to fog
2022-07-26 10:19:40 +10:00
Juan Linietsky c7255388e1 Remove ThreadWorkPool, replace by WorkerThreadPool
The former needs to be allocated once per usage. The later is shared for all threads, which is more efficient.
It can also be better debugged.
2022-07-25 15:39:50 +02:00
Rémi Verschelde 49b0aa93e3
Merge pull request #63424 from Chaosus/shader_preprocessor_inc_fix 2022-07-25 14:56:06 +02:00
Yuri Rubinsky be3fb7a216 Fix errors when using built-ins in shaderinc 2022-07-25 12:33:04 +03:00
Rémi Verschelde 90019676b0 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 11:17:40 +02:00
Rémi Verschelde 3084a48ace
Merge pull request #63219 from reduz/implement-vector4-projection 2022-07-25 11:13:27 +02:00
Marc Gilleron 5690f47135 Initialize default values for viewports in rendering server.
Example with TAA: by default it is `false` in project settings and in
the Viewport node. When the scene tree is created, Viewport.set_use_taa()
is called with the value from ProjectSettings. But because the default
values are already the same, RenderingServer isn't called.
The Viewport struct in the RenderingServer does not initialize this field,
so TAA gets randomly enabled when the game starts with default settings.
2022-07-24 21:39:06 +01:00
reduz 455c06ecd4 Implement Vector4, Vector4i, Projection
Implement built-in classes Vector4, Vector4i and Projection.

* Two versions of Vector4 (float and integer).
* A Projection class, which is a 4x4 matrix specialized in projection types.

These types have been requested for a long time, but given they were very corner case they were not added before.
Because in Godot 4, reimplementing parts of the rendering engine is now possible, access to these types (heavily used by the rendering code) becomes a necessity.

**Q**: Why Projection and not Matrix4?
**A**: Godot does not use Matrix2, Matrix3, Matrix4x3, etc. naming convention because, within the engine, these types always have a *purpose*. As such, Godot names them: Transform2D, Transform3D or Basis. In this case, this 4x4 matrix is _always_ used as a _Projection_, hence the naming.
2022-07-23 14:00:01 +02:00
Rémi Verschelde a5bc65bbad
Merge pull request #63265 from reduz/stream-bpm-support
Implement BPM support in AudioStream files.
2022-07-23 11:21:14 +02:00
Yuri Rubinsky 6d992abb54 Fix some errors after shader preprocessor PR 2022-07-23 09:38:59 +03:00
reduz d1ddee2258 Implement BPM support
Based on #62896, only implements the BPM support part.

* Implements BPM support in the AudioStreamOGG/MP3 importers.
* Can select BPM/Bar Size and total beats in a song file, as well as edit looping points.
* Looping is now BPM aware
* Added a special importer UI for configuring this.
* Added a special preview showing the audio waveform as well as the playback position in the resource picker.
* Renamed `AudioStream::instance` to `instantiate` for correctness.
2022-07-23 07:31:17 +02:00
Rémi Verschelde fe929d4787
Merge pull request #62513 from reduz/shader_preprocessor_remake 2022-07-23 00:02:33 +02:00
Rémi Verschelde 4f7bfacfcd
Merge pull request #62478 from BastiaanOlij/split_effects_20220628 2022-07-22 23:44:52 +02:00
reduz f649678402 Clean up Shader Preprocessor
* Moved preprocessor to Shader and ShaderInclude
* Clean up RenderingServer side
* Preprocessor is separate from parser now, but it emits tokens with include location hints.
* Improved ShaderEditor validation code
* Added include file code completion
* Added notification for all files affected by a broken include.
2022-07-22 22:53:03 +02:00
Yuri Roubinsky 7b94603baa Adding shader preprocessor support
Co-authored-by: TheOrangeDay <6472143+TheOrangeDay@users.noreply.github.com>
2022-07-22 22:51:57 +02:00
halgriffiths d37ebc2bdc send FLAGS_TRANSPOSE_RECT to Vulkan 2022-07-22 13:49:04 +01:00
luz paz 38aaaa3cf9 Fix various typos not caught by codespell
Revert upstream `core/input/gamecontrollerdb.txt`. Upstream fix: https://github.com/gabomdq/SDL_GameControllerDB/pull/600
2022-07-21 07:38:23 -04:00
bruvzg 8823eae328
Rename OSX to macOS and iPhoneOS to iOS. 2022-07-21 09:37:52 +03:00
Bastiaan Olij eefcb5ed67 Move screen space effects into a separate class 2022-07-19 13:27:39 +10:00
Rémi Verschelde abe8b88702
Merge pull request #62834 from RandomShaper/fix_vk_sky_error
Bind correct default resource type in GI
2022-07-18 23:39:21 +02:00
Rémi Verschelde d29e17d9d2
Merge pull request #63057 from sakrel/vulkan-fix-2d-shadows 2022-07-18 21:53:12 +02:00
Rémi Verschelde 9276c65522
Merge pull request #62265 from d-robbins/specular_shininess_used 2022-07-18 21:35:46 +02:00
Rémi Verschelde 5bea531228
Merge pull request #62848 from RandomShaper/shader_writability_improvement 2022-07-18 15:11:42 +02:00
Pedro J. Estébanez 4ac2008782 Make SDFGI direct light shader follow the same-writability rule 2022-07-18 14:46:29 +02:00
David R c2b0a873c2 added usage_defines for SPECULAR_SHININESS
added usage defines for opengl3 renderer
2022-07-18 00:45:42 +02:00
Bastiaan Olij d139131aab Adding Variable Rate Shading support to Godot
Improve GI renderer and add VRS support
Implement render device has_feature and move subgroup settings to limit_get
2022-07-17 15:42:24 +10:00
Fabian Keller 2bf9e6090c rename translate(d) to translate(d)_local in Transform 2D/3D 2022-07-16 11:47:54 +02:00
sakrel 16a8967757 Fix DirectionalLight2D and PointLight2D shadows not rendering correctly 2022-07-15 23:55:15 +02:00
bruvzg cbe3a2dcb7
Use BitField hint for the TextServer enums. Add missing parts for BitField support to the GDextension API. 2022-07-15 08:49:50 +03:00
Rémi Verschelde 5fec0d232a
Merge pull request #58763 from Calinou/editor-fix-default-float-step 2022-07-14 00:21:33 +02:00