Commit graph

1941 commits

Author SHA1 Message Date
reduz 3e2281a347 Improve SDFGI indirect light feedback loop
-Use occlusion for feedback, further reduces light leaking.
-More control on feedback, now its a slider.
2021-02-07 21:30:12 -03:00
reduz 8faf23b52b Simplify Volumetric Fog
-Always use temporal reproject, it just loos way better than any other filter.
-By always using termporal reproject, the shadowmap reduction can be done away with, massively improving performance.
-Disadvantage of temporal reproject is update latency so..
-Made sure a gaussian filter runs in XY after fog, this allows to keep stability and lower latency.
2021-02-06 15:08:21 -03:00
reduz 7997544af5 Added temporal reprojection to Volumetric Fog
-It's an option, just enable it
-Just works, don't have to do anything else.
2021-02-05 10:52:54 -03:00
Rémi Verschelde 2ba66c1457
Merge pull request #45672 from reduz/barrier-optimization
Rewrote how barriers work for faster rendering
2021-02-04 17:19:35 +01:00
Rémi Verschelde 69152af45d doc: Don't bind argument names with p_ prefix
This prefix is used in the C++ codebase, not in the scripting API.
2021-02-04 14:45:06 +01:00
George Marques 3f4d60616e
Make SyntaxHighligher::_clear_highlighting_cache virtual
Since it's meant to be used as a virtual method.
2021-02-04 09:54:09 -03:00
reduz f20999f6fe Rewrote how barriers work for faster rendering
-Added more finegrained control in RenderingDevice API
-Optimized barriers (use less ones for thee same)
-General optimizations
-Shadows render all together unbarriered
-GI can render together with shadows.
-SDFGI can render together with depth-preoass.
-General fixes
-Added GPU detection
2021-02-04 09:42:28 -03:00
George Marques bcf1617755
Removed duplicated binding of two methods
They are bound as both regular and virtual methods which makes ClassDB
report the methods twice when querying the API. The non-virtual binding
is removed since both methods only seem to be used as virtual.
2021-02-04 09:30:41 -03:00
Rémi Verschelde 7185a7c3c2
Merge pull request #45496 from Chaosus/fix_particles
Fix particles not properly updated by their lifetime
2021-02-03 15:50:52 +01:00
clayjohn 814b41fef1 Add check for sun in PhysicalSky 2021-02-02 23:06:42 -08:00
Rémi Verschelde b24c24f64b
Merge pull request #45594 from JFonS/improve_3d_grid
3D editor grid improvements
2021-02-01 23:18:24 +01:00
jfons 73e62dffb9 3D editor grid improvements
This commit adds a view-dependant fade to the 3D viewport grid. It fades out
at steep view angles to hide the solid regions that appear far from the camera.
I also included a fade to hide the grid borders.

I added some improvements to the dynamic grid when the camera is in orthogonal mode.
It properly handles zoom now, and the grid center is now set to the intersection point
between the grid plane and the camera forward ray, keeping the grid
always visible.
2021-02-01 22:19:54 +01:00
Rémi Verschelde d2e1216504
Merge pull request #37547 from aaronfranke/tau
Use Math_TAU and deg2rad/etc in more places and optimize code
2021-02-01 20:55:25 +01:00
Rémi Verschelde d811f86102
Merge pull request #45281 from Chaosus/vs_unify
Unified several visual shader nodes
2021-02-01 08:56:03 +01:00
Rémi Verschelde fb01d057af
doc: Sync classref with current source 2021-01-28 11:26:37 +01:00
Yuri Roubinsky aefce8000d Fix particles not properly modified by their lifetime 2021-01-27 16:28:15 +03:00
Yuri Roubinsky 64971bcc8a Added missed Button font_hover_pressed_color style 2021-01-27 10:44:53 +03:00
Yuri Roubinsky 6d82898470 Reveals Button "icon_color" style properties to the user 2021-01-26 22:05:59 +03:00
Rémi Verschelde 6cba658934
Merge pull request #44194 from madmiraal/fix-font_selected_color
Change themes font_color_selected to font_selected_color
2021-01-26 00:03:40 +01:00
Rémi Verschelde d7aea6ff6c
Merge pull request #45447 from pycbouh/graphedit-minimap-active-invisible
Fix minimap capturing events and improve its theme and editor settings
2021-01-25 20:32:46 +01:00
Yuri Sizov 9d9d0f0bc9 Fix minimap capturing events and improve its theme
Add an editor setting for minimap opacity in visual editors
2021-01-25 21:49:07 +03:00
reduz 51d8e32c93 Implement shadow meshes
-When importing, a vertex-only version of the mesh is created.
-This version is used when rendering shadows, and improves performance by reducing bandwidth
-It's automatic, but can optionally be used by users, in case they want to make special versions of geometry for shadow casting.
2021-01-25 15:03:15 -03:00
Marcel Admiraal 8eb39f4e8b Change themes *_color_* to *_*_color
Changed:
font_color_accel -> font_accelerator_color
font_color_bg -> font_unselected_color
font_color_disabled -> font_disabled_color
font_color_fg -> font_selected_color
font_color_hover -> font_hover_color
font_color_hover_pressed -> font_hover_pressed_color
font_color_pressed -> font_pressed_color
font_color_readonly -> font_readonly_color
font_color_selected -> font_selected_color
font_color_shadow -> font_shadow_color
font_color_uneditable -> font_uneditable_color
icon_color_disabled -> icon_disabled_color
icon_color_hover -> icon_hover_color
icon_color_hover_pressed -> icon_hover_pressed_color
icon_color_normal -> icon_normal_color
icon_color_pressed -> icon_pressed_color

