Commit Graph

3388 Commits

Author SHA1 Message Date
Rémi Verschelde 121d6fdace
Merge pull request #63754 from BastiaanOlij/storage_struct_private
Changed storage structs to private
2022-08-01 09:37:36 +02:00
Rémi Verschelde de53e91b85
Merge pull request #55276 from Calinou/volumetric-fog-tweak-default-gi-inject
Tweak default fog settings for better appearance
2022-08-01 07:55:53 +02:00
Rémi Verschelde 677f565ce8
Merge pull request #63587 from clayjohn/specular-occlusion
Treat specular less than 0.02 as occlusion
2022-08-01 07:54:57 +02:00
Bastiaan Olij 81c6f73109 Changed storage structs to private 2022-08-01 11:59:14 +10:00
Hugo Locurcio e35e79b802
Tweak default fog settings for better appearance
- Increase the default non-volumetric fog density to 0.01 to make
  adjustments more visible.
- Use a less saturated non-volumetric fog color by default
  (a mix of the sky and horizon colors of the new default
  ProceduralSkyMaterial).
- Set Volumetric Fog Gi Inject to 1.0 by default. Injecting GI results
  in more realistic appearance of volumetric fog, at a very low
  performance cost.
2022-08-01 02:04:20 +02:00
clayjohn 0c65ed38a6 Treat specular less than 0.02 as occlusion
This is a very common hack used in almost all PBR renderers to allow removing specular contribution in dielectric materials
2022-07-31 15:45:21 -07:00
Hugo Locurcio a0795b4347
Tweak VoxelGI defaults for better quality
Overall brightness is similar to the previous settings, but lighting
now fades off more naturally and reflections feature indirect lighting.
Performance is identical.

- Enable Use Two Bounces by default.
- Decrease Propagation to 0.5 to compensate for the second bounce.
2022-07-31 18:05:24 +02:00
smix8 30c6fff214 Fix Navigation Debug always enabled
Fixes that Navigation Debug is always enabled in debug builds even while "Visible Navigation" is turned off.
2022-07-31 05:44:39 +02:00
Hugo Locurcio 0e26fee3b7
Make Decal's `modulate` property affect emission color as well
This can be used to recolor special effects such as fake area fog
without having to create separate textures for each color.

- Improve the Decal class documentation.
2022-07-30 21:41:48 +02:00
LinuxUserGD 6e6569aa78 fix 'Comparison result is always the same' warnings 2022-07-29 19:45:22 +02:00
Rémi Verschelde 7199314eb3
Merge pull request #63595 from reduz/remove-signal-connect-binds
Remove Signal connect binds
2022-07-29 18:10:39 +02:00
Rémi Verschelde 5352cf8e2f
Merge pull request #46557 from asmaloney/remove-impossible-condition
Remove impossible condition in RenderingServer::mesh_surface_make_offsets_from_format
2022-07-29 16:56:48 +02:00
Andreas Raddau dfc6035ce1 Fix vector field particle attractor texture sampling 2022-07-29 16:52:54 +02:00
Juan Linietsky d4433ae6d3 Remove Signal connect binds
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind().
Changed all uses of it to Callable.bind()
2022-07-29 16:26:13 +02:00
Pedro J. Estébanez 278950f731 Keep SdfgiDebug shader's push constant size <= 128 2022-07-29 13:25:11 +02:00
Rémi Verschelde 8b454f8b41
Merge pull request #62601 from smix8/navigation_3d_debug_4.x 2022-07-29 12:29:32 +02:00
smix8 c394ea518e Add more detailed Navigation Debug Visualization
- Adds more customization options to ProjectSettings.
- Displays navregion edge connections and navigation polygon edges in editor and at runtime.
- Majority of debug code moved from SceneTree to NavigationServer.
- Removes the irritating debug MeshInstance child node from NavigationRegion3D and replaces it with direct RenderingServer API.
2022-07-29 09:58:41 +02:00
Rémi Verschelde 2bf8c4a6d0
Merge pull request #63527 from BastiaanOlij/rework_environment
Restructure environment in render implementation
2022-07-29 08:05:40 +02:00
Bastiaan Olij f579125eeb Restructure environment in render implementation 2022-07-29 12:24:32 +10:00
Rémi Verschelde 8e0f328a80
Merge pull request #59840 from Calinou/renderingserver-global-uniform-rename 2022-07-28 20:34:17 +02:00
Rémi Verschelde 1c820f19b1
Merge pull request #60957 from DeeJayLSP/sample_pcm 2022-07-28 19:51:08 +02:00
DeeJayLSP 4889659227 Rename AudioStreamSample to a more discoverable name 2022-07-28 13:53:36 -03:00
Hugo Locurcio 4b42379c8f
Rename RenderingServer global shader uniform methods to be more explicit
The `global_shader_uniform` name is longer, but it makes it much
easier to find the methods when searching in the class reference.
2022-07-28 18:46:59 +02:00
Hugo Locurcio e24029edc3
Allow changing mipmap LOD bias when FSR 1.0 scaling is not used
Mipmap LOD bias can be useful to improve the appearance of distant
textures without increasing anisotropic filtering (or in situations
where anisotropic filtering is not effective).

