summaryrefslogtreecommitdiff
path: root/scene/resources/material.cpp
AgeCommit message (Collapse)Author
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-28Signals: Port connect calls to use callable_mpRémi Verschelde
Remove now unnecessary bindings of signal callbacks in the public API. There might be some false positives that need rebinding if they were meant to be public. No regular expressions were harmed in the making of this commit. (Nah, just kidding.)
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-25Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky
- Renames PackedIntArray to PackedInt32Array. - Renames PackedFloatArray to PackedFloat32Array. - Adds PackedInt64Array and PackedFloat64Array. - Renames Variant::REAL to Variant::FLOAT for consistency. Packed arrays are for storing large amount of data and creating stuff like meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of memory. That said, many users requested the ability to have 64 bits packed arrays for their games, so this is just an optional added type. For Variant, the float datatype is always 64 bits, and exposed as `float`. We still have `real_t` which is the datatype that can change from 32 to 64 bits depending on a compile flag (not entirely working right now, but that's the idea). It affects math related datatypes and code only. Neither Variant nor PackedArray make use of real_t, which is only intended for math precision, so the term is removed from there to keep only float.
2020-02-20Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky
objects and made them default.
2020-02-20Fix MIMPAMPS typos in constants throughout the engineAndrii Doroshenko (Xrayez)
2020-02-14Fix various GCC compilation warnings after Vulkan mergeRémi Verschelde
Part of #36132.
2020-02-13Remove more deprecated methods and codeRémi Verschelde
2020-02-12doc: Add BaseMaterial3D strings ported from SpatialMaterialRémi Verschelde
Follow-up to #36135.
2020-02-12doc: Sync classref with current sourceRémi Verschelde
Lots of internal API changes and some docstrings were lost in the conversion. I manually salvaged many of them but for all the rendering-related ones, an additional pass is needed. Added missing enum bindings in BaseMaterial3D and VisualServer.
2020-02-11[Vulkan] Fix typo in shading modesYuri Roubinsky
2020-02-11Modernized default 3D material, fixes material bugs.Juan Linietsky
2020-02-11Environment sky more or less working.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-02Don't connect ShaderMaterial's `changed` signal when not in the editorHugo Locurcio
This closes #34741.
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-17Properly update texture when roughness/metallic setclayjohn
2019-11-02Force update SpatialMaterial when texture set and always use ALBEDOclayjohn
2019-10-28Merge pull request #33104 from qarmin/fix_some_crashesRémi Verschelde
Fix some crashes and using null pointers
2019-10-28Fix some crashes and using null pointersRafał Mikrut
2019-10-27Fixed using compressed textures and add work around for firefox webgl mesa ↵clayjohn
sampler limit
2019-10-23Allows change Sprite3D scale if Billboard mode is enabledYuri Roubinsky
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-09Remove ERR_EXPLAIN from scene/* codeTomasz Chabora
2019-07-22Revert "Tweak SpatialMaterial's default metallic and roughness texture channels"Rémi Verschelde
2019-07-18Fix binormal sign when using triplanar mappingBojidar Marinov
Fixes #30671
2019-06-20Merge pull request #26205 from Calinou/spatialmaterial-use-packed-channelsRémi Verschelde
Tweak SpatialMaterial's default metallic and roughness texture channels
2019-06-16Tweak some editor property hints to be more flexible and consistentHugo Locurcio
This partially addresses #19242.
2019-05-28Merge pull request #26978 from qarmin/fix_recursive_bitmapfont_crashRémi Verschelde
Fix crash when trying to set as Bitmap Font fallback one of his parent
2019-05-21Implement shadow to opacityBastiaan Olij
2019-05-03Fix crash when trying to set fallback or next pass with one of parentqarmin
2019-04-30Merge pull request #24437 from mateusfccp/single_quotes_optionRémi Verschelde
Add settings for single-quotes on completion
2019-02-25Several fixes to make GLES2 on HTML5 work much better.Juan Linietsky
Changed math class error reporting to be a bit less paranoid.
2019-02-24Explicitly use floating point numbers in the our shadersHein-Pieter van Braam
We need to be explicit about using floating point numbers in our shaders for compatibility with mobile GLES drivers.
2019-02-23-Treat scalar conversions when calling functions as error, closes #24261Juan Linietsky
-Make shader editor display errors if exist when just opening it -Make ShaderMaterial not lose parameters if opened in error.
2019-02-23Tweak SpatialMaterial's default metallic and roughness texture channelsHugo Locurcio
To follow the glTF 2.0 specification in all cases (including outside of imported glTF scenes), the blue channel is now used for metallic and the green channel is now used for roughness.
2019-02-22-Support DEPTH_TEXTURE in GLES2, fixes #25106Juan Linietsky
-Fix use of transparent framebuffers in GLES2 -Fix use of ambient color clearing in GLES2 when no environment exists.
2019-02-11Fix canvas particle material for old GLSL versionsJFonS
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-12-18Add settings for single-quotes on completionMateus Felipe C. C. Pinto
2018-12-11Merge pull request #23887 from ibrahn/dirty-material-list-lifetimeRémi Verschelde
Moved dirty material lists from static to lifetime controlled by main.
2018-12-11Merge pull request #22461 from dlasalle/#10480Rémi Verschelde
Hide shading options in SpatialMaterial when 'FLAG_UNSHADED' is set.
2018-12-08Reverse bitangent on everythings to ensure default normal map behavriour is ↵Bastiaan Olij
consistent
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-19Fixing tangent and binormal logicBastiaan Olij
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-28Fix particle frames being cut off after 0de8309b2c38306a2c05f8f239fa423bc1b7899bBojidar Marinov
Fixes #23178