summaryrefslogtreecommitdiff
path: root/scene/resources/material.h
AgeCommit message (Collapse)Author
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-03Merge pull request #60583 from reduz/placeholder-assetsRémi Verschelde
2022-05-02Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`Rémi Verschelde
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-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-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-22Use Filament specular models and parametrizationclayjohn
2022-01-12Optimize include files to improve `shader_language.h` compilation speedYuri Roubinsky
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-10-04Hide render_priority except when using SpatialMaterialsclayjohn
2021-09-21Prevent shaders from generating code before the constructor finishes.Tom Coxon
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.
2021-07-07Merge pull request #50193 from reduz/fix-command-queue-crashRémi Verschelde
Fix Command Queue Crash
2021-07-07Fix Command Queue Crashreduz
* No longer allow sending an object (texture) to the server as material parameter * Keep a parameter cache locally in ShaderMaterial
2021-07-05Fix Subsurface Scatteringreduz
* Works again * Transmittance also works again * Removed the curve patamter, exp() function is good enough.
2021-06-30Deprecate ImmediateGeometryreduz
* 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.
2021-06-08Removes deleted OrenNayar mode from shaders and materialsYuri Roubinsky
2021-04-30Implement Particle Trailsreduz
-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)
2021-02-14Fix uninitialized `BaseMaterial3D::features` variable.bruvzg
2021-02-09Initialize class variables with default values in scene/ [2/2]Rafał Mikrut
2021-01-06Added ability to visualize native shadersreduz
2021-01-01Update copyright statements to 2021Rémi Verschelde
Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
2020-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
2020-11-02Alpha Hash and Alpha2Coverage ImplementationMarios Staikopoulos
2020-07-10Add override keywords.Marcel Admiraal
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
2020-04-08Refactored shadowmapping.Juan Linietsky
- Made shadow bias size independent, so it will remain when changing light or camera size. - Implemented normal offset bias, which greatly enhances quality. - Added transmission to subsurface scattering - Reimplemented shadow filter modes Closes #17260
2020-04-04Re-implement subsurface scattering.Juan Linietsky
The size settings are more "just works", with default scale and depth scale values that don't need much tweaking. Additionally, a "skin" mode was added so skin looks better. EDIT: Cleaned up SSR filter shader a bit.
2020-03-27Renaming of servers for coherency.Juan Linietsky
VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
2020-02-26Reimplement Mutex with C++'s <mutex>Pedro J. Estébanez
Main: - It's now implemented thanks to `<mutex>`. No more platform-specific implementations. - `BinaryMutex` (non-recursive) is added, as an alternative for special cases. - Doesn't need allocation/deallocation anymore. It can live in the stack and be part of other classes. - Because of that, it's methods are now `const` and the inner mutex is `mutable` so it can be easily used in `const` contexts. - A no-op implementation is provided if `NO_THREADS` is defined. No more need to add `#ifdef NO_THREADS` just for this. - `MutexLock` now takes a reference. At this point the cases of null `Mutex`es are rare. If you ever need that, just don't use `MutexLock`. - Thread-safe utilities are therefore simpler now. Misc.: - `ScopedMutexLock` is dropped and replaced by `MutexLock`, because they were pretty much the same. - Every case of lock, do-something, unlock is replaced by `MutexLock` (complex cases where it's not straightfoward are kept as as explicit lock and unlock). - `ShaderRD` contained an `std::mutex`, which has been replaced by `Mutex`.
2020-02-20Fix MIMPAMPS typos in constants throughout the engineAndrii Doroshenko (Xrayez)
2020-02-13Remove more deprecated methods and codeRémi Verschelde
2020-02-11Modernized default 3D material, fixes material bugs.Juan Linietsky
2020-02-11Changes to material required to add custom shaders in RD rendererJuan Linietsky
2020-02-11Texture refactorJuan Linietsky
-Texture renamed to Texture2D -TextureLayered as base now inherits 2Darray, cubemap and cubemap array -Removed all references to flags in textures (they will go in the shader) -Texture3D gone for now (will come back later done properly) -Create base rasterizer for RenderDevice, RasterizerRD
2020-01-28Merge pull request #35670 from clayjohn/material-flag-cacheRémi Verschelde
Add an extra bit to material flag cache
2020-01-28Add an extra bit to material flag cacheclayjohn
2020-01-26doc: Complete documentation for VideoStreamsRémi Verschelde
Also quick clean up of the matching C++ files.
2020-01-01Update copyright statements to 2020Rémi Verschelde
Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
2019-11-25Fix bug where specularmode disabled is not cachedclayjohn
2019-11-17Properly update texture when roughness/metallic setclayjohn
2019-08-29Merge pull request #30635 from KoBeWi/billbo_3dnsRémi Verschelde
Add a Billboard property for Sprite3D
2019-08-28Add a Billboard property for Sprite3DTomasz Chabora
2019-08-12Remove redundant author doc commentsIAmActuallyCthulhu
2019-06-19Made use of semicolons more consitent, fixed formattingJohnJLight
2019-05-21Implement shadow to opacityBastiaan Olij
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-11-21Moved dirty material lists from static to lifetime controlled by main.Ibrahn Sahir
As with 7d82bed4f4cac8f5227d935c0496290e24eb48c8, The list is now destroyed before the OS object, so can print errors if there are unfreed materials.
2018-11-14Ability to toggle flipping of tangent and binormal in depth parallax ↵Juan Linietsky
materials. Fixes #15934.
2018-11-04Remove animation loop from ParticlesMaterial + improvements to CPUParticles2DJFonS
Remove animation loop from ParticlesMaterial and move it to SpatialMaterial for 3D particles and Particles2D for the 2D case. Added animation to CPUParticles2D as well as the "Convert to CPUParticles2D" to the PAarticles2D menu.
2018-10-03Fix some warnings raised by MSVC 2017Rémi Verschelde
Disabled signed/unsigned warnings like for GCC/Clang (warning C4018: '>=': signed/unsigned mismatch). Fixes the following MSVC 2017 warnings: ``` core\image.cpp(999): warning C4804: '>': unsafe use of type 'bool' in operation core\io\compression.cpp(178): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) editor\doc\doc_dump.cpp(226): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) scene/resources/material.h(289): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) scene/resources/material.h(298): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) editor\editor_themes.cpp(379): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation ```