Commit graph

44 commits

Author SHA1 Message Date
Yuri Rubinsky
94831c7209 Forbid passing multiview sampler to the custom function in shaders 2023-02-21 11:23:17 +03:00
clayjohn
c9c14410e9 Fix sampling bug when SSAO is using half size 2023-02-16 00:37:12 -08:00
Bastiaan Olij
694c8ec273 Add render buffer support to screen space effects 2023-02-10 10:27:59 +11:00
Bastiaan Olij
9b549231e4 Move luminance effect into its own class and use new buffers system 2023-01-07 14:40:42 +11: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
Rémi Verschelde
465d4c1d95
Merge pull request #70009 from clayjohn/glow-hq
Remove high quality glow as it is not any higher quality than regular glow
2022-12-13 23:32:15 +01:00
clayjohn
bdd4001ef0 Various fixes and documentation for CanvasGroup
Properly apply custom materials with CanvasGroups in the GLES3 backend

Properly blur backbuffer when using a partial rect in forward_plus and
gl_compatibility renderers

Properly set fit_margin when clear_margin is set

Fix shader error during backbuffer clear in mobile renderer
2022-12-13 10:22:18 -08: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
b2b89d7294 Properly remap roughness when reading from radiance map
This ensures that we consistently use perceptual roughness which matches the behaviour of most other PBR renderers like Blender, Ue4 and Godot 3
2022-12-02 15:39:20 -08:00
Rémi Verschelde
e7418cac3d
Merge pull request #68942 from Chaosus/barrier_mask_flags
Expose `BarrierMask` as flags enum in `RenderingDevice`
2022-11-22 08:31:12 +01:00
Yuri Rubinsky
acaf38cfbc Expose BarrierMask as flags enum in RenderingDevice 2022-11-22 09:45:20 +03:00
Markus Sauermann
28af870750 Code simplifications found by cppcheck
They are based on:
- Boolean arithmetic simplifications
- setting variables that are not accessed
- constant variables
2022-11-21 08:43:36 +01:00
Rémi Verschelde
58cb11b396
Merge pull request #68710 from BastiaanOlij/fix_vrs
Fix VRS issues
2022-11-18 16:19:22 +01:00
clayjohn
21ac6d7d8e Finish implementing Canvas Background mode 2022-11-17 12:51:26 -08:00
Bastiaan Olij
616ba8745f Fix VRS issues 2022-11-17 00:32:42 +11:00
Rémi Verschelde
1e9a61cd40
Merge pull request #68487 from clayjohn/RD-mobile-raster
Use raster versions of copy effects for 2D operations when using the mobile renderer
2022-11-15 10:27:43 +01:00
Markus Sauermann
3b14f0334c Remove redundant Variant-types initializations 2022-11-14 19:35:19 +01:00
clayjohn
3ceb342d37 Enable mipmaps in cubemap roughness shader 2022-11-10 23:41:51 -08:00
clayjohn
8e41221404 Use raster versions of copy effects for 2D operations when using the mobile renderer
This PR implements a few basic copy operations in raster that weren't available before
2022-11-10 12:47:26 -08:00
clayjohn
b6f44859d7 Implement multiple clip_children modes for CanvasItems 2022-10-14 08:02:28 -07: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
Aaron Franke
2cea42cc7f
Rename Projection matrix to columns 2022-10-04 12:34:19 -05: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
Bastiaan Olij
873366cb2d Fix uniform buffer being created every frame is SSAO and SSIL half_size is different 2022-09-13 17:49:32 +10:00
clayjohn
65f0113bc6 Properly scale SSR reflection based on metallic value for dielectric materials 2022-09-09 16:52:02 -07: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
Micky
59e11934d8 Rename str2var to str_to_var and similar
Affects the Math class, a good chunk of the audio code, and a lot of other miscellaneous classes, too.

- `var2str` -> `var_to_str`
- `str2var` -> `str_to_var`
- `bytes2var` -> `bytes_to_var`
- `bytes2var_with_objects` -> `bytes_to_var_with_objects`
- `var2bytes` -> `var_to_bytes`
- `var2bytes_with_objects` -> `var_to_bytes_with_objects`
- `linear2db` -> `linear_to_db`
- `db2linear` -> `db_to_linear`
- `deg2rad` -> `deg_to_rad`
- `rad2deg` -> `rad_to_deg`

- `dict2inst` -> `dict_to_inst`
- `inst2dict` -> `inst_to_dict`
2022-08-26 14:58:22 +02:00
Bastiaan Olij
81c6f73109 Changed storage structs to private 2022-08-01 11:59:14 +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
Rémi Verschelde
4f7bfacfcd
Merge pull request #62478 from BastiaanOlij/split_effects_20220628 2022-07-22 23:44:52 +02:00
luz paz
38aaaa3cf9 Fix various typos not caught by codespell
Revert upstream `core/input/gamecontrollerdb.txt`. Upstream fix: https://github.com/gabomdq/SDL_GameControllerDB/pull/600
2022-07-21 07:38:23 -04:00
Bastiaan Olij
eefcb5ed67 Move screen space effects into a separate class 2022-07-19 13:27:39 +10:00
Bastiaan Olij
d139131aab Adding Variable Rate Shading support to Godot
Improve GI renderer and add VRS support
Implement render device has_feature and move subgroup settings to limit_get
2022-07-17 15:42:24 +10:00
Bastiaan Olij
4e8e10a186 Fix typo in roughness shaders 2022-06-26 12:43:21 +10:00
Bastiaan Olij
6224b00365 Moved cube_to_dp and cubemap logic into CopyEffects 2022-06-24 18:04:28 +10:00
Bastiaan Olij
997810e417 Split GI effects and fix stereoscopic rendering of GI effects 2022-06-22 12:50:17 +10:00
Bastiaan Olij
fe8c8eeba8 Copy_to_fb is available in both raster and clustered renderers, remove unwanted checks 2022-05-13 13:19:42 +10:00
Bastiaan Olij
9939cfc4c4 Split out bokeh_dof and copy effects 2022-05-11 11:08:56 +10:00
clayjohn
623753a3a2 Use linear mipmap sampling in ToneMapper 2022-04-30 21:30:08 -07:00
Bastiaan Olij
3b2267ba6d Splitting tonemapper into its own class 2022-04-28 15:00:30 +10:00