Commit graph

169 commits

Author SHA1 Message Date
clayjohn e8bb0a5719 Add adjustments and color correction to Compatibility renderer 2024-04-25 12:24:51 -07:00
Bastiaan Olij 509d8dba2a Add reflection probe support to compatibility renderer using 2 probe approach. 2024-04-09 16:53:28 +10:00
Thaddeus Crews 9903e6779b
Enforce template syntax typename over class 2024-03-07 22:39:09 -06:00
Rémi Verschelde 652438a395
Merge pull request #87360 from BastiaanOlij/gles_glow
Implement glow/bloom on compatibility renderer
2024-02-20 23:59:48 +01:00
Bastiaan Olij aa260e5f3d Implement glow/bloom on compatibility renderer 2024-02-19 13:29:43 +11:00
Bastiaan Olij 5a98845655 Implement hooks into renderer 2024-02-18 21:54:21 +11:00
Eidolon 08f4560e69 Add optional depth fog 2024-02-17 22:39:34 -03:00
Erik Johnson eab95698cd
Fix shadows for billboarded Sprite3D's 2024-02-13 10:36:38 +01:00
clayjohn efb1cbaad4 Add GLES3 infrastructure for lightmap baking in the compatibility backend 2024-01-24 17:13:30 -08:00
Dominic Austria c8bdd1d774 implement overdraw, lighting, and unshaded debug draw modes for opengl 2024-01-08 17:34:09 -05:00
clayjohn 43cf21cb71 Use best fit normals for storing screen space normals 2023-12-21 14:41:29 -07:00
Yuri Sizov 44d544fc98 Merge pull request #85120 from dsnopek/gl-lightmap
OpenGL: Implement rendering of lightmaps
2023-12-08 15:23:27 +01:00
David Snopek 749f60ee36 OpenGL: Implement rendering of lightmaps 2023-12-04 18:34:06 -06:00
Bastiaan Olij caddce14dd Add 3D MSAA and scaling support to GLES3 2023-12-05 10:01:00 +11:00
jsjtxietian 26d32554bd Pass viewport size to shadow pass instead of using vector2i(1,1) 2023-10-26 15:25:22 +08:00
clayjohn cb7200b028 Implement 3D shadows in the GL Compatibility renderer 2023-09-28 09:39:26 +02:00
clayjohn 36a005fafc
Add RENDERING_INFO parameters to GL Compatibility renderer
This also fixes RENDERING_INFO_TOTAL_PRIMITIVES_IN_FRAME for the RD renderers as it was incorrectly reporting vertex/index count at times

This also adds memory tracking to textures and buffers to catch memory leaks.

This also cleans up some memory leaks that the new system caught.
2023-06-16 09:10:00 +02:00
Bradley Clemetson 2302c7102f
Allow for external python scripts to call the build python headers via external scripts
Change GLES3 to not use a relative path
Make the parameters more explicit and ensure the shaders generated are not using relative paths
2023-03-19 21:18:52 -07:00
David Snopek bd9dfcff3d Fix sky rendering with multiview in OpenGL 2023-01-31 11:36:14 -06: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 5b5cd2b98b Remove high quality glow as it is not any higher quality than regular glow 2022-12-13 10:15:45 -08:00
clayjohn 975a8f9ada Clean up specialization constants in OpenGL scene renderer
Also add support for disabling omni and spot lights when not used
2022-12-05 18:10:13 -08:00
NumbuhFour 1b09fd5410 Implement CAMERA_VISIBLE_LAYERS as built-in shader variable 2022-12-03 22:41:27 -08:00
clayjohn 9ce57050a5 Add GPUParticles to the OpenGL3 renderer.
This includes collision (2D SDF, Box, Sphere, Heightmap),
attraction (Box, Sphere), and all sorting modes.

This does not include 3D SDF collisions, trails, or
manual emission.
2022-11-14 23:28:25 -08:00
Markus Sauermann 3b14f0334c Remove redundant Variant-types initializations 2022-11-14 19:35:19 +01:00
David Snopek 398ee08375 Add multiview to the opengl3 driver 2022-10-21 21:00:32 -05: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
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
Rémi Verschelde 7da532275b Merge pull request #65541 from clayjohn/renderer-setting
Split rendering driver project setting into renderer_name and rendering_driver
2022-09-20 09:43:59 +02:00
clayjohn 4a1c7de57c Split rendering driver project setting into renderer_name and rendering_driver. To differentiate between a driver (e.g. Vulkan or D3D12) and a renderer (e.g. clustered or mobile renderer). 2022-09-19 10:26:10 -07:00
JFonS b668268772 Fix error spam in the renderer when using GPUParticles3D
The flag INSTANCE_DATA_FLAG_MULTIMESH is used for both multimesh and particles instances, this commit adds a new INSTANCE_DATA_FLAG_PARTICLES flag to discriminate between them.

