summaryrefslogtreecommitdiff
path: root/scene/resources/material.cpp
AgeCommit message (Collapse)Author
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
2022-02-11Fix SelfList::remove error when animating Sprite3DIgor Kordiukiewicz
2022-01-06Move metallic and roughness automated assignment to an inspector UndoRedoSaracenOne
callback.
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-12-15Rename shader hint `filter_anisotropy` to `filter_anisotropic`Yuri Roubinsky
2021-12-15Rename shader hint `filter_aniso` to `filter_anisotropy`Yuri Roubinsky
2021-12-10Rename `hint_aniso` to `hint_anisotropy` in the shader languageHugo Locurcio
The word "anisotropy" is used in full form in BaseMaterial3D's anisotropy-related properties.
2021-12-05Remove or make verbose some debugging printsHugo Locurcio
The message about SpatialMaterial conversion was turned into a warning, as it can potentially interfere with porting projects from Godot 3.x (if there's a bug in the conversion code).
2021-11-13Set roughness/metallic to 1 when assigning a texture in BaseMaterial3DHugo Locurcio
This makes material setup faster and avoids mistakes, especially with the metallic channel which defaults to 0. The value is only changed when adding a texture when none was previously assigned, not when assigning a different texture.
2021-11-03Rename `PROPERTY_USAGE_NOEDITOR` to `PROPERTY_USAGE_NO_EDITOR`Hugo Locurcio
This is consistent with other constants that include `NO`, such as `PROPERTY_HINT_COLOR_NO_ALPHA`.