Rémi Verschelde
fff4240bb4
Fix code formatting issues and VS compilation
...
Also temporarily disable multicheck build so that we get a full build
even when there are style issues on Vulkan.
Fixes #33356 .
2020-02-11 12:05:19 +01:00
Juan Linietsky
b509c814fc
Improved Voxel AO settings.
2020-02-11 12:05:05 +01:00
Juan Linietsky
4949d578f2
Dynamic objects in GIProbes are now affected by propagation parameter.
2020-02-11 12:05:05 +01:00
Juan Linietsky
d6e4b45994
More correctly divide alpha by 8 for mipmaps, fixes voxel overocclusion.
2020-02-11 12:05:04 +01:00
Juan Linietsky
8deb977551
Changed SDF processing to smooth out shadows.
2020-02-11 12:05:03 +01:00
Juan Linietsky
da0457fa29
Several fixes to GIProbes
2020-02-11 12:04:56 +01:00
Juan Linietsky
971ce680f2
Fixes to how anisotropy is handled, makes it work on nvidia.
2020-02-11 12:04:56 +01:00
Juan Linietsky
f4948721e4
Fixed uninitialized memory bug in voxelizer
2020-02-11 12:04:54 +01:00
Juan Linietsky
2af701fa03
Use a different strategy to get textures from GPU (via buffers), for more compatibility.
2020-02-11 12:04:54 +01:00
Juan Linietsky
2c67cc654f
AO support for GIProbe (right on time for Godot Sprint!)
2020-02-11 12:03:55 +01:00
Juan Linietsky
76c6f39d99
GIProbe now generates a distance field on bake using CPU, for better compatibility
2020-02-11 12:03:54 +01:00
Juan Linietsky
561b431d85
Dynamic object support for GI Probes (a bit buggy still)
2020-02-11 12:03:52 +01:00
Juan Linietsky
6ee2f5e6b6
More GIProbe work and fixes
2020-02-11 12:03:49 +01:00
bruvzg
26318f3bd1
Fix Vector3 ambiguities and out of bounds init.
2020-02-11 12:03:39 +01:00
Juan Linietsky
fb739f9da7
Fixed display menu visualizations.
2020-02-11 12:03:24 +01:00
Juan Linietsky
965185c765
Better GIProbe quality settings.
2020-02-11 12:03:23 +01:00
Juan Linietsky
fa548b052e
Missing proper comparison for depth pre-pass.
2020-02-11 12:03:21 +01:00
Juan Linietsky
acf0f6c8a7
GIProbes working.
2020-02-11 12:03:20 +01:00
Juan Linietsky
4aea9f74e6
Rewritten StreamTexture for better code reuse, added basis universal support
2020-02-11 12:02:36 +01:00
Juan Linietsky
263bebe023
Untested support for compute shaders
2020-02-11 12:02:34 +01:00
Juan Linietsky
b08f13d558
Skeletons are now working.
2020-02-11 12:02:17 +01:00
Rémi Verschelde
e3b76fd040
Merge pull request #32281 from Chaosus/vk_shader_array_varying2
...
[Vulkan] Implement shader array support for varyings
2020-02-11 12:02:06 +01:00
Yuri Roubinsky
bfa834a78a
[Vulkan] Implement shader array support for varyings
...
Remake of #32175
2020-02-11 12:02:02 +01:00
Rémi Verschelde
d08bf966eb
Merge pull request #32280 from Chaosus/vk_shader_switch2
...
[Vulkan] Implements switch flow control operator in shaders
2020-02-11 12:01:59 +01:00
Yuri Roubinsky
d51b7aafb5
[Vulkan] Implements switch flow control operator in shaders
2020-02-11 12:01:49 +01:00
Juan Linietsky
bc3dbe8240
Properly working instancing, and compatibility fixing for old meshes
2020-02-11 12:01:33 +01:00
Juan Linietsky
123ee5995c
Visual GPU profiler and related profiling support in Vulkan.
2020-02-11 12:01:26 +01:00
Juan Linietsky
dc32083681
Proper texture reloading (was broken).
2020-02-11 12:01:25 +01:00
Juan Linietsky
dd3682e5fe
Modernized default 3D material, fixes material bugs.
2020-02-11 12:01:24 +01:00
Juan Linietsky
6deffa62fb
Several fixes to 3D rendering, and multimesh implementation.
2020-02-11 12:01:22 +01:00
Juan Linietsky
9d7b7f931b
Reflection probes working
2020-02-11 12:01:21 +01:00
Juan Linietsky
69e83e4815
Directional light cleanup.
2020-02-11 12:01:21 +01:00
Juan Linietsky
88a7debbbc
Directional lights and shadow mapping are functional.
2020-02-11 12:01:20 +01:00
Juan Linietsky
920db604d2
Rewrote large part of rendering, omni and spot shadows now work.
2020-02-11 12:01:18 +01:00
Juan Linietsky
1d871f6226
Tonemapping ported (not all parameters supported yet, only enough to get correct color)
2020-02-11 12:01:09 +01:00
Juan Linietsky
2d6a916835
Environment sky more or less working.
2020-02-11 12:01:05 +01:00
Rémi Verschelde
f7aa7927e7
Merge pull request #31527 from Chaosus/vk_shader_array_support2
...
[Vulkan] Implemented local shader arrays
2020-02-11 12:00:53 +01:00
Yuri Roubinski
ef50752292
[Vulkan] Implemented local shader arrays
2020-02-11 12:00:46 +01:00
Rémi Verschelde
86d0d88b42
Merge pull request #31526 from Chaosus/shader_bug_vk2
...
[Vulkan] Fix ternary operator shader compiler expression
2020-02-11 12:00:16 +01:00
Yuri Roubinski
47c0ef3308
[Vulkan] Fix ternary operator shader compiler expression
2020-02-11 12:00:10 +01:00
Yuri Roubinski
95e8375efb
[Vulkan] Implemented do/while loops for shaders
2020-02-11 11:59:51 +01:00
Juan Linietsky
8cee7703a6
Yay very basic 3D (only white) finally shows.
2020-02-11 11:59:27 +01:00
Juan Linietsky
449df8f688
Base 3D engine done, still untested, though.
2020-02-11 11:59:25 +01:00
Juan Linietsky
dc3b47f3ab
Vulkan/RD rasterizer now does clean exit.
2020-02-11 11:58:16 +01:00
Juan Linietsky
b52a2f3dfa
Fix comment
2020-02-11 11:58:11 +01:00
Rémi Verschelde
6289e7d147
Merge pull request #29993 from bruvzg/vulkan
...
Initial Vulkan support for macOS (MoltenVK) and Windows
2020-02-11 11:57:40 +01:00
bruvzg
b456bfad5c
Add runtime GLES2 / Vulkan context selection.
2020-02-11 11:57:34 +01:00
bruvzg
eb48be51db
Add static Vulkan loader.
...
Initial Vulkan support for Windows.
Initial Vulkan support for macOS.
2020-02-11 11:57:11 +01:00
Juan Linietsky
6ecedd1e6c
Add a system to properly update materials if the uniform set is gone (likely deleted texture)
2020-02-11 11:53:29 +01:00
Juan Linietsky
4fe3ee1730
Moved the shader source compilation code outside RenderingDevice and Vulkan
2020-02-11 11:53:29 +01:00
Juan Linietsky
c613ead5fa
Added a spinlock template as well as a thread work pool class.
...
Also, optimized shader compilation to happen on threads.
2020-02-11 11:53:29 +01:00
Juan Linietsky
60c7498cee
Replaced GLSLang reflection by SPIRV-Reflect, eventually allowing to move GLSLang out.
2020-02-11 11:53:29 +01:00
Juan Linietsky
0586e18449
Custom material support seems complete.
2020-02-11 11:53:29 +01:00
Juan Linietsky
8bbbb97336
Completed material/2D shader support (missing SCREEN_TEXTURE)
2020-02-11 11:53:29 +01:00
Juan Linietsky
50e9befb88
Changes to material required to add custom shaders in RD renderer
2020-02-11 11:53:28 +01:00
Juan Linietsky
ef083a583b
Modified light rendering to make it more compatible.
...
Modified polygon management to make it more compatible with MoltenVK
2020-02-11 11:53:28 +01:00
Juan Linietsky
a3f8ffac63
Use a special sampler for 2D shadows, so they are softer
2020-02-11 11:53:28 +01:00
Juan Linietsky
f04359e70f
2D lighting seems more or less complete.
2020-02-11 11:53:28 +01:00
Juan Linietsky
a7b2ac7bb1
Normalmapping and Specularmapping working in 2D engine
...
Added support for Sprite, AnimatedSprite and Polygon2D (should add for tileset eventually).
2020-02-11 11:53:28 +01:00
Juan Linietsky
92b27bccf1
Changed allocation strategy of CanvasItem draw commands.
...
They should now allocate memory in blocks and reuse the same
memory every time the item is cleared and redrawn.
This should improve performance considerably.
2020-02-11 11:53:28 +01:00
Juan Linietsky
24b16f3bf0
Fix crash on import.
2020-02-11 11:53:28 +01:00
Juan Linietsky
e3905f9af3
Added ability to retrieve back textures stored on GPU
2020-02-11 11:53:28 +01:00
Juan Linietsky
e1b3444415
Bugfixes and ability to better specify filter and repeat modes everywhere.
...
Removes antialiased flag for draw_* methods.
2020-02-11 11:53:28 +01:00
Juan Linietsky
1b4281b895
basic 2D engine is more or less working with Vulkan, including editor.
...
Still a lot to do
2020-02-11 11:53:27 +01:00
Juan Linietsky
42b44f43ee
Basic 2D engine is more or less working, needs more work for editor to be usable.
2020-02-11 11:53:27 +01:00
Juan Linietsky
9b0dd4f571
A lot of progress with canvas rendering, still far from working.
2020-02-11 11:53:27 +01:00
Juan Linietsky
836c2109a0
Changed my mind on Vulkan image API, images should now include mipmaps
...
This should make it easier to obtain the data directly from an Image
2020-02-11 11:53:27 +01:00
Juan Linietsky
3f335ce3d4
Texture refactor
...
-Texture renamed to Texture2D
-TextureLayered as base now inherits 2Darray, cubemap and cubemap array
-Removed all references to flags in textures (they will go in the shader)
-Texture3D gone for now (will come back later done properly)
-Create base rasterizer for RenderDevice, RasterizerRD
2020-02-11 11:53:26 +01:00
Juan Linietsky
9ffe57a10e
Modify RenderingDevice to use RIDs, now that they are O(1)
2020-02-11 11:53:26 +01:00
Juan Linietsky
4f163972bb
Refactored RID/RID_Owner to always use O(1) allocation.
...
* Implements a growing chunked allocator
* Removed redudant methods get and getptr, only getornull is supported now.
2020-02-11 11:53:26 +01:00
Juan Linietsky
1522d8c3ee
Added support for push constants
2020-02-11 11:53:26 +01:00
Juan Linietsky
fd188ddd51
Initial work on Vulkan:
...
-Added VulkanContext
-Added an X11 implementation
-Added a rendering device abstraction
-added a Vulkan rendering device abstraction
-Engine does not work, only shows Godot logo (run it from bin/)
2020-02-11 11:53:26 +01:00
Duroxxigar
383c583a0b
Documented the new NavigationServer and all its associated nodes (2D and 3D)
2020-02-10 15:24:06 +01:00
Andrea Catania
e6be3f68da
- Integrated NavigationServer and Navigation2DServer.
...
- Added Navigation Agents and Obstacles.
- Integrated Collision Avoidance.
This work has been kindly sponsored by IMVU.
2020-02-10 14:38:52 +01:00
Rémi Verschelde
6203c38fd1
Merge pull request #35993 from akien-mga/who-let-the-latency-out
...
Workaround WebM playback bug after AudioServer latency fixes
2020-02-08 15:36:50 +01:00
Rémi Verschelde
3a5f45a6d1
Merge pull request #35682 from nathanwfranke/canvas-cull-control-fix
...
Fix bug where canvas culls things at origin with size 0
2020-02-08 14:14:10 +01:00
nathanwfranke
e5cb557b73
Fix bug where Control at origin with 0 size not rendered
...
Make a new method instead to make the code more elegant
Move Function down a bit
2020-02-07 14:43:27 -06:00
Rémi Verschelde
da411d1625
Workaround WebM playback bug after AudioServer latency fixes
...
af9bb0ea15
fixed AudioServer's
`get_output_delay()` (which used to always return 0) while renaming it
to `get_output_latency()`. It now returns the latency from the
AudioDriver, which can be non-0.
While this was a clear bugfix, it broke playback for WebM files without
audio track. It seems like the playback code, even though it queried
the output delay to calculate a time compensation, was designed to work
even though the delay value was actually bogus. Now that it's correct,
it's not working.
As a workaround we comment out uses of the output latency, restoring
the behavior of Godot 3.1.
This code should still be reviewed by someone more versed in video
playback and fixed to properly account for the non-0 driver latency.
Fixes #35760 .
2020-02-07 21:01:05 +01:00
Rémi Verschelde
cdce912de7
Merge pull request #35986 from Chaosus/shader_index
...
Allow non-constants for indexing builtin types in shaders
2020-02-07 20:45:57 +01:00
Rémi Verschelde
a4b8dbdc0b
Merge pull request #35142 from clayjohn/GLES2-add-3d-textures
...
Add support for 3D textures to GLES2
2020-02-07 18:36:24 +01:00
Yuri Roubinsky
8469a383ec
Allow non-constants for indexing builtin types in shaders
2020-02-07 18:41:26 +03:00
Yuri Roubinsky
3a70566b15
Prevent shader crash if invalid builtin used after array member accessor
2020-02-07 15:21:15 +03:00
Marcel Admiraal
f0db13502a
Remove duplicate WARN_PRINT macro.
2020-02-05 11:13:24 +01:00
Marcel Admiraal
5af3b4ca27
Remove duplicate ERR_PRINT macro.
2020-02-05 11:13:24 +01:00
Yuri Roubinsky
2c4367441c
Prevent shader crash when name conflict with "dus" and "__" occured
2020-02-01 12:38:52 +03:00
clayjohn
68915ce20d
Add support for 3D textures to GLES2
2020-01-31 10:01:05 -08:00
Rémi Verschelde
bb6c0d3e8b
doc: Complete documentation for VideoStreams
...
Also quick clean up of the matching C++ files.
2020-01-26 11:29:07 +01:00
clayjohn
eb5cb5d016
Add project setting for max irradiance size
2020-01-25 13:27:13 -08:00
Yuri Roubinsky
3473a195fc
Hides high-level functions from GLES2 shader autocompletion
2020-01-23 12:41:21 +03:00
Rémi Verschelde
46820527de
Merge pull request #35360 from Chaosus/restrict_uint_gles2
...
Disallow uint/uvec usage on GLES2 platform
2020-01-23 10:12:30 +01:00
Rémi Verschelde
37897dba80
Merge pull request #35406 from lawnjelly/ortho-shadow
...
Replace CameraMatrix::get_viewport_size with get_viewport_half_extents, shadow culling with ortho camera and other affected issues
2020-01-22 22:02:09 +01:00
lawnjelly
eaf8e5ce52
Change CameraMatrix::get_viewport_size to get_viewport_half_extents
...
Fixes #26637 .
Fixes #19900 .
The viewport_size returned by get_viewport_size was previously incorrect, being half the correct value. The function is renamed to get_viewport_half_extents, and now returns a Vector2.
Code which called this function has also been modified accordingly.
This PR also fixes shadow culling when using ortho cameras, because the correct input for CameraMatrix::set_orthogonal should be the full HEIGHT from get_viewport_half_extents, and not half the width.
It also fixes state.ubo_data.viewport_size in rasterizer_scene_gles3.cpp to be the width and the height of the viewport in pixels as stated in the documentation, rather than the current value which is half the viewport extents in worldspace, presumed to be a bug.
2020-01-22 18:22:00 +00:00
Rémi Verschelde
4faaf6089a
Remove unused #if 0'ed code
2020-01-21 21:41:54 +01:00
Yuri Roubinsky
4c456ef979
Disallow uint/uvec usage on GLES2 platform
2020-01-20 18:59:35 +03:00
Rémi Verschelde
837adb30fd
Revert "Exposes capture methods to AudioServer + documentation" #30468
...
Reverts the following commits:
- c81ec6f26d40b70283958a4ef3e216fb32cbaf14:
"Exposes capture methods to AudioServer, variable renames for
consistency, added documentation."
- 47c558b98abf842910c780294314326662410cdf:
"Expose audio callbacks as signals."
- dabaa11b3c451e9b8f2cca7e563bd9ec51edb169:
"Fix to make sure the capture buffers are deallocated at shutdown.
Silences warnings."
Some documentation improvements were kept for pre-existing methods.
See rationale for reverting these changes in #30468 .
2020-01-20 13:18:01 +01:00
Yuri Roubinsky
3dea1c725e
Clears completion_class in shaders (may cause troubles if not).
2020-01-19 16:35:54 +03:00
Yuri Roubinsky
1eb8d5e142
Added missing form of array constructor in shaders
2020-01-18 11:41:55 +03:00
Rémi Verschelde
669cd46495
Merge pull request #35215 from clayjohn/multimesh-error
...
Add multimesh format max for proper error checking
2020-01-16 23:06:20 +01:00
Rémi Verschelde
6fd4afa96b
Merge pull request #33615 from raphael10241024/fix_shape_change
...
refresh area2d collision when shape changes
2020-01-16 22:56:16 +01:00
clayjohn
041fa57a88
Add multimesh format max for proper error checking
2020-01-16 13:31:17 -08:00