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
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-21Cleanup: swap top/bottom args to planes_from_projmatCampbell Barton
X & Z were ordered min/max, where as Y was max/min.
2021-05-28DrawManager: Use Compute Shader to Update Hair.Jeroen Bakker
This patch will use compute shaders to create the VBO for hair. The previous implementation uses transform feedback. Timings before: between 0.000069s and 0.000362s. Timings after: between 0.000032s and 0.000092s. Speedup isn't noticeable by end-users. The patch is used to test the new compute shader pipeline and integrate it with the draw manager. Allowing EEVEE, Workbench and other draw engines to use compute shaders with the introduction of `DRW_shgroup_call_compute` and `DRW_shgroup_vertex_buffer`. Future improvements are possible by generating the index buffer of hair directly on the GPU. NOTE: that compute shaders aren't supported by Apple and still use the transform feedback workaround. Reviewed By: fclem Differential Revision: https://developer.blender.org/D11057
2021-05-26Revert "DrawManager: Use Compute Shader to Update Hair."Jeroen Bakker
This reverts commit 8f9599d17e80254928d2d72081a4c7e0dee64038. Mac seems to have an error with this change. ``` ERROR: /Users/blender/git/blender-vdev/blender.git/source/blender/draw/intern/draw_hair.c:115:44: error: use of undeclared identifier 'shader_src' ERROR: /Users/blender/git/blender-vdev/blender.git/source/blender/draw/intern/draw_hair.c:123:13: error: use of undeclared identifier 'shader_src' ERROR: make[2]: *** [source/blender/draw/CMakeFiles/bf_draw.dir/intern/draw_hair.c.o] Error 1 ERROR: make[1]: *** [source/blender/draw/CMakeFiles/bf_draw.dir/all] Error 2 ERROR: make: *** [all] Error 2 ```
2021-05-26DrawManager: Use Compute Shader to Update Hair.Jeroen Bakker
This patch will use compute shaders to create the VBO for hair. The previous implementation uses tranform feedback. Timings master (transform feedback with GPU_USAGE_STATIC between 0.000069s and 0.000362s Timings transform feedback with GPU_USAGE_DEVICE_ONLY. between 0.000057s and 0.000122s Timings compute shader between 0.000032 and 0.000092s Future improvements: * Generate hair Index buffer using compute shaders: currently done single threaded on CPU, easy to add as compute shader. Reviewed By: fclem Differential Revision: https://developer.blender.org/D11057
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
2021-01-06Cleanup: CodeStyle formatJeroen Bakker
2021-01-04Cleanup: docy comments beginning with '/**' don't end with '**/'Campbell Barton
2020-11-03Materials: add custom object properties as uniform attributes.Alexander Gavrilov
This patch allows the user to type a property name into the Attribute node, which will then output the value of the property for each individual object, allowing to e.g. customize shaders by object without duplicating the shader. In order to make supporting this easier for Eevee, it is necessary to explicitly choose whether the attribute is varying or uniform via a dropdown option of the Attribute node. The dropdown also allows choosing whether instancing should be taken into account. The Cycles design treats all attributes as one common namespace, so the Blender interface converts the enum to a name prefix that can't be entered using keyboard. In Eevee, the attributes are provided to the shader via a UBO indexed with resource_id, similar to the existing Object Info data. Unlike it, however, it is necessary to maintain a separate buffer for every requested combination of attributes. This is done using a hash table with the attribute set as the key, as it is expected that technically different but similar materials may use the same set of attributes. In addition, in order to minimize wasted memory, a sparse UBO pool is implemented, so that chunks that don't contain any data don't have to be allocated. The back-end Cycles code is already refactored and committed by Brecht. Differential Revision: https://developer.blender.org/D2057
2020-09-19Cleanup: consistent TODO/FIXME formatting for namesCampbell Barton
Following the most widely used convention for including todo's in the code, that is: `TODO(name):`, `FIXME(name)` ... etc.
2020-09-14Cleanup: DRWManager: Remove deprecated pass_state functionsClément Foucault
And also enable pass names when using `--debug-gpu` option.
2020-09-14Fix T80603 Workbench: Inverted alpha when renderingClément Foucault
This was caused by a left over DRWPass->state modification that made the subsequent samples redraw without Blending enabled. This led to incorrect blending. The fix is to use the new API for pass instancing.
2020-09-12GPU: Add Image Load Store extension supportClément Foucault
This wraps the functionality used to speedup EEVEE volumetrics. This touches the rendering code of EEVEE as it should fix a mis-usage of the GL barrier. The barrier changed type and location, removing an unused barrier.
2020-09-07Cleanup: spellingCampbell Barton
Also correct wrapped lines of example code in threads.cc.
2020-09-06GPUVertBuf: Make GPUVertBuf private to the GPU moduleClément Foucault
This is just a cleanup to isolate the internals of the vertbuf. This adds some getters to avoid refactor of existing code.
2020-09-04Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fixSebastian Parborg
No functional changes
2020-08-21GPUUniformBuf: Rename struct and change API a bitClément Foucault
This follows the GPU module naming of other buffers. We pass name to distinguish each GPUUniformBuf in debug mode. Also remove DRW_uniform_buffer interface.
2020-08-08Cleanup: use array syntax for sizeof with fixed valuesCampbell Barton
Also order sizeof(..) first to promote other values to size_t.
2020-08-08DRW: Fix runtime error: shifting signed 32bits intClément Foucault
2020-08-07Cleanup: Draw, Clang-Tidy else-after-return fixes (incomplete)Sybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/draw` module. Not all warnings are addressed in this commit. No functional changes.
2020-07-30Cleanup: GPU: Remove GPU_draw.h and move fluid gpu function to DRWClément Foucault
2020-07-30Cleanup: Split gpu_texture_image.c into BKE and IMB modulesClément Foucault
This is in order to disolve GPU_draw.h into more meaningful code blocks. All the Image related function are in `image_gpu.c`. All the MovieClip related function are in `movieclip.c`. The IMB module now has a connection with GPU. This is not strickly necessary and the code could be move to `image_gpu.c` if needed. The Image garbage collection is also ported to `image_gpu.c`.
2020-07-29Cleanup: GPU: Move Image based function to GPU_draw.hClément Foucault
This makes it less confusing what functions are for blender structures.
2020-07-27GPU: Fix crash and missing texture due to recent C++ portClément Foucault
Fix T79306 DRW: small issues with yesterday commits modifying TEXTARGET Fix T79303 Image texture node crashes EEVEE when connected to a shader output
2020-07-15PointCloud: Initial rendering support for WorkbenchClément Foucault
Also includes outline overlays. Removes the temp overlay drawing We make the geometry follow camera like billboards this uses less geometry. Currently we use half octahedron for now. Goal would be to use icospheres. This patch also optimize the case when pointcloud has uniform radius. However we should premultiply the radius prop by the default radius beforehand to avoid a multiplication on CPU. Using geometry instead of pseudo raytraced spheres is more scalable as we can render as low as 1 or 2 triangle to a full half sphere and can integrate easily in the render pipeline using a low amount of code. Reviewed By: brecht Differential Revision: https://developer.blender.org/D8301
2020-07-15DRW: View: Add ViewVecs calculationClément Foucault
This will remove some code duplication between draw engines.
2020-07-13Clang Tidy: enable readability-non-const-parameter warningJacques Lucke
Clang Tidy reported a couple of false positives. I disabled those `NOLINTNEXTLINE`. Differential Revision: https://developer.blender.org/D8199
2020-07-01Cleanup: spellingCampbell Barton
2020-06-24Fix T67319 DRW: Large objects gets incorrectly culledClément Foucault
To avoid this we just bypass culling if the object is too big to avoid float precision issues.
2020-06-24Fix T77913: Incorrect handling of negative-scale bit in DRWResourceHandleJacques Lucke
Reviewers: fclem Differential Revision: https://developer.blender.org/D8103
2020-06-19EEEVEE: Object Motion Blur: Initial ImplementationClément Foucault
This adds object motion blur vectors for EEVEE as well as better noise reduction for it. For TAA reprojection we just compute the motion vector on the fly based on camera motion and depth buffer. This makes possible to store another motion vector only for the blurring which is not useful for TAA history fetching. Motion Data is saved per object & per geometry if using deformation blur. We support deformation motion blur by saving previous VBO and modifying the actual GPUBatch for the geometry to include theses VBOs. We store Previous and Next frame motion in the same motion vector buffer (RG for prev and BA for next). This makes non linear motion blur (like rotating objects) less prone to outward/inward blur. We also improve the motion blur post process to expand outside the objects border. We use a tile base approach and the max size of the blur is set via a new render setting. We use a background reconstruction method that needs another setting (Background Separation). Sampling is done using a fixed 8 dithered samples per direction. The final render samples will clear the noise like other stochastic effects. One caveat is that hair particles are not yet supported. Support will come in another patch. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7297
2020-06-08Workbench: Use eGPUSamplerState to change texture sampling behaviorClément Foucault
This removes some fragment shader hacks and improve the support of different repeat & filtering modes. This fix T77453 Image texture not repeating in viewport
2020-06-04GPUShaderInterface: Add Builtin Uniform blocks queryClément Foucault
This makes the query of theses mandatory uniforms faster.
2020-06-03GPUMaterial: Add support for different sampler state per image samplerClément Foucault
This bridge between the new sampler state support from GPUTexture and draw material handling. The Sampler State is just the one from the texture for now. No change in logic.
2020-06-03GPUTexture: Add support for binding textures with custom sampler statesClément Foucault
2020-06-03Cleanup: DRW: Remove support for ModelViewProjectionMatrixClément Foucault
This has been replace by manual model+viewproj transform inside the shader.
2020-06-03Cleanup: DRW: Remove support for builtin matricesClément Foucault
2020-06-03Cleanup: DRW: Remove persistent uniform functionsClément Foucault
2020-06-03DRW: Remove automatic bind locations and use hardcoded locations for texturesClément Foucault
This cleanup use the recent changes in shader interface to allow querying the binding location a texture should use. This should aleviate all issue we have with texture state change recompiling the shaders at drawtime. All binds are now treated like persistent binds and will stick until a new shading group bind a different shader. The only difference is that you can still change it with a new subgroup or same shader shgroup. Since unbinding can be heavy we only do it when using `--debug-gpu`.
2020-06-02EEVEE: Refactor of eevee_material.cClément Foucault
These are the modifications: -With DRW modification we reduce the number of passes we need to populate. -Rename passes for consistent naming. -Reduce complexity in code compilation -Cleanup how renderpass accumulation passes are setup, using pass instances. -Make sculpt mode compatible with shadows -Make hair passes compatible with SSS -Error shader and lookdev materials now use standalone materials. -Support default shader (world and material) using a default nodetree internally. -Change BLEND_CLIP to be emulated by gpu nodetree. Making less shader variations. -Use BLI_memblock for cache memory allocation. -Renderpasses are handled by switching a UBO ref bind. One major hack in this patch is the use of modified pointer as ghash keys. This rely on the assumption that the keys will never overlap because the number of options per key will never be bigger than the pointed struct. The use of one single nodetree to support default material is also a bit hacky since it won't support concurent usage of this nodetree. (see EEVEE_shader_default_surface_nodetree) Another change is that objects with shader errors now appear solid magenta instead of shaded magenta. This is only because of code reuse purpose but could be changed if really needed. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7642
2020-06-02Cleanup: GPU: Remove GPU_shaderinterface_uniform_ensureClément Foucault
2020-06-02DRW: Remove defered uniform creationClément Foucault
2020-05-28DRW: Add DRW_shgroup_uniform_vec4_array_copyClément Foucault
2020-05-18Fix T76730 DRW: Sorting of empty shading groups.Clément Foucault
This is to fix an assert in EEVEE caused by a transparent shading group that is create but not populated by any drawcall.
2020-05-14Fix T75908: Sculpt GPU Batches + Render ArtifactsJeroen Bakker
When sculpting the GPU batches are constructed with only the required data for a single viewport. When that viewport changes shading or coloring mode (object to vertex) batches might not hold all the needed information. There is also a case when you have two 3d viewport one in object color mode and the other in vertex color mode that the GPU batches were updated without any vertex colors. In order to fix these category of issues this patch would always construct the full GPU batches for sculpting. Reviewed By: Clément Foucault, Pablo Dobarro Maniphest Tasks: T75908 Differential Revision: https://developer.blender.org/D7701
2020-04-22Fix T75981: crash in sculpt mode with mesh that used to have multiple materialsBrecht Van Lommel
The material indices in a mesh can exceed the number of available materials slots in the object or mesh, sculpt drawing was not taking that into account.
2020-04-03Code Quality: Replace for loops with LISTBASE_FOREACHDalai Felinto
Note this only changes cases where the variable was declared inside the for loop. To handle it outside as well is a different challenge. Differential Revision: https://developer.blender.org/D7320
2020-04-03Cleanup: Including "BLI_listbase.h" for LISTBASE_FOREACH macroDalai Felinto
These headers are not needed right away, but will be in the upcoming commit.
2020-04-03Cleanup: split `BKE_anim.h` and `anim.c` into smaller piecesSybren A. Stüvel
The files are now split up into the following sections: - `BKE_anim_path.h` and `anim_path.c` for path/curve functions. - `BKE_anim_visualization.h` and `anim_visualizationanim_path.c` for animation visualization (mostly motion paths). - `BKE_duplilist.h` for DupliList function declarations. These were already implemented in `object_dupli.c`, so they were rather out of place being declared in `BKE_anim.h` in the first place. No functional changes.