Commit graph

25 commits

Author SHA1 Message Date
Joosep Jääger 16567321ba Added constants PI, TAU and E to the shader language 2021-05-25 12:15:08 +03:00
reduz 90056460ad Implement Particle Trails
-Enable the trails and set the length in seconds
-Provide a mesh with a skeleton and a skin
-Or, alternatively use one of the built-in TubeTrailMesh/RibbonTrailMesh
-Works deterministically
-Fixed particle collisions (were broken)
-Not working in 2D yet (that will happen next)
2021-04-30 17:38:02 -03:00
reduz 906882ee66 Split particle shader entry points
* Particle shaders now have start() and process()
* Particle collision happens between them.
* The RESTART property is kept, so porting an old shader is still possible.

This fixes the problem of particle collisions not functioning on the first particle frame.
2021-04-17 12:22:55 -03:00
reduz d3b49c416a Refactor GLSL shader compilation
-Used a more consistent set of keywords for the shader
-Remove all harcoded entry points
-Re-wrote the GLSL shader parser, new system is more flexible. Allows any entry point organization.
-Entry point for sky shaders is now sky().
-Entry point for particle shaders is now process().
2021-04-14 11:37:52 -03:00
Yuri Roubinsky ef941a6500 Renamed emit_particle to emit_subparticle shader function 2021-01-12 09:41:08 +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
Marcel Admiraal b4a190e0bc Consistently use normal_map 2020-12-29 08:04:19 +00: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
reduz 1bcf3c305b Implement signed distance fields for 2D shaders 2020-11-26 10:49:50 -03:00
Marios Staikopoulos e5d7c7d5fc Alpha Hash and Alpha2Coverage Implementation 2020-11-02 20:11:20 -08:00
Juan Linietsky 6e5f137c01
Merge pull request #41415 from clayjohn/VULKAN-shader-overrides
Add FOG, RADIANCE, and IRRADIANCE shader overrides
2020-10-18 18:33:41 -03:00
clayjohn f46932feab Add FOG, RADIANCE, and IRRADIANCE shader overrides 2020-10-18 12:06:51 -07:00
reduz 26f5bd245c Implement GPU Particle Collisions
-Sphere Attractor
-Box Attractor
-Vector Field
-Sphere Collider
-Box Collider
-Baked SDF Collider
-Heightmap Collider
2020-10-09 13:25:47 -03:00
Pablo Escobar 1300fc7307 Add METALLIC to light() built-ins 2020-10-04 04:16:16 +02:00
Lyuma 2f888d2987 Fix ATTENUATION and implement SHADOW_ATTENUATION. 2020-09-10 15:45:56 -07:00
reduz d0bddf53c5 Implement manual particle emission and particle sub emitters. 2020-09-06 10:29:27 -03:00
Juan Linietsky f5f27bacdb Re-Implement GPU particles on master.
-No new features yet
-Unlike godot 3.x, sorting happens using GPU
2020-09-02 21:37:11 +02:00
clayjohn 9d341acf2d Add fog to sky shaders 2020-08-19 22:58:14 -07:00
Juan Linietsky 201d606b3d Addition of SDFGI for open world global illumination
Move GI to a deferred pass
2020-06-26 11:06:48 -03:00
Rémi Verschelde 0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.

This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.

There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).

Part of #33027.
2020-05-14 16:54:55 +02:00
clayjohn 7cd2ff309c Add light size to Sky Shaders 2020-04-17 09:32:24 -07:00
Juan Linietsky 4ffc0d6b3f Refactored shadowmapping.
- Made shadow bias size independent, so it will remain when changing light or camera size.
- Implemented normal offset bias, which greatly enhances quality.
- Added transmission to subsurface scattering
- Reimplemented shadow filter modes

Closes #17260
2020-04-08 11:19:43 -03:00
Juan Linietsky c54f80d35c Re-implement subsurface scattering.
The size settings are more "just works", with default scale and depth scale
values that don't need much tweaking.

Additionally, a "skin" mode was added so skin looks better.
EDIT: Cleaned up SSR filter shader a bit.
2020-04-04 11:44:28 -03:00
lupoDharkael 95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
Juan Linietsky a6f3bc7c69 Renaming of servers for coherency.
VisualServer -> RenderingServer
PhysicsServer -> PhysicsServer3D
Physics2DServer -> PhysicsServer2D
NavigationServer -> NavigationServer3D
Navigation2DServer -> NavigationServer2D

Also renamed corresponding files.
2020-03-27 15:21:27 -03:00