Commit graph

641 commits

Author SHA1 Message Date
bruvzg
397545e97f Add runtime GLES2 / Vulkan context selection. 2019-12-12 13:48:47 +01:00
bruvzg
142188639c Add static Vulkan loader.
Initial Vulkan support for Windows.
Initial Vulkan support for macOS.
2019-12-12 13:19:45 +01:00
Juan Linietsky
e7c33ca141 Moved the shader source compilation code outside RenderingDevice and Vulkan 2019-12-12 13:05:25 +01:00
Juan Linietsky
f5f3d820e0 Replaced GLSLang reflection by SPIRV-Reflect, eventually allowing to move GLSLang out. 2019-12-12 13:01:23 +01:00
Juan Linietsky
ffbc9823d9 Custom material support seems complete. 2019-12-12 12:54:09 +01:00
Juan Linietsky
55426a3ab4 Completed material/2D shader support (missing SCREEN_TEXTURE) 2019-12-12 12:21:24 +01:00
Juan Linietsky
1dd402d083 Changes to material required to add custom shaders in RD renderer 2019-12-12 12:01:50 +01:00
Juan Linietsky
7c2bb1ceff Modified light rendering to make it more compatible.
Modified polygon management to make it more compatible with MoltenVK
2019-12-12 12:01:48 +01:00
Juan Linietsky
36b8c9c1bc Use a special sampler for 2D shadows, so they are softer 2019-12-12 11:49:31 +01:00
Juan Linietsky
2e9c7ce62e 2D lighting seems more or less complete. 2019-12-12 11:49:19 +01:00
Juan Linietsky
75701f756f Normalmapping and Specularmapping working in 2D engine
Added support for Sprite, AnimatedSprite and Polygon2D (should add for tileset eventually).
2019-12-12 11:49:14 +01:00
Juan Linietsky
7d87e11e99 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.
2019-12-12 11:46:35 +01:00
Juan Linietsky
490fd93995 Fix crash on import. 2019-12-12 11:44:08 +01:00
Juan Linietsky
823feb8310 Added ability to retrieve back textures stored on GPU 2019-12-12 11:44:06 +01:00
Juan Linietsky
667785e474 Bugfixes and ability to better specify filter and repeat modes everywhere.
Removes antialiased flag for draw_* methods.
2019-12-12 11:33:08 +01:00
Juan Linietsky
017bcf9be4 basic 2D engine is more or less working with Vulkan, including editor.
Still a lot to do
2019-12-12 11:06:23 +01:00
Juan Linietsky
179145aaf5 Basic 2D engine is more or less working, needs more work for editor to be usable. 2019-12-12 10:57:32 +01:00
Juan Linietsky
e2ffdb2d01 A lot of progress with canvas rendering, still far from working. 2019-12-12 10:50:00 +01:00
Juan Linietsky
d128ef1ecb 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
2019-12-12 10:15:57 +01:00
Juan Linietsky
d4d470bc97 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
2019-12-12 10:05:14 +01:00
Juan Linietsky
ee921965be Modify RenderingDevice to use RIDs, now that they are O(1) 2019-12-12 09:23:03 +01:00
Juan Linietsky
962382ac5c 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.
2019-12-12 08:55:15 +01:00
Juan Linietsky
b2b7a41318 Added support for push constants 2019-12-12 08:53:55 +01:00
Juan Linietsky
90e61a5632 Added default values where missing. 2019-12-12 08:50:48 +01:00
Juan Linietsky
c5e77a1b2f 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/)
2019-12-12 08:50:47 +01:00
Rémi Verschelde
2845e6a21a
Merge pull request #34040 from qarmin/unused_variable_more_precise_numbers
Removed unused variables, add some constants numbers
2019-12-10 08:25:31 +01:00
Rafał Mikrut
ed1c4bc77d Removed unused variables, add some constants numbers 2019-12-10 05:13:02 +01:00
Rémi Verschelde
e77c34ab4a
Merge pull request #34061 from Chaosus/fix_shader_const
Fix expressions for global constants in shaders
2019-12-03 08:53:55 +01:00
Rémi Verschelde
10bae7c05b
Merge pull request #33857 from nekomatata/polygon-2d-antialiasing
Fixed antialiased option for Polygon2D
2019-12-03 07:51:16 +01:00
Yuri Roubinsky
8b8faf03d5 Fix expressions for global constants in shaders 2019-12-02 19:00:21 +03:00
PouleyKetchoupp
e6ebc43d72 Fixed antialiased option for Polygon2D / Line2D
Polygon2D:
The property wasn't used anymore after switching from canvas_item_add_polygon() to canvas_item_add_triangle_array() for drawing.

