Commit Graph

86 Commits

Author SHA1 Message Date
199ea349f5 Merge pull request #57698 from bluenote10/feature/rename_translated_to_translated_local 2022-07-28 10:03:07 +02:00
2d2b85d400 Merge pull request #62972 from Chaosus/shader_groups
Implement shader uniform groups/subgroups
2022-07-26 15:16:33 +02:00
f94b4dbe22 Merge pull request #63236 from halgriffiths/fix-texture-rect-transpose
send FLAGS_TRANSPOSE_RECT to Vulkan
2022-07-26 13:22:32 +02:00
886c2d9681 Implement shader uniform groups/subgroups 2022-07-26 11:26:09 +03:00
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
f649678402 Clean up Shader Preprocessor
* Moved preprocessor to Shader and ShaderInclude
* Clean up RenderingServer side
* Preprocessor is separate from parser now, but it emits tokens with include location hints.
* Improved ShaderEditor validation code
* Added include file code completion
* Added notification for all files affected by a broken include.
2022-07-22 22:53:03 +02:00
d37ebc2bdc send FLAGS_TRANSPOSE_RECT to Vulkan 2022-07-22 13:49:04 +01:00
d29e17d9d2 Merge pull request #63057 from sakrel/vulkan-fix-2d-shadows 2022-07-18 21:53:12 +02:00
c2b0a873c2 added usage_defines for SPECULAR_SHININESS
added usage defines for opengl3 renderer
2022-07-18 00:45:42 +02:00
2bf9e6090c rename translate(d) to translate(d)_local in Transform 2D/3D 2022-07-16 11:47:54 +02:00
16a8967757 Fix DirectionalLight2D and PointLight2D shadows not rendering correctly 2022-07-15 23:55:15 +02:00
ecfcfd97fa Split dependency logic
Split FOG
Split visibility notifier
Final cleanup of storage classes
2022-06-28 00:10:29 +10:00
746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
931838b330 Merge pull request #60627 from aaronfranke/rename-elements
Rename Transform2D and Basis `elements` to `columns` and `rows` respectively
2022-05-03 14:40:01 +02:00
c273ddc3ee Style: Partially apply clang-tidy's cppcoreguidelines-pro-type-member-init
Didn't commit all the changes where it wants to initialize a struct
with `{}`. Should be reviewed in a separate PR.

Option `IgnoreArrays` enabled for now to be conservative, can be
disabled to see if it proposes more useful changes.

Also fixed manually a handful of other missing initializations / moved
some from constructors.
2022-05-02 16:28:25 +02:00
1bf94dff3a Rename Basis "elements" to "rows" 2022-04-29 08:02:56 -05:00
b831fb0a54 Rename Transform2D "elements" to "columns" 2022-04-29 08:02:39 -05:00
8dfa12cae7 Merge pull request #59979 from bruvzg/cpp_check2 2022-04-27 10:08:26 +02:00
2f33414dab Fix clearing backbuffer if there are no items 2022-04-25 22:31:40 +05:00
de4c97758a Fix more issues found by cppcheck. 2022-04-20 10:34:00 +03:00
0b4fd92a17 Moved particles into ParticlesStorage 2022-04-17 13:13:22 +10:00
6b28d94e77 Merge canvas and decal into TextureStorage and add render target 2022-04-17 12:59:50 +10:00
f851c4aa33 Fix some issues found by cppcheck. 2022-04-06 14:34:37 +03:00
b8be7903f3 Move storage for Mesh, MeshInstance, MultiMesh and Skeleton into MeshStorage 2022-04-02 16:29:04 +11:00
36defd1179 Extract global variable, shader and material storage 2022-03-31 21:49:42 +11:00
0fe06e9467 Extract Decal and Decal atlas from Storage class 2022-03-21 12:22:43 +11:00
0d9aecd967 Rename several transform built-ins in shaders 2022-03-18 12:10:55 +03:00
e142c10fc5 Merge pull request #58993 from notSanil/device-limit-exceeded-fix 2022-03-17 19:55:40 +01:00
36fa7059ed Fix device limit exceeding for uniform buffer 2022-03-16 16:52:35 +05:30
57e5a33623 Split dummy renderer classes into separate files
Split canvas_texture_storage and texture_storage from render_storage class
2022-03-16 17:43:10 +11:00
39d429e497 Change some math macros to constexpr
Changes `MAX`, `MIN`, `ABS`, `CLAMP` and `SIGN`.
2022-03-09 16:24:32 +01:00
b0ca03b0a2 Add a UniformSet cache
* Changed syntax usage for RD::Uniform to create faster with a single RID
* Converted render pass setup to use this in clustered renderer to test.

This is the first step into creating a proper uniform set cache system to simplify large parts of the codebase.
2022-03-06 13:03:33 +01:00
8b8e858778 Merge pull request #54489 from briansemrau/texture-delete-update 2022-01-19 10:10:54 +01:00
99064d57db New OpenGL batching canvas renderer 2022-01-11 22:26:18 -08:00
679fe92bb3 Fix incorrect format and buffer used for bone weights. 2022-01-05 08:44:59 +02:00
3a5a3473be Merge pull request #54791 from NHodgesVFX/master
[4.x] add more OpenGL attributes
2022-01-04 16:52:27 +01:00
fe52458154 Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
49403cbfa0 Replace String comparisons with "", String() to is_empty()
Also:
- Adds two stress tests to test_string.h
- Changes to .empty() on std::strings
2021-12-09 04:48:38 -06:00
716e15cd26 Fix multimesh still drawing when visible instances is zero 2021-11-12 21:51:14 -05:00
826e781bfa Fix default_texture_param in shader pipeline to support uniform arrays 2021-11-12 12:53:40 +03:00
dbe366a830 add more OpenGL attributes 2021-11-08 20:12:11 -05:00
4a1c28460e Fix materials not updating when texture replaced/deleted 2021-11-01 15:33:59 -04:00
3a6be64c12 clang-format: Various fixes to comments alignment from clang-format 13
All reviewed manually and occasionally rewritten to avoid bad auto formatting.
2021-10-28 15:43:36 +02:00
6873ecaaf9 Added support for uniform arrays in shaders 2021-10-04 13:57:44 +03:00
c63b18507d Use range iterators for Map 2021-09-30 15:09:12 -06:00
ba65730cbf Rename RID's getornull() to get_or_null() 2021-09-29 23:58:02 +02:00
6a9f3746af Fix editor freeze when asigning Skeleton2D to Polygon2D 2021-09-29 01:50:01 +02:00
90908cd67d Add Get Center Method for Rect2/Rect2i and AABB. 2021-09-21 21:14:17 +05:45
5f69218edc Merge pull request #51604 from TechnoPorg/fix-vulkan-parent-material
Vulkan: Fix CanvasItem::use_parent_material
2021-09-12 01:00:30 +02:00
036b7a0985 Merge pull request #51873 from Chaosus/fix_uniform_error_spam
Fix incorrect checking of uniform set to prevent error spam (2)
2021-08-31 11:28:48 -07:00