Commit Graph

447 Commits

Author SHA1 Message Date
855c7c7414 Merge pull request #50566 from reduz/optimize-stringname-usage
Optimize StringName usage
2021-07-19 15:20:25 +02:00
6631f66c2a Optimize StringName usage
* Added a new macro SNAME() that constructs and caches a local stringname.
* Subsequent usages use the cached version.
* Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time.
* Replaced all theme usages by this new macro.
* Replace all signal emission usages by this new macro.
* Replace all call_deferred usages by this new macro.

This is part of ongoing work to optimize GUI and the editor.
2021-07-18 21:20:02 -03:00
76e25438c9 Fixes to forward mobile
* use valid format for framebuffer: VK_FORMAT_A2B10G10R10_UNORM_PACK32
* Unfortunately cant be used for compute.
* Mobile will need to do refprobe, sky, mipmapblurring using raster.
2021-07-15 21:05:58 -03:00
64fb4fac89 Merge pull request #49996 from Chaosus/shader_localvar_warning
Added a shader warning about unused local variable
2021-07-15 16:19:22 +02:00
3f12765a7e Merge pull request #49678 from BastiaanOlij/mobile_renderer_select_color_format
Use 32bit instead of 64bit 3D render buffer on mobile renderer
2021-07-15 10:16:39 -03:00
d6dc77aa36 Removes lines about window size from the console output 2021-07-14 20:58:53 +03:00
0f78e36e1c Check if there are new docs missing on CI 2021-07-14 14:21:03 +03:00
8a29208fc4 Use 32bit instead of 64bit 3D render buffer on mobile 2021-07-13 10:26:28 +10:00
ad9f606ed8 Use specialization constants in clustered renderer
* Keep track of when projector, softshadow or directional sofshadow were enabled.
* Enable them via specializaton constant where it makes sense.
* Re-implements soft shadows.
* Re-implements light projectors.
2021-07-12 20:33:52 -03:00
b218c6785e Merge pull request #50194 from BastiaanOlij/fix_multiple_reflection_probes
Fix indexing of multiple reflection probes
2021-07-12 19:22:47 +02:00
e3be0913d7 Explicit error message when setting active a Viewport that is already active.
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2021-07-12 13:27:45 +02:00
b2f6db7aa8 Implement Specialization Constants
* Added support to our local copy of SpirV Reflect (which does not support it).
* Pass them on render or compute pipeline creation.
* Not implemented in our shaders yet.
2021-07-11 23:16:09 +02:00
a2d5f191d8 Merge pull request #48622 from Geometror/reimplement-disableable-vsync 2021-07-10 01:02:23 +02:00
83addd6ee5 Fix material invalidation on reimport.
* IF a texture was reimported (calling replace as an example), it would invalidate all materials using it, causing plenty of errors.
* Added the possibility to get a notification when a uniform set is erased.
* With this notification, materials can be queued for update properly.
2021-07-07 19:55:20 -03:00
24efb13f7e Fix threaded update for textures
* Previews and other stuff now works again.
* Not the best solution, will have to be improved in the future usinc async queues where supported.
2021-07-07 18:06:06 -03:00
48a5226829 Merge pull request #50193 from reduz/fix-command-queue-crash
Fix Command Queue Crash
2021-07-07 16:36:13 +02:00
d41e3f9aeb Fix Command Queue Crash
* No longer allow sending an object (texture) to the server as material parameter
* Keep a parameter cache locally in ShaderMaterial
2021-07-07 10:57:56 -03:00
c43f624d44 Unify material parameter update
* Unifies how material parameters are updated.
* Single function, easier to maintain.
* Updates materials properly when textures change.
2021-07-06 18:57:38 -03:00
043ae91560 Restructure and reimplement vsync options
-Add a v-sync mode setting which allows to choose between DISABLED, ON, ADAPTIVE and MAILBOX
-Removed the V-Sync via Compositor option
2021-07-06 16:34:26 +02:00
b3612351a8 Fix indexing of multiple reflection probes 2021-07-06 13:00:33 +10:00
7f6027927a Fix Subsurface Scattering
* Works again
* Transmittance also works again
* Removed the curve patamter, exp() function is good enough.
2021-07-05 17:17:45 -03:00
82bb8f1531 Fix transparency sorting 2021-07-05 03:19:42 -06:00
5c3055e0fe Merge pull request #50137 from reduz/fix-boot-splash
Fix Boot Splash
2021-07-04 09:40:36 +02:00
67c08e27a5 Merge pull request #50138 from Calinou/debug-overdraw-lower-opacity
Decrease opacity of the overdraw debug draw mode
2021-07-04 09:39:36 +02:00
8838e3d3d4 Merge pull request #50144 from reduz/fix-ssr
Fix SSR
2021-07-04 09:20:22 +02:00
0e366dc7ac Fix SSR
* Was broken at some point long time ago, this restores it.
2021-07-03 23:32:34 -03:00
ab3314e955 Fix SDFGI
* Broken by 7513b73902, fixes #49631
2021-07-03 21:24:37 -03:00
27aa8dc68e Decrease opacity of the overdraw debug draw mode
This allows distinguishing higher amounts of overlapping objects.
2021-07-04 00:19:14 +02:00
6e1c5e346a Fix Boot Splash
* Implements the code to show the boot splash on load using RenderingDevice
* Does not work on X11 when maximized, some platform specific hack will be needed there.
2021-07-03 18:09:19 -03:00
fe17a6c907 Fix render debug modes.
* Ovedraw debug works again
* Lighting debug works again
2021-07-03 14:50:36 -03:00
6c55d2aad2 Fix Render Info
* Fixed and redone the process to obtain render information from a viewport
* Some stats, such as material changes are too difficult to guess on Vulkan, were removed.
* Separated visible and shadow stats, which causes confusion.
* Texture, buffer and general video memory can be queried now.
* Fixed the performance metrics too.
2021-07-03 10:15:04 -03:00
e86aeb85ce Properly override virtual functions in render_scene_render_rd and subclasses 2021-07-03 20:32:40 +10:00
5370f4876e Remove leftovers from the DirectionalLight3D Optimized shadow depth range
The Optimized shadow depth range was removed in late 2020 in favor
of the Stable shadow depth range, but it still had a (broken) property
that allowed to enable it.
2021-07-02 20:32:43 +02:00
8cf812fba1 Fix surface from array creation
* The debug check was not updated to the new format.
* Bug introduced by #50037
2021-07-01 16:51:55 -03:00
ad8a2b3d52 Merge pull request #50040 from reduz/fix-renderingserver-bindings
Clean up RenderingServer and its bindings
2021-07-01 15:17:33 +02:00
37776b2867 Clean up RenderingServer and its bindings
* Rewrote bindings for RenderingServer.
* They are now all up to date.
* Several unused methods and deprecated features were cleaned up.
2021-07-01 09:07:36 -03:00
9ad0c6cde7 Import mesh colors in 8BPP.
* Colors were imported as 16BPP (half float)
* Far most common use cases only require 8BPP
* If you need higher data precision, use a custom array, which are supported now.