Also includes:
font_outline_modulate -> font_outline_color
tab_fg -> tab_selected
tab_bg -> tab_unselected
2021-01-24 06:28:49 +00:00
Rémi Verschelde d39f6386ce
Merge pull request #45314 from RandomShaper/modernize_rwlock
Modernize RWLock
2021-01-22 14:51:05 +01:00
Rémi Verschelde 76c6007aa6
Cleanup: Remove executable bit from files which don't need it
Drop unused xpmfix.sh script.
2021-01-19 23:36:42 +01:00
Pedro J. Estébanez 8ed259b792 Modernize RWLock
- Based on C++14's `shared_time_mutex`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed
- Simpler for `NO_THREADS`
2021-01-19 11:53:10 +01:00
Yuri Roubinsky 4618e09f3b
Added SDF nodes to visual shader 2021-01-18 15:04:54 +01:00
Yuri Roubinsky de5a8128d7 Unified several visual shader nodes 2021-01-18 13:32:12 +03:00
Hugo Locurcio 1f9cac1717
Fix typo in theming methods ("botton" -> "bottom") 2021-01-18 04:19:07 +01:00
Yuri Roubinsky 4a85f4cafe Fix replaced visual shader nodes updating 2021-01-15 21:10:32 +03:00
Rémi Verschelde c7fb7674c8
Merge pull request #44805 from Chaosus/vs_convert
Add convert options between constants and uniforms in visual shaders
2021-01-15 16:58:26 +01:00
Yuri Roubinsky ef941a6500 Renamed emit_particle to emit_subparticle shader function 2021-01-12 09:41:08 +03:00
K. S. Ernest (iFire) Lee 59b61a1f64 Scale error in mesh optimizer so it uses absolute scale.
Switch to simplify sloppy for another try.

