Commit graph

195 commits

Author SHA1 Message Date
myaaaaaaaaa
6f88392d02 Move some worker_thread_pool.h includes out of header files 2023-02-13 14:02:01 -05:00
Markus Sauermann
826e54fa73 Some code simplifications
1. `number_width` isn't used later
2. `return_type` is used only once
3. AudioServer::get_singleton()->get_channel_count() always returns a channel_count of 1 or larger
4. negative `aa->backward` conditional
5. `current_canvas` == `find_world_2d()->get_canvas()`
6. identical if `render_shadows`
2023-02-07 14:30:16 +01:00
Bastiaan Olij
8c77aea9ab Expose EYE_OFFSET to gdshader code 2023-02-01 12:39:13 +11:00
Bastiaan Olij
43a63db7cf Fix SSAO/SSIl being applied to reflection probes 2023-01-30 15:20:27 +11:00
Rémi Verschelde
6f7793ce1a
Merge pull request #71581 from clayjohn/dependency-changed
Flag dirty dependencies when GeometryInstance dependencies change in renderer
2023-01-26 22:57:32 +01:00
Rémi Verschelde
4b0363312e
Merge pull request #71455 from BastiaanOlij/fix_stereo_screen_depth
Make screen texture and depth texture work in Multiview
2023-01-26 01:11:02 +01:00
Henrique Coura
28d8cad02e RenderForwardMobile - add dependency tracker info on geometry create 2023-01-25 15:25:49 -03:00
Bastiaan Olij
85c478e170 Make screen texture and depth texture work in Multiview 2023-01-25 13:35:01 +11:00
kobewi
615c517034 Use range iterators in LocalVector loops 2023-01-21 18:44:42 +01:00
clayjohn
49bebf2bfb Sort decals and lights based on camera origin
Also implement sort_offset for decals

Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2023-01-20 09:58:17 -08:00
clayjohn
faea9f5c10 Remove SCREEN_TEXTURE, DEPTH_TEXTURE, and NORMAL_ROUGHNESS_TEXTURE
in favour of texture hints
2023-01-18 19:52:47 -08:00
clayjohn
c4a8284dec Flag dirty dependencies when GeometryInstance dependencies change in renderer
Normally dependencies are only set dirty when changed during culling, but that misses changes that happen in the renderer (like a new shader being set in a material)
2023-01-17 12:39:13 -08:00
Bastiaan Olij
478c37deb8 Improving communication of scaling settings to renderer implementation 2023-01-13 12:54:15 +11: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
clayjohn
89766848de Fix multiple issues that make the normal roughness texture unusable 2023-01-09 11:56:36 -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
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
1dad415131
Merge pull request #70300 from RandomShaper/depth_format
Ensure depth buffer format picked actually supports full intended usage
2022-12-19 17:11:24 +01:00
Pedro J. Estébanez
d8283550e6 Ensure depth buffer format picked actually supports full intended usage 2022-12-19 16:23:33 +01: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
5c83e95103
Merge pull request #70016 from Chaosus/refactor_rd_shader_data
fixed https://github.com/godotengine/godot/issues/69949
2022-12-15 20:28:26 +03:00
Yuri Rubinsky
56954485ed Refactor ShaderData & fix the sorting of shader uniforms 2022-12-15 10:02:59 +03:00
clayjohn
7b0dd7a3e6 Initialize light index push constants to 0xFFFFFFFF instead of 0xFFFF 2022-12-14 15:20:54 -08: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
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
a1c3591461 Request redraw in OpenGL3 and mobile renderers when TIME used in shader 2022-11-08 22:52:11 -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
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
02b0c22e38 Moving SSEffects settings into class 2022-10-04 11:03:36 +11:00