`fsr_mipmap_bias` was renamed to `texture_mipmap_bias` accordingly.
The property hint now allows for greater precision as well.
2022-07-28 17:51:13 +02:00
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
Rémi Verschelde 7e49c8c30e
Merge pull request #62947 from BastiaanOlij/fix_mesh_instance_free 2022-07-14 00:05:25 +02:00
Hugo Locurcio 21ea1c3835
Rename soft shadow quality project settings for easier searching
`rendering/quality/shadows` is now `rendering/quality/positional_shadow`
to explicitly denote that the settings only affect positional light shadows,
not directional light shadows.

Shadow atlas settings now contain the word "atlas" for easier searching.

Soft shadow quality settings were renamed to contain the word "filter".
This makes the settings appear when searching for "filter" in the
project settings dialog, like in Godot 3.x.
2022-07-13 19:56:02 +02:00
Bastiaan Olij 6930ad2777 Fix typo, call mesh_instance_free not mesh_free 2022-07-12 22:30:08 +10:00
Hugo Locurcio 75f7e1fbf8
Fix some properties having an invalid float step of `0`
This also clamps the float step in the editor to the lowest value
that is guaranteed to work in all situations (including for 32-bit
floats).
2022-07-10 22:56:59 +02:00
Hugo Locurcio 0f18bd244e
Fix dead link in TAA resolve shader comment
Spartan Engine has recently removed its own internal TAA in favor
of FSR 2.0. The link has been changed to point to a fixed commit,
so the link will keep working as long as the repository exists.
2022-07-09 22:51:54 +02:00
Pedro J. Estébanez ba39230ef3 Bind correct default resource type in GI 2022-07-08 19:07:28 +02:00
Xentripetal f514b82fd3 Account for relative z-indexes when y-sorting 2022-07-08 09:18:00 -05:00
Rémi Verschelde 99df193bea
Merge pull request #62277 from RandomShaper/depth_buffer_no_sampling
Rationalize certain cases of texture usage flags
2022-07-08 11:34:09 +02:00
Rémi Verschelde 1e553e34fb
Merge pull request #62108 from bruvzg/font_config_v3 2022-07-07 12:22:49 +02:00
Yuri Rubinsky 3dc1a1dbfb Prevent possible crash when mesh is freed 2022-07-06 19:52:54 +03:00
lawnjelly 1f69666209 Remove Octree
Octree is no longer used in 4.x.
2022-07-06 14:10:05 +01:00
Rémi Verschelde 55fca1cb94
Merge pull request #62344 from BastiaanOlij/extract_dependencies 2022-07-06 13:24:46 +02:00
bruvzg 344ba0ffaf
Refactor Font configuration and import UI, and Font resources. 2022-07-06 14:12:36 +03:00
Hugo Locurcio c9037a8d2c
Remove unused anisotropy setter/getter methods in VoxelGI
These methods weren't exposed to the scripting API.

Anisotropy was used in earlier iterations of VoxelGI, but it was
removed as it was too expensive.
2022-07-06 02:40:49 +02:00
Hugo Locurcio cf1ce8494d
Improve antialiased line drawing sharpness and respect of original width
Antialiased lines with a width of 2 pixels or more now use a smaller
feather width of 1.25 instead of 2.0. This makes them look sharper
and better preserves their original shape while still having good
antialiasing quality.