**WARNING**: 3D Scenes imported in 4.0 no longer compatible with this new format. You need to re-import them (erase them from .godot/import)
2021-06-30 23:33:25 -03:00
85cf99f28e Deprecate ImmediateGeometry
* Removed entirely from RenderingServer.
* Replaced by ImmediateMesh resource.
* ImmediateMesh replaces ImmediateGeometry, but could use more optimization in the future.
* Sprite3D and AnimatedSprite3D work again, ported from Godot 3.x (though a lot of work was needed to adapt them to Godot 4).
* RootMotionView works again.
* Polygon3D editor works again.
2021-06-30 14:14:41 -03:00
d07f7c8d25 Fixes to 2D viewport
* Editor 2D viewport now uses embedded subwindows (windows no longer pop up)
* Restored the ability to disable 3D on the 2D viewport (makes 3D not display on 2D when there is a camera on the scene)
2021-06-29 17:40:45 -03:00
64c925cca6 Improve RID_Owner memory usage
* Ability to allocate empty objects in RID_Owner, so RID_PtrOwner is not needed in most cases.
* Improves cache usage, as objects are now allocated together
* Should improve performance in 2D rendering
2021-06-29 12:28:08 -03:00
d55ebc3a5d Fix non uniform scaling in 3D objects
* Flag was there, but not implemented.
* Fixed issue with base flags not being initialized.
2021-06-29 11:45:59 -03:00
5100eed012 Added a shader warning about unused local variable 2021-06-29 15:39:37 +03:00
a9604b425f Move render_sky logic from effects into our sky object, and some minor cleanup 2021-06-26 18:46:47 +10:00
e4430771db Merge pull request #49885 from reduz/implement-render-pass-support
Implement Framebuffer Subpass support
2021-06-25 15:00:01 +02:00
bde6f5eed1 Implement Framebuffer Subpass support
* Required for better optimizing mobile platforms
* Will be used by the Vulkan mobile renderer.
2021-06-24 15:59:15 -03:00
a01ea509f5 Merge pull request #49826 from groud/fix_mesh_transform
Keep the drawing transform when drawing meshing in CanvasItem
2021-06-24 19:38:56 +02:00
ccbf31685d Fixes Mesh2D drawn without modulation 2021-06-23 17:38:31 +02:00
e8476c994d Keep the drawing transform when drawing meshing in CanvasItem 2021-06-22 11:41:28 +02:00
e28fd07b2b Rename instance()->instantiate() when it's a verb 2021-06-19 20:49:18 -06:00
76fd91c084 Merge pull request #49737 from JFonS/fix_vis_range
Fix crash in visibility range system.
2021-06-20 00:32:42 +02:00