Commit graph

44 commits

Author SHA1 Message Date
reduz 2787ad65be RenderingServer reorganization 2020-12-04 18:39:46 -03:00
reduz e93b2242c2 Reorganize rendering server.
-Made RenderingServerScene abstract, allowing reimplementation
-RenderingServerRaster -> RenderingServerDefault, but this class is going away soon.
2020-12-03 19:01:01 -03: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
Aaron Franke 02161aad5a
Remove empty lines around braces with the formatting script 2020-11-16 23:38:11 -05:00
reduz 127458ed17 Reorganized core/ directory, it was too fatty already
-Removed FuncRef, since Callable makes it obsolete
-Removed int_types.h as its obsolete in c++11+
-Changed color names code
2020-11-07 20:17:12 -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
clayjohn 8c21c26fb5 Add aerial perspective to fixed fog 2020-10-17 10:53:07 -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
Lyuma 2f888d2987 Fix ATTENUATION and implement SHADOW_ATTENUATION. 2020-09-10 15:45:56 -07: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 6a5ecfdef1 Restored fog (non volumetric).
Uses a simpler and more intuitive implementation based on density.
Its less flexible than before, but its easier to get nice results.
2020-08-13 22:09:22 -03:00
Juan Linietsky 079ca220e1 Added volumetric fog effect. 2020-08-13 11:28:45 -03:00
Brian Semrau 63dfe79fbe Fixed next_pass materials not being drawn 2020-07-28 10:51:41 -04:00
Juan Linietsky ee7c98da7c Refactor light clustering
Move from high end to shared, so all renderers use clustering.
2020-07-22 20:39:51 -03: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 0ee0fa42e6 Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14 21:57:34 +02:00
Rémi Verschelde 07bc4e2f96 Style: Enforce separation line between function definitions
I couldn't find a tool that enforces it, so I went the manual route:
```
find -name "thirdparty" -prune \
  -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \
  -o -name "*.glsl" > files
perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files)
misc/scripts/fix_style.sh -c
```

This adds a newline after all `}` on the first column, unless they
are followed by `#` (typically `#endif`). This leads to having lots
of places with two lines between function/class definitions, but
clang-format then fixes it as we enforce max one line of separation.

This doesn't fix potential occurrences of function definitions which
are indented (e.g. for a helper class defined in a .cpp), but it's
better than nothing. Also can't be made to run easily on CI/hooks so
we'll have to be careful with new code.

Part of #33027.
2020-05-14 16:54:55 +02: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
qarmin d27f640a32 Fixes memory leak with lightmap part 2 2020-05-12 10:11:17 +02:00
qarmin 84867275bb Fix memory leak with light maps 2020-05-11 21:04:39 +02:00
Juan Linietsky 1bea8e1eac New lightmapper
-Added LocalVector (needed it)
-Added stb_rect_pack (It's pretty cool, we could probably use it for other stuff too)
-Fixes and changes all around the place
-Added library for 128 bits fixed point (required for Delaunay3D)
2020-05-10 15:59:09 -03:00
clayjohn 34ee273e20 Calculate sun diameter even when not using shadows 2020-05-01 22:22:35 -07:00
Rémi Verschelde 17304f1aae
Merge pull request #37949 from reduz/implement-global-shader-uniforms
Implement global and per instance shader uniforms.
2020-04-17 18:36:06 +02:00
Rémi Verschelde cfda0e3770
Merge pull request #37953 from clayjohn/VULKAN-sky-sun-size
Add light size to Sky Shaders
2020-04-17 18:35:45 +02:00
clayjohn 7cd2ff309c Add light size to Sky Shaders 2020-04-17 09:32:24 -07:00
Juan Linietsky 0e1c66d9fc Implement global and per instance shader uniforms.
Adds two keywords to shader language for uniforms:
-'global'
-'instance'

This allows them to reference values outside the material.
2020-04-17 12:35:41 -03:00
clayjohn 0ff929a926 Use sky properly for ambient and reflections 2020-04-16 23:45:30 -07:00
clayjohn 61d86190e0 Fix texture check in decal setup 2020-04-15 12:06:02 -07:00
Juan Linietsky 6f293ed795 Add support for projectors in spot and omni lights. 2020-04-14 17:05:45 -03:00
Rémi Verschelde 5e5103f460
Merge pull request #37861 from reduz/implement-decals
Implement decals
2020-04-14 17:13:20 +02:00
Juan Linietsky 5944eb6e7f Implement decals
Also implemented decal atlas, so projectors and other stuff can be added.
Sidenote: Had to make RID hashable, so some unrelated includes changed
in order to include it in hashfuncs.h
2020-04-14 11:13:34 -03:00
Rémi Verschelde 06748a2b5f
Merge pull request #37749 from clayjohn/Vulkan-improved-ss
Add vogel filter and settings to soft shadows
2020-04-13 00:39:37 +02:00
Juan Linietsky a57dc398db Implement MSAA 2020-04-12 15:33:57 -03:00
clayjohn 621f6f09a8 Add proper quality settings to soft shadows 2020-04-10 23:09:17 -07:00
Juan Linietsky 6a730ffeab Support light size and soft shadows 2020-04-09 15:11:15 -03: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
Rémi Verschelde 6a38ce1b31
Merge pull request #37512 from reduz/implement-ssr
Re-Added screen space reflection.
2020-04-02 17:17:27 +02:00
Juan Linietsky 87c658b304 Re-Added screen space reflection. 2020-04-02 11:25:21 -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
Renamed from servers/visual/rasterizer_rd/rasterizer_scene_high_end_rd.cpp (Browse further)