summaryrefslogtreecommitdiff
path: root/scene/resources/material.cpp
AgeCommit message (Collapse)Author
2023-01-31[Sprite3D/Label3D] Expose alpha antialiasing properties.bruvzg
2023-01-24Fix unsafe murmur3 hash use for the default material keys, expose alpha hash ↵bruvzg
transparency mode for default materials and Label3D and Sprite3D.
2023-01-23Merge pull request #70377 from dsnopek/server-export-mk2Rémi Verschelde
Add "dedicated server" export mode which can strip unneeded visual resources
2023-01-23Add "dedicated server" export mode which can strip unneeded visual resourcesDavid Snopek
2023-01-23Convert en_GB spelling to en_US with codespellRémi Verschelde
2023-01-21Clean up shader parameter remapJuan Linietsky
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-18Remove SCREEN_TEXTURE, DEPTH_TEXTURE, and NORMAL_ROUGHNESS_TEXTUREclayjohn
in favour of texture hints
2023-01-05One Copyright Update to rule them allRémi Verschelde
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".
2022-12-29Add safety-checks before some servers `free()`Adam Scott
2022-12-05Use circular fade instead of linear fade for distance fadeHugo Locurcio
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-11-30Simplify GDVIRTUAL_REQUIRED_CALL callskobewi
2022-10-19Simplify GDVIRTUAL_CALL callskobewi
2022-10-11Merge pull request #66221 from Mickeon/painstakingly-appending-ds-en-you-tea-esRémi Verschelde
Rename remaining "*_enable" to "*_enabled"
2022-09-28Fix MSVC warning C4702: unreachable codeRémi Verschelde
Part of #66537.
2022-09-21Rename remaining "*_enable" to "*_enabled"Micky
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-16Fix sorting of uniform items in the material propertiesYuri Rubinsky
Co-authored-by: Chia-Hsiang Cheng <garychia@users.noreply.github.com>
2022-09-14Merge pull request #64092 from nathanfranke/shader-uniformRémi Verschelde
2022-09-10Calculate MODELVIEW_NORMAL_MATRIX for billboard materialsJohan Aires Rastén
Solves #65627
2022-09-02prefix shader parameters with "shader_parameter/"Nathan Franke
2022-09-02Merge pull request #64952 from Chaosus/vs_rename_uniform_to_paramRémi Verschelde
2022-09-01Rename `uniform` to `parameter` across the engineYuri Rubinsky
2022-08-31Implement Physical Light Units as an optional setting.clayjohn
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-29Improve documentation for BaseMaterial3D's alpha scissor thresholdHugo Locurcio
2022-08-22Merge pull request #58600 from Calinou/material-triplanar-sharpness-clampRémi Verschelde
2022-08-22Make `_validate_property` a multilevel methodYuri Sizov
2022-08-18Make `property_*_revert` methods multilevel and expose them for scriptingYuri Sizov
2022-08-08capitalize shader uniform groupsNathan Franke
2022-08-05Use interleaved gradient noise for distance fadeHugo Locurcio
This provides better visuals and performance compared to the previous ordered dither.
2022-08-04Rename shader parameter uniform setter/getter methods for consistencyHugo Locurcio
`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-04Tweak StandardMaterial3D's default height propertiesHugo Locurcio
- 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-01Change default material alpha scissor threshold to 0.5Hugo Locurcio
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-07-30Hide triplanar subproperties when triplanar is disabled in BaseMaterial3DHugo Locurcio
This also renames some sections for consistency.
2022-07-26Implement shader uniform groups/subgroupsYuri Rubinsky
2022-06-20Clean up Hash Functionsreduz
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-14Merge pull request #62042 from ↵Rémi Verschelde
Calinou/basematerial3d-nearest-height-always-linear Always sample the heightmap with linear filtering in BaseMaterial3D
2022-06-14Always sample the heightmap with linear filtering in BaseMaterial3DHugo Locurcio
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-14Add Vector2/3 linking to more propertiesFireForge
- Camera2D.zoom - CanvasLayer.scale - ParallaxBackground.scroll_base_scale - ParallaxLayer.motion_scale - Polygon2D.texture_scale - BaseMaterial3D.uv1_scale - BaseMaterial3D.uv2_scale
2022-06-11Add suffixes to all nodes and resourcesFireForge
2022-05-24Rename BaseMaterial3D properties to use fully spelled out "texture"Hugo Locurcio
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-24Merge pull request #60803 from Chaosus/shader_hint_renameRémi Verschelde
Rename `hint_albedo`, `hint_white/black` in shaders
2022-05-16Add basic lighting to GLES3 renderer.clayjohn
This includes all three light types and IBL, but does not include shadows or any form of GI
2022-05-16Replace most uses of Map by HashMapreduz
* 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-09Rename `hint_albedo`, `hint_white/black` in shadersYuri Roubinsky
2022-05-05Make `{call,set,notify}_group()` immediate by defaultHugo Locurcio
This results in less surprising behavior out of the box. Internal usages were modified to keep the existing behavior identical there.
2022-04-28Implement placeholder assetsreduz
* 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-22Implement Label3D node.bruvzg
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-03-18Rename several transform built-ins in shadersYuri Roubinsky
2022-03-10Discern between virtual and abstract class bindingsreduz
* Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract". * Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions. * Converted a large amount of classes from "abstract" to "virtual" where it makes sense. Most classes that make sense have been converted. Missing: * Physics servers * VideoStream * Script* classes. which will go in a separate PR due to the complexity involved.
2022-02-27Clamp BaseMaterial3D triplanar sharpness to values that never look brokenHugo Locurcio
2022-02-22Use Filament specular models and parametrizationclayjohn