This also improves the appearance of thin antialiased lines by
slightly increasing their feather size (from 1.0 to 1.25). It
makes them appear a tad thicker, but the antialiasing quality is
much improved by doing this.
2022-07-02 18:45:42 +02:00
Rémi Verschelde 6bbfd160b0 SCons: Properly track codegen script dependency for generated GLSL headers 2022-07-02 16:01:48 +02:00
Hugo Locurcio f9e6b292e2
Remove debugging print following GI reorganization 2022-07-01 20:08:10 +02:00
clayjohn 93c82ab4b9 Evaluate specular reflections using specular dominant direction instead of assuming mirror reflections 2022-06-29 23:36:18 -07:00
Hugo Locurcio aa177fc4db
Split MovieWriterPNGWAV into its own file
This makes its organization consistent with MovieWriterMJPEG.
2022-06-30 01:02:28 +02:00
Rémi Verschelde 2d28bb8364
Merge pull request #62482 from JFonS/fix_crash_canvas_mode 2022-06-28 15:31:51 +02:00
Rémi Verschelde d53f1fb388
Merge pull request #60935 from Calinou/geometryinstance3d-gi-mode-default-static
Use the Static global illumination mode in GeometryInstance3D by default
2022-06-28 14:40:53 +02:00
JFonS 8102db90bc Fix crash in Environment "Canvas" background mode. 2022-06-28 13:25:18 +02:00
Rémi Verschelde 16d9918b51
Merge pull request #62467 from RandomShaper/descriptor_rw_matters
Consider uniform writability part of the interface of the set
2022-06-28 08:25:38 +02:00
Je06jm c2550e1cc0 Fixed FSR. Before, it was commiting the
raw render to the screen. Now, it commits
the fsr upscaled image
2022-06-27 18:01:12 -06:00
Pedro J. Estébanez fc6ac4a155 Consider uniform writability part of the interface of the set 2022-06-27 21:56:18 +02:00
Bastiaan Olij ecfcfd97fa Split dependency logic
Split FOG
Split visibility notifier
Final cleanup of storage classes
2022-06-28 00:10:29 +10:00
Rémi Verschelde dac79e15f1
Merge pull request #62390 from Calinou/movie-writer-tweak-settings 2022-06-27 12:27:46 +02:00
Pedro J. Estébanez 678a9ca221 Rationalize certain cases of texture usage flags
- Check for exhaustive usage flags for depth buffer
- Remove uneeded storage flag from normal-roughness buffer
2022-06-27 11:28:38 +02:00
Bastiaan Olij 4e8e10a186 Fix typo in roughness shaders 2022-06-26 12:43:21 +10:00
Hugo Locurcio bdb40c6478
Add property hints to MovieWriter settings
- Rename audio mix rate setting as the suffix is now part of the
  property hint. This is also more consistent with existing mix rate
  project settings.
