Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-07-15Fix: Move DRW_shgroup_add_material_resources(grp, mat) to after the ↵Martijn Versteegh
null-check for grp. Reviewed By: fclem Maniphest Tasks: T99646 Differential Revision: https://developer.blender.org/D15436
2022-07-15Fix T99606: Regression: TexCoordinate losing precision far away from originClément Foucault
Same root cause as T99128. The fix also needed to be done in another place.
2022-07-11Cleanup: spelling in commentsCampbell Barton
2022-07-01Metal: MTLMemoryManager implementation includes functions which manage ↵Jason Fielder
allocation of MTLBuffer resources. The memory manager includes both a GPUContext-local manager which allocates per-context resources such as Circular Scratch Buffers for temporary data such as uniform updates and resource staging, and a GPUContext-global memory manager which features a pooled memory allocator for efficient re-use of resources, to reduce CPU-overhead of frequent memory allocations. These Memory Managers act as a simple interface for use by other Metal backend modules and to coordinate the lifetime of buffers, to ensure that GPU-resident resources are correctly tracked and freed when no longer in use. Note: This also contains dependent DIFF changes from D15027, though these will be removed once D15027 lands. Authored by Apple: Michael Parkin-White Ref T96261 Reviewed By: fclem Maniphest Tasks: T96261 Differential Revision: https://developer.blender.org/D15277
2022-06-30Cleanup: Remove scene frame macros (`CFRA` et al.)Julian Eisel
Removes the following macros for scene/render frame values: - `CFRA` - `SUBFRA` - `SFRA` - `EFRA` These macros don't add much, other than saving a few characters when typing. It's not immediately clear what they refer to, they just hide what they actually access. Just be explicit and clear about that. Plus these macros gave read and write access to the variables, so eyesores like this would be done (eyesore because it looks like assigning to a constant): ``` CFRA = some_frame_nbr; ``` Reviewed By: sergey Differential Revision: https://developer.blender.org/D15311
2022-06-30Cleanup: spelling in commentsCampbell Barton
2022-06-29Fix T98697: EEVEE: Regression: Missing custom property from volumetricsClément Foucault
The resource binding were missing from the shading group (`shgroup->uniform_attrs`), leading to no custom property UBO creation (`drw_uniform_attrs_pool_update`) when issuing the drawcall, resulting in a missing UBO bind. The fix make sure to no duplicate the bindings by creating a simple shader bind instead of a `GPUMaterial` bind. Candidate for 3.2.1 corrective release.
2022-06-29Fix T99128: EEVEE: Regression: Pixelated Environment TextureClément Foucault
Use view position to retreive world space direction to retain float precision. Candidate for 3.2.1 corrective release.
2022-06-29Fix T99138: EEVEE: Regression: World volume shader incorrect texture coordsClément Foucault
The ORCO property was not being properly initialized in this case. Candidate for 3.2.1 corrective release.
2022-06-28DRW: Curve: Fix wrong UBO alignmentClément Foucault
This was preventing correct attribute rendering with multiple attributes. Since the `CurveInfos` struct is used for data sharing between C++ and GLSL and inside a UBO it needs to obey the `std140` alignment rules which states that arrays of scalars are padded to the size of `vec4` for each array entry.
2022-06-21Cleanup: remove unneeded code in eevee_bloom.Jeroen Bakker
This had to be added to the previous commit.
2022-06-21Fix T98972: EEVEE Bloom Pass Outputs Final Image Instead of Bloom.Jeroen Bakker
Regression introduced by {rBca37654b6327}. This commit reversed the order of loading uniforms. The bloom renderpass used the previous loading order to overwrite an existing uniform (bloomBaseAdd). Due to the new ordering this doesn't work anymore where the render pass outputted an image similar to the final image. This was fixed by loading the correct value for bloomAddBase and remove the rewrite.
2022-06-20Fix T99019 EEVEE: Regression: Specular BSDF does not apply occlusionClément Foucault
Since the occlusion input is going to be removed in EEVEE-Next, I just added a temporary workaround. The occlusion is passed as SSS radius as the Specular BSDF does not use it. The final result matches 3.1 release
2022-06-17Fix T98663: Eevee compilation error cryptomatte shaders.Jeroen Bakker
On MacOS Eevee cyptomatte shaders fails as it doesn't ignore the `attrib_load` parameter. I validated that removind the parameter works on Linux/AMD and MacOS Intel. It could be that there are other platforms that require the dummy parameter. If this should use a forward declaration and implement an emoty function in the cryptomatte vertex shader.
2022-06-07Merge branch 'blender-v3.2-release'Clément Foucault
# Conflicts: # source/blender/draw/engines/eevee/shaders/volumetric_vert.glsl
2022-06-07Fix EEVEE: Shader error when using volume temperature or color attributesClément Foucault
This bug was unreported. This was triggering a linking error caused by the vertex shader not having a local version of `attr_load_temperature_post` and `attr_load_color_post`.
2022-06-07Cleanup: spelling in comments, additional white spaceCampbell Barton
2022-06-01Cleanup: spelling in comments, use doxy sectionsCampbell Barton
2022-05-30Cleanup: fix various typosBrecht Van Lommel
Contributed by luzpaz Differential Revision: https://developer.blender.org/D15057
2022-05-24Cleanup: make formatJacques Lucke
2022-05-24EEVEE: support Curves attributes renderingKévin Dietrich
This adds support to render Curves attributes in EEVEE. Each attribute is stored in a texture derived from a VBO. As the shading group needs the textures to be valid upon creation, the attributes are created and setup during its very creation, instead of doing it lazily via create_requested which we cannot rely on anyway as contrary to the mesh batch, we do cannot really tell if attributes need to be updated or else via some `DRW_batch_requested`. Since point attributes need refinement, and since attributes are all cast to vec4/float4 to account for differences in type conversions between Blender and OpenGL, the refinement shader for points is used as is. The point attributes are stored for each subdivision level in CurvesEvalFinalCache. Each subdivision level also keeps track of the attributes already in use so they are properly updated when needed. Some basic garbage collection was added similar to what is done for meshes: if the attributes used over time have been different from the currently used attributes for too long, then the buffers are freed, ensuring that stale attributesare removed. This adds `CurvesInfos` to the shader creation info, which stores the scope in which the attributes are defined. Scopes are stored as booleans, in an array indexed by attribute loading order which is also the order in which the attributes were added to the material. A mapping is necessary between the indices used for the scoping, and the ones used in the Curves cache, as this may contain stale attributes which have not been garbage collected yet. Common utilities with the mesh code for handling requested attributes were moved to a separate file. Differential Revision: https://developer.blender.org/D14916
2022-05-23Cleanup: GPU: Remove `gpu_shader_common_obinfos_lib.glsl`Clément Foucault
This has been replaced by `draw_object_infos`.
2022-05-23Fix T98251: EEVEE: Regression: Wrong normalmaps on scaled objectsClément Foucault
This was caused by a missing `normalize`.
2022-05-23Cleanup: GPU: Remove `gpu_shader_common_obinfos_lib.glsl`Clément Foucault
This has been replaced by `draw_object_infos`.
2022-05-23Fix T98251: EEVEE: Regression: Wrong normalmaps on scaled objectsClément Foucault
This was caused by a missing `normalize`.
2022-05-23Merge branch 'blender-v3.2-release'Clément Foucault
2022-05-23Fix T98128: EEVEE: Regression: Inverted surface normal on MacOS Intel GPUClément Foucault
This seems to be caused by the `!` used in conjunction with a macro. Using the macro directly as condition does not exhibit this issue.
2022-05-19Cleanup: format, reduce line length & strip trailing spaceCampbell Barton
2022-05-13Cleanup: spelling in comments, capitalize tagsCampbell Barton
Also add missing task-ID reference & remove colon after \note as it doesn't render properly in doxygen.
2022-05-12Merge branch 'blender-v3.2-release'Bastien Montagne
2022-05-12Fix T98026 EEVEE: Refression Crash when rendering Cryptomatte passesClément Foucault
This was because the main `surface_vert.glsl` was changed to accomodate the needs of the `ShaderCreateInfo` but was still used by the cryptomatte shader. The fix is to include the same libraries as the material shaders and bypass `attrib_load()`.
2022-05-12Merge branch 'blender-v3.2-release'Jacques Lucke
2022-05-12Fix T97380 EEVEE: Weird motion-blur on curvesClément Foucault
This was caused by the `mb_data->obmat[]` being wrong because they are now shared between the particle system and the object. But Hair need the dupli parent matrix instead of the object matrix. Disabling `Show Emitter` option fixes the bug. To avoid this problem, request a different `EEVEE_ObjectMotionData` for particle systems using a different key pointer in the hash. This is a bit dirty but there is less code polution using this workaround. Differential Revision: https://developer.blender.org/D14911
2022-05-11Cleanup: use '_num' / '_count' suffix instead of '_ct'Campbell Barton
Use num & count (for counters), in drawing code, see: T85728.
2022-05-10Merge branch 'blender-v3.2-release'Clément Foucault
2022-05-10Fix T97985 EEVEE: Shader mixing not working correctly when reusing shader nodesClément Foucault
This was caused by the `Closure` members being added to the final contribution more than once. The workaround is to clear the members once a closure has been added to the final contribution. I used `inout` on `Closure` inputs so that the render engine implementation of mix and add closure nodes can do its own thing. The nodegraph handling of inout was changed for this to work.
2022-05-09Fix T97983 EEVEE: Tangent Normal of Curves info behaves differently in EeveeClément Foucault
Curve tangent was correctly mistaken with curve normal. This patch fixes the name of the output in the glsl function and make curve attributes more explicit (with `curve_` prefix). This also improve the normal computation by making it per pixel to match cycles. Also ports the changes to eevee-next.
2022-05-09Merge branch 'blender-v3.2-release'Jeroen Bakker
2022-05-07EEVEE: Fix missing function implementation for volumetric materialsClément Foucault
This was leading to linking errors. Fixes T97779 Regression: World volume noise stopped working
2022-05-07Fix T97796 EEVEE: Regression: Alpha clipped materials rendered as alpha hashedClément Foucault
This was because the alpha clip thresholding was previously done in the material nodes codegen. Now it is the responsibility of the engine to implement it. This adds a loose uniform that is set by EEVEE itself to control the clip behavior.
2022-05-07Fix T97881 EEVEE: First Specular and SSS closure not contributing on alpha ↵Clément Foucault
blended material This was because the evaluation was still being deferred just like for the opaque case.
2022-05-06Cleanup: spelling in comments, use doxygen commentsCampbell Barton
2022-05-03Merge remote-tracking branch 'origin/blender-v3.2-release'Kévin Dietrich
2022-05-03Fix T93179: geonodes UVs and Vertex colors do not work in EEVEEKévin Dietrich
Overwriting UV map or vertex color data in Geometry nodes will move the layers to another CustomData channel, and as such, will make attribute lookup fail from the UVMap and Vertex Color nodes in EEVEE as the CustomDataType will also be modified (i.e. no longer `CD_MTFACE` or `CD_MCOL`). As discussed in T93179, the solution is to use `CD_PROP_AUTO_FROM_NAME` so that the render engine is able to find the attributes. This also makes EEVEE emulate Cycles behaviour in this regard. `attr_load_uv` and `attr_load_color` are also removed in favor of the generic attribute API in the various GLSL shaders. Although `CD_PROP_AUTO_FROM_NAME` is now used even for UV maps, the active UV map is still used in case the attribute name is empty, to preserve the old behavior. Differential Revision: https://developer.blender.org/D13730
2022-05-03Cleanup: spelling in commentsCampbell Barton
2022-05-02EEVEE: Fix compilation on MSVCClément Foucault
2022-04-28EEVEE: Add shader compilation progress in the viewportClément Foucault
Since rBfa43c47c7cb8446b632a4c0f712162ba615fe51f the progress bar do not show the compilation progress. This was misleading as users could think it could be canceled or prevent rendering. Now we just show how many shaders are still in the compilation queue inside each viewport. This number is more accurate than the percentage that was previously displayed in the progress bar.
2022-04-27Metal: GLSL Compatibility - Hosting default uniform values.Jason Fielder
There are a number of shaders, most notably grid_frag.glsl, which rely on default assignments to uniform values within shaders. This is not currently supported by the shader uniform push model implemented for the Metal backend, wherein uniform updates are pushed as a singular block of data. Any default assignment would become over-written. As such, adding assignments of these default values in the high-level, to ensure the correct value is written for all APIs. This likely impacts Vulkan push-constants as well. Authored by Apple: Michael Parkin-White Ref T96261 Reviewed By: fclem Maniphest Tasks: T96261 Differential Revision: https://developer.blender.org/D14555
2022-04-22Curves: Further split of curves draw code from particlesHans Goudey
Extends the changes started in f31c3f8114616bb to completely separate much of the DRW curves code from the particle hair drawing. In the short term this increases duplication, but the idea is to simplify development by making it easier to do larger changes to the new code, and the new system will replace the particle hair at some point. After this, only the shaders themselves are shared. Differential Revision: https://developer.blender.org/D14699
2022-04-20Cleanup: spelling in commentsCampbell Barton