Commit graph

291 commits

Author SHA1 Message Date
Yuri Rubinsky
8ea4acee49 Fix shader uniform groups to prevent it sorting in alphabet order 2023-03-28 18:36:10 +03:00
clayjohn
c69b14e96e Add warnings for unsupported features in mobile and gl_compatibility backends 2023-02-26 12:28:02 -08:00
Juan Linietsky
34fd128723 Fix shader parameter assign
-Make sure the remap is created properly if never assigned before.

Fixes #72923. Supersedes #73066.
2023-02-18 13:13:54 +01:00
QbieShay
7881422901 make particle billboard take into account non-uniform scale 2023-02-13 21:18:55 +01:00
bruvzg
b4fe514aa3
[Sprite3D/Label3D] Expose alpha antialiasing properties. 2023-01-31 10:46:38 +02:00
bruvzg
1c774a6083
Fix unsafe murmur3 hash use for the default material keys, expose alpha hash transparency mode for default materials and Label3D and Sprite3D. 2023-01-24 12:24:53 +02:00
Rémi Verschelde
1dfd236f15
Merge pull request #70377 from dsnopek/server-export-mk2
Add "dedicated server" export mode which can strip unneeded visual resources
2023-01-23 22:13:28 +01:00
David Snopek
74458b6e9b Add "dedicated server" export mode which can strip unneeded visual resources 2023-01-23 13:24:54 -06:00
Rémi Verschelde
5b1df48c6c
Convert en_GB spelling to en_US with codespell 2023-01-23 11:02:20 +01:00
Juan Linietsky
7dbc458bb4 Clean up shader parameter remap
This PR is a follow up to #64092, which fixed important issues but it was implemented in an overly complex and inefficient way (because it forced the default code path to always go through string operations).
This cleans up all the shader parameter code.

This fixes #54336. Also fixes #56219 because, as the new code never queries the RenderingServer on load, potential deadlocks are avoided.

**NOTE**: materials saved between #62972 and #64092 will no longer work and will need to be resaved in an earlier version.
2023-01-21 12:56:28 +01: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
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
Adam Scott
ea33001b95 Add safety-checks before some servers free() 2022-12-29 16:23:38 -05:00
Hugo Locurcio
d926be72ed
Use circular fade instead of linear fade for distance fade
This makes distance fade look the same regardless of the camera angle,
for all distance fade modes (Pixel Alpha, Pixel Dither, Object Dither).
Distance fade now behaves like fog in this regard.
2022-12-05 22:35:11 +01:00
kobewi
9a3960daa5 Simplify GDVIRTUAL_REQUIRED_CALL calls 2022-11-30 18:36:57 +01:00
kobewi
d06a8320e5 Simplify GDVIRTUAL_CALL calls 2022-10-19 00:05:48 +02:00
Rémi Verschelde
6d534f6e89 Merge pull request #66221 from Mickeon/painstakingly-appending-ds-en-you-tea-es
Rename remaining "*_enable" to "*_enabled"
2022-10-11 16:17:02 +02:00
Rémi Verschelde
7ab01450cf Fix MSVC warning C4702: unreachable code
Part of #66537.
2022-09-28 16:46:48 +02:00
Micky
c1b5b68eee Rename remaining "*_enable" to "*_enabled"
Material.`proximity_fade_enable` -> `proximity_fade_enabled`
Material.`set_proximity_fade` -> `set_proximity_fade_enabled`
(Material.`is_proximity_fade_enabled` is unchanged)

Area3D.`reverb_bus_enable` -> `reverb_bus_enabled`
(`set_use_reverb_bus` & `is_using_reverb_bus` are unchanged)

RDPipelineRasterizationState:
`depth_bias_enable` -> `depth_bias_enabled`
`set_depth_bias_enable` -> `set_depth_bias_enabled`
`get_depth_bias_enable` -> `get_depth_bias_enabled`