Update to meshoptimizer e3f53f66e7a35b9b8764bee478589d79e34fa698.
2021-01-11 06:07:54 -08:00
Aaron Franke 1d5042c9e2
Use Math_TAU and deg2rad/rad2deg in more places and optimize code 2021-01-09 03:47:14 -05:00
reduz cdb216f4e4 Added ability to visualize native shaders 2021-01-06 09:40:09 -03:00
Rémi Verschelde b5334d14f7
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
Yuri Roubinsky c98c6eadbe Add convert options between constants and uniforms in visual shaders 2020-12-30 13:07:08 +03:00
Rémi Verschelde 848f5ba05c
Merge pull request #44762 from KoBeWi/offset_is_now_point_not_offset_point
Rename offset to point in remove_point()
2020-12-29 13:37:49 +01:00
Rémi Verschelde 2086acfacc
Merge pull request #44614 from madmiraal/rename-normalmap-normal_map
Consistently use normal_map
2020-12-29 10:39:56 +01:00
Rémi Verschelde 09212fba1e
Fix missed renamings from empty() to is_empty()
Those were missed in #44401 or added by later PRs.
2020-12-29 09:55:07 +01:00
Rémi Verschelde 652bdd573e
Merge pull request #43691 from bruvzg/ctl_dropcap
[Complex Text Layouts] Add drop-cap support to RTL.
2020-12-29 09:14:46 +01:00
Marcel Admiraal b4a190e0bc Consistently use normal_map 2020-12-29 08:04:19 +00:00
kobewi 4f72a07eaa Rename offset to point in remove_point() 2020-12-28 17:57:55 +01:00
Rémi Verschelde 4ca98c7a35
Merge pull request #44183 from madmiraal/box_shape-size
Use a size Vector for adjusting the size of Rectangles and Boxes
2020-12-28 16:06:50 +01:00
Rémi Verschelde 058f3fe069
Merge pull request #44149 from madmiraal/rename-tangent-orthogonal
Rename Vector2.tangent() to Vector2.orthogonal()
2020-12-28 16:00:12 +01:00
Marcel Admiraal b628912af0 Rename Rect2 and Rect2i grow_margin() to grow_side() 2020-12-28 12:47:33 +00:00
Marcel Admiraal 5b937d493f Rename empty() to is_empty() 2020-12-28 10:39:56 +00:00
Marcel Admiraal 4b8b803931 Rename Control margin to offset 2020-12-23 06:25:56 +00:00
clayjohn 44f8922305 Port ASSAO to Godot to replace SAO 2020-12-21 23:08:59 -08:00
Pedro J. Estébanez b7367ac426 Add animation reset track feature
As a bonus, to have consistency between use Beziers and create insert tracks, use Beziers also gets a default via editor settings that is used when the confirmation dialog is disabled, instead of just falling back to creating non-Bezier tracks.
2020-12-20 12:45:08 +01:00
Marcel Admiraal 2df9a8ccad Rename Rect2 and Rect2i clip() to intersection() 2020-12-19 12:59:08 +00:00
reduz d2302f53d6 Implement automatic LOD (Level of Detail)
-Happens on import by default for all models
-Just works (tm)
-Biasing can be later adjusted per node or per viewport (as well as globally)
-Disabled AABB.get_support test because its broken
2020-12-18 15:48:03 +01:00
Rémi Verschelde 771b99b7f4
Merge pull request #44495 from godotengine/font-typo-44494
Font: Fix typo in DynamicFontData compat code
2020-12-18 14:08:15 +01:00
Rémi Verschelde a5c47dab5b
Font: Fix typo in DynamicFontData compat code
Fixes #44494.
2020-12-18 12:59:52 +01:00
Rémi Verschelde c7b53c03ae
SCons: Add explicit dependencies on thirdparty code in cloned env
Since we clone the environments to build thirdparty code, we don't get an
explicit dependency on the build objects produced by that environment.

So when we update thirdparty code, Godot code using it is not necessarily
rebuilt (I think it is for changed headers, but not for changed .c/.cpp files),
which can lead to an invalid compilation output (linking old Godot .o files
with a newer, potentially ABI breaking version of thirdparty code).