This flag will also be used in the future to properly support TAA in particles.
2022-09-16 09:44:22 +02:00
Rémi Verschelde 7b5d1ea5b9 Fix various uninitialized member pointers
Using this command:
```
find -name "thirdparty" -prune -o -name "*.h" -exec sed -i {} -e '/return /! s/\t\([A-Za-z0-9_]* \*[A-Za-z0-9_]*\)\;/\t\1 = nullptr;/g' \;
```

And then reviewing the changes manually to discard the ones that don't
seem correct/safe/good (notably changes to `core` unions).
2022-09-06 11:20:27 +02:00
Rémi Verschelde 3a62c294c7 Merge pull request #65170 from KoBeWi/your_argument_is_TypedArray 2022-09-02 13:57:02 +02:00
kobewi 7adc8376ed Change Array arguments to TypedArray 2022-09-01 13:13:19 +02:00
Bastiaan Olij 2cd84be64d Extracting render buffers and changing it to a more generic solution 2022-09-01 20:01:45 +10:00
clayjohn 385ee5c70b Implement Physical Light Units as an optional setting.
This allows light sources to be specified in physical light units in addition to the regular energy multiplier. In order to avoid loss of precision at high values, brightness values are premultiplied by an exposure normalization value.

In support of Physical Light Units this PR also renames CameraEffects to CameraAttributes.
2022-08-31 12:14:46 -07:00
Hugo Locurcio baaa7503c7
Add a shadow opacity property to Light3D
This can be used to make shadows translucent for a specific light.

The light distance fade system also uses this to smoothly fade the shadow
when the light fade transition distance is greater than 0.
2022-08-07 11:06:32 +02:00
Rémi Verschelde 2bf8c4a6d0
Merge pull request #63527 from BastiaanOlij/rework_environment
Restructure environment in render implementation
2022-07-29 08:05:40 +02:00
Bastiaan Olij f579125eeb Restructure environment in render implementation 2022-07-29 12:24:32 +10:00
Hugo Locurcio e24029edc3
Allow changing mipmap LOD bias when FSR 1.0 scaling is not used
Mipmap LOD bias can be useful to improve the appearance of distant
textures without increasing anisotropic filtering (or in situations
where anisotropic filtering is not effective).

`fsr_mipmap_bias` was renamed to `texture_mipmap_bias` accordingly.
The property hint now allows for greater precision as well.
2022-07-28 17:51:13 +02:00
Bastiaan Olij 0bd042c601 Change RendererSceneRender::GeometryInstance so more code is shared among renderers 2022-07-27 12:32:07 +10:00
Rémi Verschelde 90019676b0 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 11:17:40 +02:00
reduz 455c06ecd4 Implement Vector4, Vector4i, Projection
Implement built-in classes Vector4, Vector4i and Projection.

* Two versions of Vector4 (float and integer).
* A Projection class, which is a 4x4 matrix specialized in projection types.

These types have been requested for a long time, but given they were very corner case they were not added before.
Because in Godot 4, reimplementing parts of the rendering engine is now possible, access to these types (heavily used by the rendering code) becomes a necessity.

**Q**: Why Projection and not Matrix4?
**A**: Godot does not use Matrix2, Matrix3, Matrix4x3, etc. naming convention because, within the engine, these types always have a *purpose*. As such, Godot names them: Transform2D, Transform3D or Basis. In this case, this 4x4 matrix is _always_ used as a _Projection_, hence the naming.
2022-07-23 14:00:01 +02:00
Bastiaan Olij eefcb5ed67 Move screen space effects into a separate class 2022-07-19 13:27:39 +10:00
Hugo Locurcio 21ea1c3835
Rename soft shadow quality project settings for easier searching
`rendering/quality/shadows` is now `rendering/quality/positional_shadow`
to explicitly denote that the settings only affect positional light shadows,
not directional light shadows.

Shadow atlas settings now contain the word "atlas" for easier searching.

Soft shadow quality settings were renamed to contain the word "filter".
This makes the settings appear when searching for "filter" in the
project settings dialog, like in Godot 3.x.
2022-07-13 19:56:02 +02:00
Bastiaan Olij ecfcfd97fa Split dependency logic
Split FOG
Split visibility notifier
Final cleanup of storage classes
2022-06-28 00:10:29 +10:00
Bastiaan Olij b4821fe2e0 Introduce eye_offset for correcting stereoscopic reflections
Use view instead of vertex for reflections.
2022-06-17 19:39:34 +10:00
clayjohn 5f52936350 Implement MultiMesh in 3D and flesh out MultiMesh functions 2022-06-14 21:23:20 -07:00
jfons ba832d83b2 Initial TAA implementation
Initial TAA support based on the implementation in Spartan Engine.

Motion vectors are correctly generated for camera and mesh movement, but there is no support for other things like particles or skeleton deformations.
2022-06-07 13:14:44 +02:00
clayjohn 3e20c1347d Add clipping, backbuffer, and CanvasGroups to 2D GLES3 renderer
As well as significant consequent cleanup in the RenderTarget, Texture, and Canvas renderer code
2022-05-24 11:00:34 -07:00