Bonus:
Area3D.`set_reverb_bus` -> `set_reverb_bus_name`
Area3D.`get_reverb_bus` -> `set_get_reverb_bus_name`
2022-09-21 22:47:46 +02:00
Yuri Rubinsky
4f0e0f1650 Fix sorting of uniform items in the material properties
Co-authored-by: Chia-Hsiang Cheng <garychia@users.noreply.github.com>
2022-09-16 08:59:13 +03:00
Rémi Verschelde
b094e4f1a1
Merge pull request #64092 from nathanfranke/shader-uniform 2022-09-14 22:07:15 +02:00
Johan Aires Rastén
bb657c04fc Calculate MODELVIEW_NORMAL_MATRIX for billboard materials
Solves #65627
2022-09-10 21:08:29 +02:00
Nathan Franke
82d2a97a83
prefix shader parameters with "shader_parameter/" 2022-09-02 20:41:00 -05:00
Rémi Verschelde
c82bbc38a5 Merge pull request #64952 from Chaosus/vs_rename_uniform_to_param 2022-09-02 13:49:53 +02:00
Yuri Rubinsky
8191b3c110 Rename uniform to parameter across the engine 2022-09-01 11:42:57 +03: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
64717d64cd
Improve documentation for BaseMaterial3D's alpha scissor threshold 2022-08-29 14:54:06 +02:00
Rémi Verschelde
cb62c91c12
Merge pull request #58600 from Calinou/material-triplanar-sharpness-clamp 2022-08-22 22:21:33 +02:00
Yuri Sizov
1a24c9e14b Make _validate_property a multilevel method 2022-08-22 18:35:11 +03:00
Yuri Sizov
980f5f32f4 Make property_*_revert methods multilevel and expose them for scripting 2022-08-18 00:03:53 +03:00
Nathan Franke
3d7d4ccada
capitalize shader uniform groups 2022-08-08 02:21:04 -05:00
Hugo Locurcio
e919e51a6b
Use interleaved gradient noise for distance fade
This provides better visuals and performance compared to the previous
ordered dither.
2022-08-05 11:35:34 +02:00
Hugo Locurcio
db22b7ded0
Rename shader parameter uniform setter/getter methods for consistency
`shader_uniform` is now consistenly used across both per-shader
and per-instance shader uniform methods. This makes methods easier
to find in the class reference when looking for them.
2022-08-04 23:17:06 +02:00
Hugo Locurcio
c6cca43419
Tweak StandardMaterial3D's default height properties
- Set the default height scale to 5.0 and multiply it by 0.01 in the shader.
- Document heightmap properties in BaseMaterial3D class reference.
2022-08-04 09:57:55 +02:00
Hugo Locurcio
fa019f6e14
Change default material alpha scissor threshold to 0.5
This makes the default behavior consistent between SpriteBase3D,
BaseMaterial3D and imported glTF scene materials.

Alpha scissor threshold property hints now allows for more precise
adjustments as well.
2022-08-01 02:00:16 +02:00
Hugo Locurcio
1dfd94c63f
Hide triplanar subproperties when triplanar is disabled in BaseMaterial3D
This also renames some sections for consistency.
2022-07-30 21:41:26 +02:00
Yuri Rubinsky
886c2d9681 Implement shader uniform groups/subgroups 2022-07-26 11:26:09 +03:00
reduz
141c375581 Clean up Hash Functions
Clean up and do fixes to hash functions and newly introduced murmur3 hashes in #61934
* Clean up usage of murmur3
* Fixed usages of binary murmur3 on floats (this is invalid)
* Changed DJB2 to use xor (which seems to be better)
2022-06-20 12:54:19 +02:00
Rémi Verschelde
7c0f1b4cd7
Merge pull request #62042 from Calinou/basematerial3d-nearest-height-always-linear
Always sample the heightmap with linear filtering in BaseMaterial3D
2022-06-14 21:39:03 +02:00
Hugo Locurcio
26f6625dcc
Always sample the heightmap with linear filtering in BaseMaterial3D
Nearest-neighbor filtering of the heightmap results in a broken
appearance, with and without Deep Parallax enabled on the material.

Linear filtering results in a more expected appearance. This does
not affect other texture maps such as albedo, normal or roughness.
2022-06-14 18:56:18 +02:00
FireForge
92817aa72f Add Vector2/3 linking to more properties
- Camera2D.zoom
- CanvasLayer.scale
- ParallaxBackground.scroll_base_scale
- ParallaxLayer.motion_scale
- Polygon2D.texture_scale
- BaseMaterial3D.uv1_scale
- BaseMaterial3D.uv2_scale
2022-06-14 09:33:44 -05:00
FireForge
4678736a39 Add suffixes to all nodes and resources 2022-06-11 09:41:05 -05:00
Hugo Locurcio
a8a6e664fb
Rename BaseMaterial3D properties to use fully spelled out "texture"
This is more consistent with other BaseMaterial properties such as
`ao_texture_channel`.

This also improves the documentation related to
`albedo_texture_force_srgb`.

This also fixes a typo in the 3.x material converter.
2022-05-24 20:44:17 +02:00
Rémi Verschelde
1314e6cbcc
Merge pull request #60803 from Chaosus/shader_hint_rename
Rename `hint_albedo`, `hint_white/black` in shaders
2022-05-24 08:15:33 +02:00
clayjohn
9b61c855ef Add basic lighting to GLES3 renderer.
This includes all three light types and IBL, but does not include shadows or any form of GI
2022-05-16 15:07:09 -07:00
reduz
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
Yuri Roubinsky
a8bbe570ca Rename hint_albedo, hint_white/black in shaders 2022-05-09 22:50:18 +03:00
Hugo Locurcio
aabbb40009
Make {call,set,notify}_group() immediate by default
This results in less surprising behavior out of the box.

Internal usages were modified to keep the existing behavior
identical there.
2022-05-05 16:59:37 +02:00
reduz
b02c7387c7 Implement placeholder assets
* Placeholder textures
* Placeholder meshes
* Placeholder material

This PR is the first step towards implementing https://github.com/godotengine/godot-proposals/issues/2756
It adds an asset type that uses no resources, which can be used to replace the existing ones on export for using on the upcoming server export.
2022-04-28 12:19:01 +02:00
bruvzg
be611c1c05
Implement Label3D node.
Add "generate_mipmap" font import option.
Add some missing features to the Sprite3D.
Move BiDi override code from Control to TextServer.
Add functions to access TextServer font cache textures.
Add MSDF related flags and shader to the standard material.
Change standard material cache to use HashMap instead of Vector.
2022-04-22 12:08:46 +03:00