Line2D:
Added the same property as for Polygon2D & fixed smooth line drawing to use indices correctly.

Fixes #26823
2019-11-28 22:57:27 +01:00
Bojidar Marinov
2952dc3fe2
Fix crash when disabling a YSort node
Fixes #33932
2019-11-27 10:47:11 +02:00
Marcel Admiraal
6c3be2ca74 Fix Visual Studio throwing C4146 warning. 2019-11-18 15:14:04 +00:00
PouleyKetchoupp
530665197f Fixed Particles restart after visibility has been set to off and on again
Make sure particles are processed during the same frame when visibility is set to on, in case they are still active from before and need to be restarted.

Fixed #33476
2019-11-09 09:51:17 +01:00
Rémi Verschelde
341f37aaed
Merge pull request #33153 from raphael10241024/fix_occluder
fix occluders positions error under canvas_layer
2019-11-05 14:41:28 +01:00
Yuri Roubinsky
5e44b5be81 Prevents usage of unsupported texture shader types in GLES2 2019-11-03 13:41:15 +03:00
Yuri Roubinsky
6b7f8558d9 Removed switch operator from GLES2 shader back-end 2019-11-02 12:43:32 +03:00
Yuri Roubinsky
1b003f3d64 Prevents shader crash on GLES2 if unsupported built-in has been used 2019-10-31 09:21:44 +03:00
Yuri Roubinsky
76eb486413 Added check if field name in the shader is equal to builtin 2019-10-29 15:37:19 +03:00
RaphaelHunter
c4cea10402 fix occluders positions error under canvas_layer, close #32880 2019-10-29 14:51:58 +08:00
Yuri Roubinsky
ef6161532d Fix shader crash if non-boolean expression inserted into "if" 2019-10-28 08:35:33 +03:00
Hugo Locurcio
701581d1d3
Improve error messages related to shader_type
The list of allowed shader types is now displayed if any
`shader_type`-related error is emitted.

This makes it easier to remember which shader types are allowed
when creating a new shader.
2019-10-26 17:43:14 +02:00
clayjohn
62fb462165 Properly free sky and lightmap caches in multithreaded server 2019-10-13 09:31:00 -07:00
Yuri Roubinsky
ada4bcbe30 Fix invalid autocompletion pasting of shader param name 2019-10-08 18:33:22 +03:00
Rémi Verschelde
45577e4233
Merge pull request #32571 from DavidSichma/rect_flip
Correctly flip texture src region
2019-10-08 16:15:45 +02:00
Yuri Roubinsky
76324bec8d Prevent shader crash if name of variable overrides function name 2019-10-06 20:35:41 +03:00
Yuri Roubinsky
d9087e1b44 Prevent shader crash if function call been used on constant 2019-10-06 18:20:05 +03:00
Yuri Roubinsky
5a5a062d61 Fix few redefinition name errors for variable/param/function in shaders 2019-10-06 17:27:28 +03:00
David Sichma
f73e1fae37 Correctly flip texture src region 2019-10-05 16:51:06 +02:00
Yuri Roubinsky
1472fca951 Removed unnecessary shader error log messages 2019-10-02 12:37:22 +03:00