- Improve the MovieWriter class reference.
- Tweak warning message about audio possibly going out of sync.
2022-06-25 20:08:56 +02:00
Rémi Verschelde fbb5e24d1e
Merge pull request #62133 from BastiaanOlij/move_cubemap_effects
Moved cube_to_dp and cubemap logic into CopyEffects
2022-06-24 22:27:26 +02:00
Rémi Verschelde faae24637c
Merge pull request #62300 from smix8/navigation_map_force_update_4.x 2022-06-24 10:13:07 +02:00
Bastiaan Olij 6224b00365 Moved cube_to_dp and cubemap logic into CopyEffects 2022-06-24 18:04:28 +10:00
smix8 e57360d8df Add NavigationServer.region_owns_point() helper function
Adds a helper function to check if a world space position is currently owned by a navigation region.
2022-06-23 23:32:05 +02:00
Hugo Locurcio 610363add0
Use the Static global illumination mode in GeometryInstance3D by default
This makes VoxelGI and SDFGI work out of the box with primitive meshes,
loaded OBJ meshes and CSG nodes.
2022-06-23 22:34:23 +02:00
smix8 fdea269805 Add NavigationServer map_force_update() function
Adds map_force_update() function to NavigationServer. This function immediately flushes the Navigationserver command queue and recalculates all navigationmeshes and region connections for a specific map.
2022-06-23 17:32:07 +02:00
Rémi Verschelde 462127eff0
Merge pull request #62312 from smix8/navigation_get_maps_4.x 2022-06-23 16:14:12 +02:00
Rémi Verschelde 051fb86fb0
Merge pull request #61221 from BastiaanOlij/split_gi_effects 2022-06-23 12:28:10 +02:00
Rémi Verschelde d1dac8427a
Merge pull request #55846 from ellenhp/fix_ogg_edge_cases
Fix ogg edge cases
2022-06-22 23:33:51 +02:00
Rémi Verschelde d8ef904ffc
Merge pull request #35758 from zmanuel/eliminate-draw-pending
Remove redundant thread sync counter draw_pending
2022-06-22 18:20:41 +02:00
Rémi Verschelde e21db7723a
Merge pull request #62286 from JFonS/taa_global_time 2022-06-22 16:59:08 +02:00
Rémi Verschelde 95cafc7bcf
Merge pull request #62305 from JFonS/taa_molten_mobile_workaround 2022-06-22 16:58:31 +02:00
smix8 c0fed1d4e8 Add Navigation function to get all navigation maps
Added new function that returns all created navigation map RIDs from the NavigationServer. The function returns both 2D and 3D created navigation maps as technically there is no distinction between them.
2022-06-22 15:33:40 +02:00
jfons 0f38e79617 Move TIME to a global shader variable
This makes it work consistently for motion vectors in all functions, including user-defined ones.
2022-06-22 12:24:37 +02:00
JFonS 9b4e07f866 Workaround MoltenVK shader conversion error 2022-06-22 11:58:50 +02:00
Bastiaan Olij 997810e417 Split GI effects and fix stereoscopic rendering of GI effects 2022-06-22 12:50:17 +10:00
Rémi Verschelde 40c360b870
Merge pull request #62122 from reduz/implement-movie-writer
Implement a Movie Maker mode
2022-06-21 14:24:14 +02:00
reduz 5786516d4d Implement Running Godot as Movie Writer
* Allows running the game in "movie writer" mode.
* It ensures entirely stable framerate, so your run can be saved stable and with proper sound (which is impossible if your CPU/GPU can't sustain doing this in real-time).
* If disabling vsync, it can save movies faster than the game is run, but if you want to control the interaction it can get difficult.
* Implements a simple, default MJPEG writer.

This new features has two main use cases, which have high demand:
* Saving game videos in high quality and ensuring the frame rate is *completely* stable, always.
* Using Godot as a tool to make movies and animations (which is ideal if you want interaction, or creating them procedurally. No other software is as good for this).

**Note**: This feature **IS NOT** for capturing real-time footage. Use something like OBS, SimpleScreenRecorder or FRAPS to achieve that, as they do a much better job at intercepting the compositor than Godot can probably do using Vulkan or OpenGL natively. If your game runs near real-time when capturing, you can still use this feature but it will play no sound (sound will be saved directly).

Usage:

$ godot --write-movie movie.avi [scene_file.tscn]

Missing:

* Options for configuring video writing via GLOBAL_DEF
* UI Menu for launching with this mode from the editor.
* Add to list of command line options.
* Add a feature tag to override configurations when movie writing (fantastic for saving videos with highest quality settings).
2022-06-21 11:28:47 +02:00
reduz 141c375581 Clean up Hash Functions
Clean up and do fixes to hash functions and newly introduced murmur3 hashes in #61934
* Clean up usage of murmur3
* Fixed usages of binary murmur3 on floats (this is invalid)
* Changed DJB2 to use xor (which seems to be better)
2022-06-20 12:54:19 +02:00
Hugo Locurcio 2651e88b05
Automatically update the editor viewport when 3D scaling options are changed
This allows for previewing the effects of the various 3D scaling
project settings without having to restart the editor.
2022-06-19 01:05:17 +02:00
Rémi Verschelde 3a2b409c5a
Merge pull request #62106 from BastiaanOlij/eye_offset
Introduce eye_offset for correcting stereoscopic reflections
2022-06-18 10:40:57 +02:00
Bastiaan Olij b4821fe2e0 Introduce eye_offset for correcting stereoscopic reflections
Use view instead of vertex for reflections.
2022-06-17 19:39:34 +10:00
Marcel Admiraal 3d03330ae6 Cleanup AudioEffectRecord thread_active variable 2022-06-17 08:54:46 +01:00
Rémi Verschelde 285e20d550
Merge pull request #62081 from Calinou/glow-mix-mode-apply-after-fxaa
Fix glow in Mix mode not working correctly when FXAA is enabled
2022-06-16 20:00:32 +02:00
bruvzg b5c96df277
Move duplicate AutoWrap, Overrun and VisibleChar behavior enums to the TextServer. 2022-06-16 16:49:37 +03:00
Hugo Locurcio 787a1e006b
Fix glow in Mix mode not working correctly when FXAA is enabled
Glow must be performed after FXAA to ensure correct appearance.
2022-06-15 22:23:56 +02:00
smix8 245da150e7 Streamline Navigation layer function names.
Streamline Navigation layer function names.
2022-06-15 00:18:48 +02:00
clayjohn a94110d0c6 Remove GLES2 shader constraints from GLES3 2022-06-14 12:01:52 -07:00
Hugo Locurcio 0225c6d31a
Tweak Light3D property hints for greater flexibility
- Specular can now be set above 1.0.
- Blur can be set to 0 to disable shadow blurring entirely, which is useful
  on lights that have a non-zero size.
  - When shadow blurring is disabled, lights that have a non-zero size will
    not use PCSS-like soft shadows, speeding up shadow rendering
    considerably.
- Some property hints now allow more precise values.
2022-06-13 14:31:46 +02:00
Rémi Verschelde 136f84fc35
Merge pull request #61772 from bruvzg/ft_ot_collect 2022-06-13 11:13:05 +02:00
FireForge 4678736a39 Add suffixes to all nodes and resources 2022-06-11 09:41:05 -05:00
kobewi 9ada594139 Add static methods to create RayQueryParameters 2022-06-10 23:37:04 +02:00
Yuri Rubinsky c9ae83b5ab Prevent defining float constant without number after exponent in shaders 2022-06-10 11:35:56 +03:00
Yuri Rubinsky 5dd7a1030d Fix incorrect sky rotation based on camera axis 2022-06-09 22:40:40 +03:00
Yuri Rubinsky d8842f1a4b Fix `TIME` compilation for custom functions in spatial shader 2022-06-09 20:12:25 +03:00
jfons 36382ab7eb Workaround MoltenVK error found in TAA implementation 2022-06-09 16:40:00 +02:00
clayjohn a0338553b5 Assign VIEWPORT_SIZE after validating screen_size to avoid crash when using ReflectionProbe 2022-06-08 15:01:12 -07:00
Rémi Verschelde e4994e2817
Merge pull request #61739 from smix8/navigation_region_cost_4.x 2022-06-08 16:05:38 +02:00
Rémi Verschelde 48dcafeed9
Merge pull request #61794 from clayjohn/VULKAN-viewport-size
Use RenderBuffer size instead of half extents for VIEWPORT_SIZE
2022-06-08 07:16:25 +02:00
clayjohn b6649828cd Use RenderBuffer size instead of half extents for VIEWPORT_SIZE in Vulkan spatial shaders 2022-06-07 15:01:20 -07:00
jfons ba832d83b2 Initial TAA implementation
Initial TAA support based on the implementation in Spartan Engine.

Motion vectors are correctly generated for camera and mesh movement, but there is no support for other things like particles or skeleton deformations.
2022-06-07 13:14:44 +02:00
bruvzg 6e4cdad3ac
[TextServer] Adds support for TrueType / OpenType collection files (*.TTC, *.OTC). 2022-06-07 11:35:59 +03:00
smix8 cfdfd304f1 Add NavigationRegion costs for pathfinding
Add NavigationRegion costs for pathfinding.
2022-06-06 15:25:06 +02:00
Rémi Verschelde 361a401fbb
Merge pull request #61554 from Chaosus/shader_fix_hints 2022-06-03 17:26:18 +02:00
reduz 54542ef3ec Change Server initialization order
* Registration of server classes happened after Display initialization.
* This made no sense in practice and avoided the registration of custom server drivers (like custom XR server, custom Rendering server, custom XR server).
* Initialization moved to _before_ Display.
2022-06-01 16:48:28 +02:00
Bastiaan Olij 69b66ec425 Ensure has_os_features is safely called as it can't be called from within the construct of RenderingServerDefault on which it relies 2022-06-01 20:47:32 +10:00