summaryrefslogtreecommitdiffstats
path: root/scene/resources/material.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
|
* Rebrand preambles to RedotDubhghlas McLaughlin2024-10-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* Implement asynchronous transfer queues, thread guards on RenderingDevice. ↵Dario2024-10-021-7/+16
| | | | | | | | | | | Add ubershaders and rework pipeline caches for Forward+ and Mobile. - Implements asynchronous transfer queues from PR #87590. - Adds ubershaders that can run with specialization constants specified as push constants. - Pipelines with specialization constants can compile in the background. - Added monitoring for pipeline compilations. - Materials and shaders can now be created asynchronously on background threads. - Meshes that are loaded on background threads can also compile pipelines as part of the loading process.
* GDExtension: Mark virtual function as `is_required` in `extension_api.json`David Snopek2024-09-111-2/+2
| | | | Co-authored-by: Jovan Gerodetti <jovan.gerodetti@titannano.de>
* Let materials' shaders update happen on loader threadsPedro J. Estébanez2024-05-061-2/+2
|
* Added premult alpha blending to 3D (spatial) shaders.QbieShay2024-05-011-0/+1
| | | | | Co-authored-by: jitspoe <jitspoe@yahoo.com> Co-authored-by: Clay John <claynjohn@gmail.com>
* Optimise Object's `get_argument_options`Micky2024-02-291-0/+2
|
* Add const lvalue ref to container parametersMuller-Castro2024-01-051-1/+1
|
* Cleanup instances of using uint32_t for mesh formatsClay2023-10-121-2/+0
| | | | And tidy up some leftovers from the attribute compression PR
* Fix BaseMaterial3D update with certain material settingsbitsawer2023-10-111-0/+1
|
* Vertex and attribute compression to reduce the size of the vertex format.clayjohn2023-10-051-0/+2
| | | | | | | | | | | | | This allows Godot to automatically compress meshes to save a lot of bandwidth. In general, this requires no interaction from the user and should result in no noticable quality loss. This scheme is not backwards compatible, so we have provided an upgrade mechanism, and a mesh versioning mechanism. Existing meshes can still be used as a result, but users can get a performance boost by reimporting assets.
* Implement render mode fog_disabled and BaseMaterial3D setting Disable FogMilan Gruner2023-09-051-0/+1
|
* Hash ORM flag in BaseMaterial to differentiate between ORM and Standard ↵clayjohn2023-06-071-0/+2
| | | | materials
* Improve `SelfList` and fix error in `BaseMaterial3D` when running doctoolRedworkDE2023-05-221-1/+1
|
* Avoid sync issues in materials with scheduled shader updatesPedro J. Estébanez2023-05-101-1/+9
|
* Add warnings for unsupported features in mobile and gl_compatibility backendsclayjohn2023-02-261-2/+0
|
* [Sprite3D/Label3D] Expose alpha antialiasing properties.bruvzg2023-01-311-1/+1
|
* Fix unsafe murmur3 hash use for the default material keys, expose alpha hash ↵bruvzg2023-01-241-1/+1
| | | | transparency mode for default materials and Label3D and Sprite3D.
* Merge pull request #70377 from dsnopek/server-export-mk2Rémi Verschelde2023-01-231-0/+3
|\ | | | | | | Add "dedicated server" export mode which can strip unneeded visual resources
| * Add "dedicated server" export mode which can strip unneeded visual resourcesDavid Snopek2023-01-231-0/+3
| |
* | Clean up shader parameter remapJuan Linietsky2023-01-211-1/+2
|/ | | | | | | | | 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.
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | 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".
* Rename remaining "*_enable" to "*_enabled"Micky2022-09-211-1/+1
| | | | | | | | | | | | | | | | | | 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`
* Fix sorting of uniform items in the material propertiesYuri Rubinsky2022-09-161-11/+0
| | | | | Co-authored-by: Chia-Hsiang Cheng <garychia@users.noreply.github.com>
* Merge pull request #64952 from Chaosus/vs_rename_uniform_to_paramRémi Verschelde2022-09-021-2/+2
|\
| * Rename `uniform` to `parameter` across the engineYuri Rubinsky2022-09-011-2/+2
| |
* | Implement Physical Light Units as an optional setting.clayjohn2022-08-311-3/+7
|/ | | | | | 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.
* Make `_validate_property` a multilevel methodYuri Sizov2022-08-221-2/+2
|
* Make `property_*_revert` methods multilevel and expose them for scriptingYuri Sizov2022-08-181-2/+2
|
* Rename shader parameter uniform setter/getter methods for consistencyHugo Locurcio2022-08-041-2/+2
| | | | | | `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.
* Implement shader uniform groups/subgroupsYuri Rubinsky2022-07-261-0/+11
|
* Code quality: Fix header guards consistencyRémi Verschelde2022-07-251-1/+1
| | | | | Adds `header_guards.sh` bash script, used in CI to validate future changes. Can be run locally to fix invalid header guards.
* Replace most uses of Map by HashMapreduz2022-05-161-2/+5
| | | | | | | | | | | | * 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!
* Merge pull request #60583 from reduz/placeholder-assetsRémi Verschelde2022-05-031-0/+7
|\
| * Implement placeholder assetsreduz2022-04-281-0/+7
| | | | | | | | | | | | | | | | | | * 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.
* | Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`Rémi Verschelde2022-05-021-32/+32
|/ | | | | | | | | | | 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.
* Implement Label3D node.bruvzg2022-04-221-4/+14
| | | | | | | | | 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.
* Discern between virtual and abstract class bindingsreduz2022-03-101-5/+8
| | | | | | | | | | | | | | * 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.
* Use Filament specular models and parametrizationclayjohn2022-02-221-6/+4
|
* Optimize include files to improve `shader_language.h` compilation speedYuri Roubinsky2022-01-121-1/+0
|
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Hide render_priority except when using SpatialMaterialsclayjohn2021-10-041-0/+3
|
* Prevent shaders from generating code before the constructor finishes.Tom Coxon2021-09-211-0/+1
| | | | | | | | | | | | | | Fixes #43733: "creating SpatialMaterial in a separate thread creates invalid shaders (temporarily)." The bug occurred because various setters called in materials' constructors add materials to queues that are processed on the main thread. This means that when the materials are created in another thread, they can be processed on the main thread before the constructor has finished. The fix adds a flag to affected materials that prevents them from being added to the queue until their constructors have finished initialising all the members.
* Merge pull request #50193 from reduz/fix-command-queue-crashRémi Verschelde2021-07-071-0/+2
|\ | | | | Fix Command Queue Crash
| * Fix Command Queue Crashreduz2021-07-071-0/+2
| | | | | | | | | | * No longer allow sending an object (texture) to the server as material parameter * Keep a parameter cache locally in ShaderMaterial
* | Fix Subsurface Scatteringreduz2021-07-051-5/+0
|/ | | | | | * Works again * Transmittance also works again * Removed the curve patamter, exp() function is good enough.
* Deprecate ImmediateGeometryreduz2021-06-301-1/+1
| | | | | | | | | * Removed entirely from RenderingServer. * Replaced by ImmediateMesh resource. * ImmediateMesh replaces ImmediateGeometry, but could use more optimization in the future. * Sprite3D and AnimatedSprite3D work again, ported from Godot 3.x (though a lot of work was needed to adapt them to Godot 4). * RootMotionView works again. * Polygon3D editor works again.
* Removes deleted OrenNayar mode from shaders and materialsYuri Roubinsky2021-06-081-1/+0
|
* Implement Particle Trailsreduz2021-04-301-5/+5
| | | | | | | | | -Enable the trails and set the length in seconds -Provide a mesh with a skeleton and a skin -Or, alternatively use one of the built-in TubeTrailMesh/RibbonTrailMesh -Works deterministically -Fixed particle collisions (were broken) -Not working in 2D yet (that will happen next)
* Fix uninitialized `BaseMaterial3D::features` variable.bruvzg2021-02-141-1/+1
|