Commit graph

104 commits

Author SHA1 Message Date
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
Juan Linietsky e799a2ba45
Merge pull request #42201 from clayjohn/Vulkan-new-glow
Optimize Glow with local memory
2020-10-18 18:32:36 -03:00
clayjohn f46932feab Add FOG, RADIANCE, and IRRADIANCE shader overrides 2020-10-18 12:06:51 -07:00
clayjohn 63a34b93aa Optimize Glow with local memory 2020-10-18 11:37:12 -07:00
Juan Linietsky 4467412c9f
Merge pull request #38949 from puchik/ssr-fix-cutoff
Continue tracing screen space reflection after encountering sky
2020-10-18 14:45:33 -03:00
clayjohn 8c21c26fb5 Add aerial perspective to fixed fog 2020-10-17 10:53:07 -07:00
Hugo Locurcio 4357506e64
Fix "fixed" fog drawing in front of volumetric fog with a sky background
This closes #42820.

Co-authored-by: Clay John <claynjohn@gmail.com>
2020-10-15 21:59:08 +02:00
Rafał Mikrut 84a1817a75 Fixes leaks with shader and material 2020-10-12 18:06:47 +02:00
unknown 1d3aec4230 Free a SortShader and a ParticlesCopyShader 2020-10-12 13:25:24 +05:30
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
clayjohn bde2f9b46b Return proper texture view format for decals 2020-10-03 22:56:00 -07:00
Rémi Verschelde 3e78963bb9
Fix typos with codespell
Using codespell 1.17.1.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2020-09-18 13:44:25 +02:00
Haoyu Qiu 38147da819 Fixes crash when saving scene 2020-09-13 16:15:46 +08:00
Lyuma 2f888d2987 Fix ATTENUATION and implement SHADOW_ATTENUATION. 2020-09-10 15:45:56 -07:00
clayjohn fbff7d424b Set repeat in all 3 dimensions in 3d textures 2020-09-09 17:59:51 -07:00
reduz a674da4eec Implement 3D textures as import and resource format. 2020-09-09 13:50:21 -03:00
Rémi Verschelde 53d83c4575
Merge pull request #41781 from AnilBK/fix-typo
Fixed Some typos.
2020-09-07 08:31:51 +02:00
reduz d0bddf53c5 Implement manual particle emission and particle sub emitters. 2020-09-06 10:29:27 -03:00
Anilforextra 5705e0d309 Fixed Some typos. 2020-09-05 14:31:56 +05:45
Rémi Verschelde 6a03aed5a4
Merge pull request #40958 from clayjohn/VULKAN-shadow-noise
Improve the quick hash function for all GPUs
2020-09-04 10:53:01 +02: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
Rémi Verschelde 23ce1dbfd5
Merge pull request #41668 from clayjohn/GLOW-HQ
Add high quality glow mode
2020-09-01 21:04:07 +02:00
JFonS 8ab510a130 Fix typo in SDF jumpflood shader 2020-09-01 14:40:59 +02:00
clayjohn 8da3c739bf Add high quality glow mode 2020-08-31 23:16:41 -07:00
clayjohn d069cc9cf2 Fix recent glow regressions 2020-08-29 11:27:43 -07:00
Yetizone 118a7bc53f rasterizer_rd.cpp: Correct small typo 2020-08-27 12:44:18 +03: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
clayjohn cf07a58a5f Improve the quick hash function for all GPUs 2020-08-01 17:48:40 -07: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
Rémi Verschelde a5fb445121
Merge pull request #40450 from asmaloney/spelling
Fix spelling & grammar in comments, docs, and messages
2020-07-21 22:14:04 +02:00
Andy Maloney 4dda62f591 Fix spelling & grammar in comments, docs, and messages 2020-07-21 15:17:23 -04:00
Andy Maloney 8b949918b1 Fix spelling of a var, a struct, and message output 2020-07-17 12:02:06 -04:00
clayjohn a54f93c169 Add incremental update mode to sky 2020-07-11 00:10:15 -07:00
Rémi Verschelde 9000e59650
Merge pull request #40016 from akien-mga/environment-code-cleanup
Environment: Refactor code for readability + more
2020-07-01 16:28:48 +02:00
Rémi Verschelde 372136fe75 Environment: Refactor code for readability + more
- Makes all boolean setters/getters consistent.
- Fixes bug where `glow_hdr_bleed_scale` was not used.
- Split CameraEffects to their own source file.
- Reorder all Environment method and properties declarations,
  definitions and bindings to be consistent with each other
  and with the order of property bindings.
- Bind missing enum values added with SDFGI.
- Remove unused SDFGI enhance_ssr boolean.
- Sync doc changes after SDFGI merge and other misc changes.
2020-07-01 14:44:45 +02:00
Yuri Roubinsky c554d9e556 Added const qualifier support for function arguments in shaders 2020-07-01 12:55:00 +03:00
Juan Linietsky b1aa24ea3c Slight occlusion improvements. 2020-06-28 09:11:21 -03:00
qarmin 997d367b51 Fixes recently introduced shader leaks 2020-06-27 15:08:20 +02: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
Yuri Roubinsky 636a9d9f50 Implemented global const array to shaders 2020-06-19 16:04:54 +03:00
Yuri Roubinsky 1a7e101324 Fix shader's length() function parsing in expressions 2020-06-03 19:39:48 +03:00
Andrii Doroshenko (Xrayez) 69d5de632e Split Geometry singleton into Geometry2D and Geometry3D
Extra `_2d` suffixes are removed from 2D methods accoringly.
2020-05-27 14:28:34 +03:00
Arman 48a59e6c4a Continue tracing screen space reflection after encountering sky
Instead of breaking the whole trace when encountering the sky/camera far clip, continue tracing and check if "hits" are sky/far clip or not. Prevents some objects not being reflected due to gaps.
2020-05-22 00:12:42 -07:00
Rémi Verschelde c74d65cec8 GLSL: Change shader type specifier from [vertex] to #[vertex]
The added `#` prevents clang-format from misinterpreting the meaning
of this statement and thus messing up the formatting of the next
lines up until the first `layout` statement.

Similarly, a semicolon is now enforced on `versions` defines to
prevent clang-format from messing up formatting and putting them
all on a single line. Note: In its current state the code will
ignore chained statements on a single line separated by a semicolon.

Also removed some extraneous lines missed in previous style changes
or added by mistake with said changes (e.g. after uniform definitions
that clang-format messes up somewhat too, but we live with it).
2020-05-18 10:58:14 +02: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