Commit graph

220 commits

Author SHA1 Message Date
clayjohn
131036a5ef Only setup depth framebuffer properties when not rendering ReflectionProbes 2023-01-12 16:19:12 -08:00
Rémi Verschelde
1f171ff18b
Merge pull request #71261 from clayjohn/RD-alpha-aa
Take alpha antialising options into account when setting up materials
2023-01-12 08:19:16 +01:00
clayjohn
0ae567b00a Take alpha antialising options into account when setting up materials
This restores the functionality of the alpha antialising options
2023-01-11 21:29:36 -08:00
Rémi Verschelde
0abd60b953
Merge pull request #71130 from clayjohn/RD-normal-roughness
Fix multiple issues that make the normal roughness texture unusable
2023-01-12 01:01:24 +01:00
clayjohn
89766848de Fix multiple issues that make the normal roughness texture unusable 2023-01-09 11:56:36 -08:00
clayjohn
e5abca4990 Only disable depth writing in opaque pipelines
This restores the behaviour of the visibility fade
2023-01-09 09:45:43 -08:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
clayjohn
062fb8b0dc Ignore depth draw optimization when using depth draw alpha prepass
This is necessary as the scene shader still uses alpha in this case so we can't discard fragments that weren't written to the depth buffer
2023-01-03 12:33:07 -08:00
Bastiaan Olij
8bf16b0ce5 Fix errors related to reflection probe now using a render buffers object 2022-12-26 22:23:22 +11:00
Rémi Verschelde
f064898956
Merge pull request #70253 from BastiaanOlij/cleanup_sky_render
Cleanup and improve sky render
2022-12-23 23:44:02 +01:00
Rémi Verschelde
d8a0382e3f
Merge pull request #70476 from BastiaanOlij/move_sdfgi_init
Move SDFGI update logic into clustered renderer
2022-12-23 23:43:56 +01:00
Rémi Verschelde
2e07477751
Merge pull request #70214 from Ansraer/speed-maybe
[4.x] Use depth prepass to increase opaque render performance
2022-12-23 23:43:50 +01:00
Ansraer
d44a91c2f7 use depth prepass to increase performance 2022-12-23 17:15:46 +01:00
Bastiaan Olij
65ca9e6924 Move SDFGI update logic into clustered renderer 2022-12-24 00:00:11 +11:00
Rémi Verschelde
1cab6c91e9
Merge pull request #69998 from BastiaanOlij/sorting-pivot-4
Added options for sorting transparent objects (port of PR #63040)
2022-12-23 09:47:24 +01:00
Bastiaan Olij
e886a7af81 Cleanup and improve sky render 2022-12-23 19:45:19 +11:00
Bastiaan Olij
6f4f38db07 Added options for sorting transparent objects (port of PR 63040) 2022-12-23 19:30:33 +11:00
clayjohn
41021b07be Avoid updating particles during 2D rendering
In 2D the particle uniform set isn't obtained until the render pass. So in 2D just avoid rendering if not updated yet.
2022-12-22 12:04:34 -07:00
Rémi Verschelde
676f60b0cc
Merge pull request #70132 from clayjohn/RT-update
Implement render_target_was_used API so that Viewports can properly check if they have been used.
2022-12-17 12:26:51 +01:00
clayjohn
1b330820bf Implement render_target_was_used API so that Viewports can properly check if they have been used.
For the RD renderer, this does not work for Viewports used in scene shaders yet
2022-12-16 09:50:45 -08:00
Lyuma
80dea918c4 Flip culling when rendering a camera with negative scale 2022-12-15 16:12:10 -08:00
Yuri Rubinsky
56954485ed Refactor ShaderData & fix the sorting of shader uniforms 2022-12-15 10:02:59 +03:00
NumbuhFour
1b09fd5410 Implement CAMERA_VISIBLE_LAYERS as built-in shader variable 2022-12-03 22:41:27 -08:00
Yuri Rubinsky
acaf38cfbc Expose BarrierMask as flags enum in RenderingDevice 2022-11-22 09:45:20 +03:00
clayjohn
21ac6d7d8e Finish implementing Canvas Background mode 2022-11-17 12:51:26 -08:00
Rémi Verschelde
64d7ce2a6e
Merge pull request #68628 from clayjohn/shadows
Implement is_animated and casts_shadows
2022-11-15 10:27:29 +01:00
Markus Sauermann
3b14f0334c Remove redundant Variant-types initializations 2022-11-14 19:35:19 +01:00
Rémi Verschelde
63cded6a85
Merge pull request #61884 from Calinou/alpha-hash-use-opaque-pipeline
Use opaque rendering pipeline for alpha hash materials
2022-11-14 11:08:35 +01:00
clayjohn
4abf47f407 Implement is_animated and casts_shadows
This allows the renderer to correctly decide when to update shadow maps

This PR also adds TIME to a few missing places
2022-11-13 14:09:21 -08:00
clayjohn
aaaa4b8d68 Properly set TIME shader uniform when rendering shadows 2022-11-12 10:51:02 -08:00
clayjohn
a7adc7ab37 Ensure user shader is used in depth pass when point size is used 2022-11-10 15:26:07 -08:00
Rémi Verschelde
3312d0a87b
Merge pull request #67907 from clayjohn/RD-model-matrix
Correctly rename to read_model_matrix when using shader builtins that rely on model matrix
2022-10-31 11:07:24 +01:00
Gordon MacPherson
56df8d5f19 Fix EXE_BAD_ACCESS caused by optional argument
This argument is now non optional, but this never hits the same bad access.
I voted to simplify the code here since the argument is never used optionally in our codebase.
2022-10-26 19:33:35 +01:00
clayjohn
020ac29fc3 Correctly rename to read_model_matrix when using shader builtins that rely on model matrix 2022-10-26 09:45:35 -07:00
TechnoPorg
b04350828e Use radial distance for making LOD decisions.
Previously, only forward basis distance from the camera was used.
This means that unnecessarily high LOD levels were used for objects located to the side of the camera.
The distance from the camera origin is now used, independently of direction.
2022-10-12 07:21:42 -06:00
Robbie Cooper
79d3e090cd Vulkan Clustered: Fix culling of negatively-scaled objects
Negatively scaled objects should be mirrored. This is already implemented, but it breaks when mirrored and non-mirrored instances of the same object are visible together.

It turns out that the code that skips-over repeats in `RenderForwardClustered::_render_list_template` also skips the code that accounts for the culling mode of mirrored objects.

The solution here is to consider the `mirror` flag when determining repeats. This might result in more draw commands than necessary since a mirrored object can split a group of non-mirrored instances in two.

This problem doesn't appear in the mobile renderer because the repeat optimization isn't implemented there yet.

The problem still appears in MultiMeshInstance3D in *all* renderers.

Fixes #62879 and #58546.
2022-10-10 03:20:59 -04:00
Rémi Verschelde
17c62a692e
Merge pull request #66756 from BastiaanOlij/fix_ssr
Fixing artifacts in SSR
2022-10-06 22:27:49 +02:00
Rémi Verschelde
d935235e9c Merge pull request #66922 from BastiaanOlij/fix_direct_shadow
Make sure atlas rect for directional lights is calculated using floats
2022-10-05 13:38:24 +02:00
Bastiaan Olij
aba356e882 Make sure atlas rect for directional lights is calculated using floats 2022-10-05 22:12:57 +11:00
Rémi Verschelde
ecd4ab1e14 Merge pull request #66683 from clayjohn/SRGB-canvasitem
Default CanvasItem materials to use sRGB space for uniform colors
2022-10-05 11:44:52 +02:00
Bastiaan Olij
c7656978ba Adding getters to RenderTarget and implementing override functionality for XR 2022-10-05 11:37:49 +11:00
Bastiaan Olij
d09ad714bf Fixing artifacts in SSR 2022-10-04 23:47:13 +11:00
Bastiaan Olij
02b0c22e38 Moving SSEffects settings into class 2022-10-04 11:03:36 +11:00
Bastiaan Olij
ddc4ae1175 Move cluster builder, sdfgi and gi structures to clustered renderer, move light and probe elements into storage and reorganise our render_scene method. 2022-10-04 11:03:32 +11:00
clayjohn
3126619aa5 Update Instance flags in shaders to match instance flags in engine 2022-10-02 21:37:06 -07:00
clayjohn
06d0e56559 Default CanvasItem materials to not convert uniform colors to linear space.
The 2D renderer in Godot is totally in sRGB space so it is appropriate
to keep 2D uniform colors in sRGB space
2022-09-30 15:15:11 -07:00
Rémi Verschelde
67961d875d Merge pull request #66178 from clayjohn/double-precision-rendering
Emulate double precision for regular rendering operation when REAL_T_IS_DOUBLE
2022-09-30 09:59:45 +02:00
bruvzg
ea1848ce0a
Use constexpr in the conditions with template parameters and sizeofs to suppress C4127 warnings. 2022-09-29 10:38:21 +03:00
clayjohn
aac8d5c406 Properly initialize motion vectors offset when motion vectors are disabled.
This fixes an uninitialized memory bug that caused particles to fail in non-LTO builds
2022-09-22 20:36:01 -07:00
clayjohn
27a3014f50 Emulate double precision for regular rendering operation.
We calculate the lost precision on the CPU and pass it into the GPU
so that it can calculate an error-corrected version of the vertex position
2022-09-20 23:40:01 -07:00