This was only seen as really problematic with bullet updates (leading to
crashes when rebuilding Godot after a bullet update without cleaning .o files),
but it's safer to fix it everywhere, even if it's a LOT of hacky boilerplate.
2020-12-18 10:29:34 +01:00
Rémi Verschelde c83d1b2526
Merge pull request #43416 from pycbouh/graph-minimap
Add a minimap to the GraphEdit
2020-12-17 17:34:36 +01:00
Yuri Sizov 8d608cdc40 Remove unused argument in Theme method and expose missing methods 2020-12-17 15:51:08 +03:00
reduz bf77016c8a Reimplement skeletons and blend shapes
Uses compute shaders, which only once, on demand, and all in parallel.
2020-12-16 14:32:04 -03:00
Marcel Admiraal f5a3cbda19 Rename Animation::track_remove_key_at_position to track_remove_key_at_time 2020-12-14 18:00:11 +00:00
reduz 77a045e902 Rework Mesh handling on scene importing.
-Reworked how meshes are treated by importer by using EditorSceneImporterMesh and EditorSceneImporterMeshNode. Instead of Mesh and MeshInstance, this allows more efficient processing of meshes before they are actually registered in the RenderingServer.
-Integrated MeshOptimizer
-Reworked internals of SurfaceTool to use arrays, making it more performant and easy to run optimizatons on.
2020-12-13 21:29:51 -03:00
bruvzg 62927383ed
[Complex Text Layouts] Add drop-caps support to TextParagraph and RTL. 2020-12-13 22:20:02 +02:00
bruvzg c1d261fdb0
[Complex Text Layouts] Add variable fonts support. 2020-12-13 18:43:39 +02:00
bruvzg 6b6f101983
[Complex Text Layouts] Refactor RichTextLabel. 2020-12-11 09:48:49 +02:00
Rémi Verschelde 67259d07db
Merge pull request #44070 from YeldhamDev/popupmenu_separator_font_color
Add "font_color_separator" theme property to 'PopupMenu'
2020-12-10 11:13:07 +01:00
Rémi Verschelde 114f97ff11
Merge pull request #44128 from KoBeWi/🧹
Cleanup unused engine code
2020-12-09 13:01:50 +01:00
Tomasz Chabora 2c048ea164 Cleanup unused engine code 2020-12-09 12:12:36 +01:00
Rémi Verschelde 92c001ef09
Merge pull request #43931 from bruvzg/ctl_comp_font
[Complex Text Layouts] Add compatibility for legacy Font resources.
2020-12-09 11:28:11 +01:00
Rémi Verschelde 0c5d3b838c
Merge pull request #44199 from bruvzg/pvs_fixes_1
PVS-Studio static analyzer fixes
2020-12-09 10:23:21 +01:00
bruvzg 644f739660
Static analyzer fixes:
Removes unused code in OS.
Fixes return types.
Fixes few typos.
2020-12-09 10:17:53 +02:00
Hugo Locurcio 88f70b0c05
Increase dithering in the PhysicalSkyMaterial shader to combat banding
Banding should now be much less visible when using the default
PhysicalSkyMaterial settings.
2020-12-09 01:40:58 +01:00
Marcel Admiraal 43c9106806 Use box size instead of extents for Shape dimensions 2020-12-08 11:58:21 +00:00
Marcel Admiraal d5d99aaed6 Use rectangle size instead of extents for Shape dimensions 2020-12-08 11:57:46 +00:00
bruvzg a458e90179
[Complex Text Layouts] Adds missing Font::SPACING_* to the Label, LineEdit, TextEdit, TextLine and TextParagraph.
Fixes oversized editor control height (default editor spacing is negative) and control size changing when text is set.
2020-12-06 20:30:59 +02:00
Marcel Admiraal a24c38d1a8 Rename Vector2.tangent() to Vector2.orthogonal() 2020-12-06 18:16:06 +00:00
Hugo Locurcio 44d0c74768
Tweak BaseMaterial3D heightmap property hints
- Allow finer adjustments of the heightmap scale.
- Allow increasing the heightmap level detail (at the cost of performance).
2020-12-05 21:43:32 +01:00
Rémi Verschelde c574b4d086
Merge pull request #44091 from madmiraal/rename-cubemesh-boxmesh
Rename CubeMesh to BoxMesh
2020-12-05 16:48:15 +01:00
Marcel Admiraal df6b061dbb Rename CubeMesh BoxMesh 2020-12-05 11:48:26 +00:00
Aaron Franke 40b81339d0
Rebind Mesh/ArrayMesh enums 2020-12-04 19:34:50 -05:00
Aaron Franke 47f8ac7864
Rename Particles/ParticlesMaterial "Flags" enum to "ParticleFlags"
"Flags" was a bit too ambiguous, and in 3D it hid GeometryInstance.Flags
2020-12-04 19:34:29 -05:00
Rémi Verschelde 1a001ad964
doc: Sync classref with current source
And fixups:
- Add missing bindings in RenderingServer
- Remove duplicate ArrayMesh enum bindings (they're in Mesh already)
- Remove redundant _unhandled_key_input binding in Control (it's in Node
  already)
2020-12-04 22:28:08 +01:00
Michael Alexsander 383e8919e0 Add "font_color_separator" theme property to 'PopupMenu' 2020-12-03 11:36:03 -03:00
bruvzg 3c3590522f
[Complex Text Layouts] Add compatibility for legacy Font resources. 2020-12-03 10:34:03 +02:00
reduz 70f5972905 Refactored Mesh internals and formats.
-Changed how mesh data is organized, hoping to make it more efficient on Vulkan and GLES.
-Removed compression, it now always uses the most efficient format.
-Added support for custom arrays (up to 8 custom formats)
-Added support for 8 weights in skeleton data.
-Added a simple optional versioning system for imported assets, to reimport if binary is newer
-Fixes #43979 (I needed to test)

WARNING:

-NOT backwards compatible with previous 4.x-devel, will most likely never be, but it will force reimport scenes due to version change.
-NOT backwards compatible with 3.x scenes, this will be eventually re-added.
-Skeletons not working any longer, will fix in next PR.
2020-12-02 13:07:59 -03:00
Yuri Roubinsky dd32d7b7ee Fixed some errors when changing port name in visual shader expressions 2020-12-02 13:27:37 +03:00
Yuri Roubinsky b74f1abd25 Fix few bugs in visual shader expressions
Fixed few bugs in visual shader expressions
2020-12-01 16:55:52 +03:00
Yuri Sizov 999ce610a2 Add a minimap to the GraphEdit 2020-11-30 16:48:52 +03:00
Yuri Roubinsky 82d64ebd19 Fixed several visual shader inputs
Fixed several inputs in visual shaders
2020-11-29 16:10:05 +03:00
Rémi Verschelde ef2d1f6d19
Merge pull request #42761 from fire/color-grading-3d
Environment brightness, contrast, saturation restore with 3d LUT.
2020-11-28 23:07:52 +01:00
Yuri Roubinsky 07e752585c Fixed invalid visual shader outputs (TRANSMISSION, ALPHA_SCISSOR) 2020-11-28 20:42:59 +03:00
clayjohn 076908bed9 Environment brightness, contrast, saturation restore with color correction.
Allow gradients and 2d images.

Use shader versions for LUT in tonemap

Co-authored-by: alex-poe <3957610+CptPotato@users.noreply.github.com>
Co-authored-by: QbieShay <cislaghi.ilaria@gmail.com>
Co-authored-by: Clay John <claynjohn@gmail.com>
2020-11-28 07:37:49 -08:00
Rémi Verschelde a6751e6c58
Merge pull request #41100 from bruvzg/ctl_text_server_interface
[Complex Text Layouts] Implement TextServer interface.
2020-11-28 09:03:15 +01:00
Rémi Verschelde 43f60c94e8
Merge pull request #39056 from rileylyman/tscn_newlines
Skip extra newline in .tscn when renaming dependency
2020-11-27 15:35:15 +01:00
bruvzg 99666de00f
[Complex Text Layouts] Refactor Font class, default themes and controls to use Text Server interface.
Implement interface mirroring.
Add TextLine and TextParagraph classes.
Handle UTF-16 input on macOS and Windows.
2020-11-26 14:25:48 +02:00
Yuri Roubinsky 3e1e01b7ab Added extra warning to VisualShaderNodeTexture + fix warning appearing 2020-11-26 14:53:47 +03:00
Andrii Doroshenko (Xrayez) 0ee88d6705 Describe ImageTexture, Image creation and usage 2020-11-17 16:00:41 +02:00
Rémi Verschelde 99d0df2e33
Merge pull request #38812 from aaronfranke/brace-no-empty-line
Remove all empty lines from the start of blocks defined with braces
2020-11-17 08:59:50 +01:00
Rémi Verschelde 9de18cc946
Merge pull request #43547 from TokageItLab/lowering-s3d-and-camera-min-unit
Lowering the Minimum Unit at Shape3D and Cameras
2020-11-17 07:55:44 +01:00
Aaron Franke 02161aad5a
Remove empty lines around braces with the formatting script 2020-11-16 23:38:11 -05:00
Tokage 4a2aaabf9f Lowering the Minimum Unit at Shape3D and Cameras 2020-11-17 13:17:37 +09:00
Rémi Verschelde d105c718fd
Merge pull request #43316 from YeldhamDev/rate_scale_wav_fix
Fix WAV resources ignoring the AudioServer's 'global_rate_scale' value
2020-11-16 15:52:48 +01:00