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
2020-06-23Fix T77803: IK Degrees of freedom drawing glitchJeroen Bakker
Forgot to update the lineOutput what resulted in that the sphere was not rendered on all platforms. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D8098
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-03Cleanup: DRW: Remove builtin 3D only shader usageClément Foucault
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-05-19Fix: build error due to missing definitionsJacques Lucke
Reviewers: sergey, brecht Differential Revision: https://developer.blender.org/D7787
2020-05-14Sculpt: Render Face Sets always as flat shadingPablo Dobarro
This removes the smooth shading rendering from the face set overlay when smooth shading is enabled. Reviewed By: jbakker Maniphest Tasks: T74906, T74622, T75331, T76530 Differential Revision: https://developer.blender.org/D7105
2020-03-18Objects: Eevee and workbench rendering of new Volume, Hair, PointCloudBrecht Van Lommel
Only the volume drawing part is really finished and exposed to the user. Hair plugs into the existing hair rendering code and is fairly straightforward. The pointcloud drawing is a hack using overlays rather than Eevee and workbench. The most tricky part for volume rendering is the case where each volume grid has a different transform, which requires an additional matrix in the shader and non-trivial logic in Eevee volume drawing. In the common case were all the transforms match we don't use the additional per-grid matrix in the shader. Ref T73201, T68981 Differential Revision: https://developer.blender.org/D6955
2020-03-17VR: Initial Virtual Reality support - Milestone 1, Scene InspectionJulian Eisel
NOTE: While most of the milestone 1 goals are there, a few smaller features and improvements are still to be done. Big picture of this milestone: Initial, OpenXR-based virtual reality support for users and foundation for advanced use cases. Maniphest Task: https://developer.blender.org/T71347 The tasks contains more information about this milestone. To be clear: This is not a feature rich VR implementation, it's focused on the initial scene inspection use case. We intentionally focused on that, further features like controller support are part of the next milestone. - How to use? Instructions on how to use this are here: https://wiki.blender.org/wiki/User:Severin/GSoC-2019/How_to_Test These will be updated and moved to a more official place (likely the manual) soon. Currently Windows Mixed Reality and Oculus devices are usable. Valve/HTC headsets don't support the OpenXR standard yet and hence, do not work with this implementation. --------------- This is the C-side implementation of the features added for initial VR support as per milestone 1. A "VR Scene Inspection" Add-on will be committed separately, to expose the VR functionality in the UI. It also adds some further features for milestone 1, namely a landmarking system (stored view locations in the VR space) Main additions/features: * Support for rendering viewports to an HMD, with good performance. * Option to sync the VR view perspective with a fully interactive, regular 3D View (VR-Mirror). * Option to disable positional tracking. Keeps the current position (calculated based on the VR eye center pose) when enabled while a VR session is running. * Some regular viewport settings for the VR view * RNA/Python-API to query and set VR session state information. * WM-XR: Layer tying Ghost-XR to the Blender specific APIs/data * wmSurface API: drawable, non-window container (manages Ghost-OpenGL and GPU context) * DNA/RNA for management of VR session settings * `--debug-xr` and `--debug-xr-time` commandline options * Utility batch & config file for using the Oculus runtime on Windows. * Most VR data is runtime only. The exception is user settings which are saved to files (`XrSessionSettings`). * VR support can be disabled through the `WITH_XR_OPENXR` compiler flag. For architecture and code documentation, see https://wiki.blender.org/wiki/Source/Interface/XR. --------------- A few thank you's: * A huge shoutout to Ray Molenkamp for his help during the project - it would have not been that successful without him! * Sebastian Koenig and Simeon Conzendorf for testing and feedback! * The reviewers, especially Brecht Van Lommel! * Dalai Felinto for pushing and managing me to get this done ;) * The OpenXR working group for providing an open standard. I think we're the first bigger application to adopt OpenXR. Congratulations to them and ourselves :) This project started as a Google Summer of Code 2019 project - "Core Support of Virtual Reality Headsets through OpenXR" (see https://wiki.blender.org/wiki/User:Severin/GSoC-2019/). Some further information, including ideas for further improvements can be found in the final GSoC report: https://wiki.blender.org/wiki/User:Severin/GSoC-2019/Final_Report Differential Revisions: D6193, D7098 Reviewed by: Brecht Van Lommel, Jeroen Bakker
2020-03-11EEVEE: Replace octahedron reflection probe by cubemap arrayClément Foucault
We implement cubemap array support for EEVEE's lightcache reflection probes. This removes stretched texels and bottom hemisphere seams artifacts caused by the octahedral projection previously used. This introduce versioning code for the lightcache which will discard any lightcache version that is not compatible. Differential Revision: https://developer.blender.org/D7066
2020-03-11Workbench Simplification RefactorClément Foucault
This patch is (almost) a complete rewrite of workbench engine. The features remain unchanged but the code quality is greatly improved. Hair shading is brighter but also more correct. This also introduce the concept of `DRWShaderLibrary` to make a simple include system inside the GLSL files. Differential Revision: https://developer.blender.org/D7060
2020-03-09GPencil: Refactor of Draw Engine, Vertex Paint and all internal functionsAntonio Vazquez
This commit is a full refactor of the grease pencil modules including Draw Engine, Modifiers, VFX, depsgraph update, improvements in operators and conversion of Sculpt and Weight paint tools to real brushes. Also, a huge code cleanup has been done at all levels. Thanks to @fclem for his work and yo @pepeland and @mendio for the testing and help in the development. Differential Revision: https://developer.blender.org/D6293
2020-02-24Cleanup: Workbench: Remove checkerboard depthClément Foucault
This is not needed anymore with the new overlay xray fading.
2020-02-24Overlay: Remove Xray dithering noiseClément Foucault
We now use a better smoother technique that uses correct alpha blending. This is possible now that we render overlays in a separate buffer.
2020-02-21EEVEE: Render PassesJeroen Bakker
This patch adds new render passes to EEVEE. These passes include: * Emission * Diffuse Light * Diffuse Color * Glossy Light * Glossy Color * Environment * Volume Scattering * Volume Transmission * Bloom * Shadow With these passes it will be possible to use EEVEE effectively for compositing. During development we kept a close eye on how to get similar results compared to cycles render passes there are some differences that are related to how EEVEE works. For EEVEE we combined the passes to `Diffuse` and `Specular`. There are no transmittance or sss passes anymore. Cycles will be changed accordingly. Cycles volume transmittance is added to multiple surface col passes. For EEVEE we left the volume transmittance as a separate pass. Known Limitations * All materials that use alpha blending will not be rendered in the render passes. Other transparency modes are supported. * More GPU memory is required to store the render passes. When rendering a HD image with all render passes enabled at max extra 570MB GPU memory is required. Implementation Details An overview of render passes have been described in https://wiki.blender.org/wiki/Source/Render/EEVEE/RenderPasses Future Developments * In this implementation the materials are re-rendered for Diffuse/Glossy and Emission passes. We could use multi target rendering to improve the render speed. * Other passes can be added later * Don't render material based passes when only requesting AO or Shadow. * Add more passes to the system. These could include Cryptomatte, AOV's, Vector, ObjectID, MaterialID, UV. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D6331
2020-02-11DRW: Color Management improvementClément Foucault
Reviewed By: brecht sergey jbakker Differential Revision: http://developer.blender.org/D6729
2020-02-04Selection: Add conservative rasterization to select really small objectsClément Foucault
The conservative depth shader is ~4.5x slower than the normal one as it uses geometry shader and fragment shader discard. This patch also includes a hack to also fix the view parallel planar geometry and the really small wire objects. For some reason, the conservative raster fix does not work with normal selection but does with box select. This is a fix for T63356. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D6714
2019-12-17Cleanup: sort file listsCampbell Barton
2019-12-05Overlay Engine: Armature: Use Wire AA on custom bone loose edgesClément Foucault
2019-12-05Overlay Engine: Fix bone outline antialiasingClément Foucault
2019-12-05Overlay Engine: LightProbe: Simplify drawing of irradiance grid dataClément Foucault
This separates it from the outline pass and fix a visibility bug when extras were off.
2019-12-05Overlay Engine: Simplify outline rendering by using the antialiasing passClément Foucault
This use the overlay AA pass to antialias the selection outlines. This also do all search and expand in one pass and reduce the computation time and memory used (2 x 32bit/pixel buffer less). Note that the aliasing is a bit worse than the old FXAA that we used to have.
2019-12-02Overlay Engine: Wireframe: Remove geometry shader and fragment discardClément Foucault
This Simplify and should also speedup the drawing a tiny bit. We now discard the edges in the vertex shader by setting one of the verts at vec4(0,0,0,0) to not produce any fragment
2019-12-02Overlay Engine: Refactor & CleanupClément Foucault
This is the unification of all overlays into one overlay engine as described in T65347. I went over all the code making it more future proof with less hacks and removing old / not relevent parts. Goals / Acheivements: - Remove internal shader usage (only drw shaders) - Remove viewportSize and viewportSizeInv and put them in gloabl ubo - Fixed some drawing issues: Missing probe option and Missing Alt+B clipping of some shader - Remove old (legacy) shaders dependancy (not using view UBO). - Less shader variation (less compilation time at first load and less patching needed for vulkan) - removed some geom shaders when I could - Remove static e_data (except shaders storage where it is OK) - Clear the way to fix some anoying limitations (dithered transparency, background image compositing etc...) - Wireframe drawing now uses the same batching capabilities as workbench & eevee (indirect drawing). - Reduced complexity, removed ~3000 Lines of code in draw (also removed a lot of unused shader in GPU). - Post AA to avoid complexity and cost of MSAA. Remaining issues: - ~~Armature edits, overlay toggles, (... others?) are not refreshing viewport after AA is complete~~ - FXAA is not the best for wires, maybe investigate SMAA - Maybe do something more temporally stable for AA. - ~~Paint overlays are not working with AA.~~ - ~~infront objects are difficult to select.~~ - ~~the infront wires sometimes goes through they solid counterpart (missing clear maybe?) (toggle overlays on-off when using infront+wireframe overlay in solid shading)~~ Note: I made some decision to change slightly the appearance of some objects to simplify their drawing. Namely the empty arrows end (which is now hollow/wire) and distance points of the cameras/spots being done by lines. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6296
2019-11-27EEVEE: GLSL RenderpassesJeroen Bakker
Most of the renderpasses in EEVEE used post-processing on the CPU. For final image rendering this is sufficient, but when we want to display the data to the user we don't want to transfer to the CPU to do post processing to then upload it back to the GPU to display the result. This patch moves the renderpass postprocessing to a GLSL shader. This is the first step to do, before we will enable the renderpasses in the viewport. Reviewed By: fclem Differential Revision: https://developer.blender.org/D6206
2019-10-16Fix T68380 Skin modifier root not displayedClément Foucault
2019-09-09Cleanup: sort struct, file listsCampbell Barton
2019-09-05Eevee: Shadow map refactorClément Foucault
Reviewed By: brecht Differential Revision: http://developer.blender.org/D5659
2019-08-263D View: show selected object axis when affect origins is enabledCampbell Barton
This replaces temporarily enabling draw-axis.
2019-08-14Mesh Batch Cache: Refactor + MultithreadClément Foucault
For clarity sake, the batch cache now uses exclusively per Loop attributes. While this is a bit of a waste of VRAM (for the few case where per vert attribs are enough) it reduces the complexity and amount of overall VBO to update in general situations. This patch also makes the VertexBuffers filling multithreaded. This make the update of dense meshes a bit faster. The main bottleneck is the IndexBuffers update which cannot be multithreaded efficiently (have to increment a counter and/or do a final sorting pass). We introduce the concept of "extract" functions/step. All extract functions are executed in one thread each and if possible, using multiple thread for looping over all elements. Reviewed By: brecht Differential Revision: http://developer.blender.org/D5424
2019-08-14Cleanup: clang-format, sort structs & cmake filesCampbell Barton
2019-08-12Cleanup: DRW manager: Move `select_buffer.c` utilities out of the selection ↵mano-wii
engine internals
2019-08-07Edit Mesh Selection: Move ED_view3d_select_ functions to bf_drawmano-wii
It is easier to deal with private values of the DRW_select engine and gives room for improvement. Reviewers: campbellbarton, fclem Differential Revision: https://developer.blender.org/D5415
2019-08-04Cleanup: Fix eeve_lut arrays being duplicated in blender binary.Lazydodo
Both eevee_materials.c and workbench_deferred.c include eeve_lut.h which has its arrays marked as static leading to the blue_noise array being embedded into our binary twice. This change takes the arrays out of the header and properly marks them as const since they are lookup tables and should not be written to. Reviewers: fclem, brecht Differential Revision: https://developer.blender.org/D5346
2019-07-31Cleanup: Rearrange Select Engine into multiple filesmano-wii
2019-07-303D View: Move selection API to a Selection engine.mano-wii
This commit moves the API of selecting faces, vertices and edges to a DRW manager engine. Reviewers: campbellbarton, fclem Subscribers: jbakker, brecht Differential Revision: https://developer.blender.org/D5090
2019-06-21Fix T62876: Camera Background ImagesJeroen Bakker
Migrate old legacy code to the draw mamager/object mode. The old legacy version did not work with wireframe. By migrating the code to modern draw manager code we have mode control on the drawing process. Still background images do not work with OIT, the cause seems to be that the transparent pixels are treated as background pixels. Also There are some artifacts when working with Holdouts and DoF, this is because the draw engines do not pass the correct alpha values. Reviewers: fclem, brecht Differential Revision: https://developer.blender.org/D4638
2019-06-21Fix T65745: Bone Selection X-Ray Drawing.Jeroen Bakker
The Pose Bone Selection used normal matric multiplication, but that mismatched the Depth buffer from all draw engines. They used the optimized matrices from common_view_lib. This change will use the optimized version, so the depth buffer matches and the render artifacts would be correct. Please note that bone selection is not using shcfg and therefore render clipping is still off. Reviewed By: fclem Differential Revision: https://developer.blender.org/D5100
2019-06-05TexturePaint: Missing Texture Depth TestJeroen Bakker
Depth testing was off as it used the precomputed ModelView matrix. As draw engines currently use a different approach the depth was sometimes a bit off making the color disappear. This change will use a different vertex shader that will write the correct depth. I expected the same change to be needed in the bone selection overlay but was not able to reproduce it. Reviewed By: fclem Maniphest Tasks: T64615 Differential Revision: https://developer.blender.org/D5006
2019-06-04Eevee: Merge shadow map processing into one drawcall per lightClément Foucault
This removes a lot of framebuffer configuration and binding.
2019-05-08DRW: Move all batch request functions to own headerClément Foucault
This is in order to using BLI_INLINE for thoses functions and keep headers cleany separated.
2019-04-25Overlay: Mesh AnalysisJeroen Bakker
Enabling the drawing of the mesh analysis overlay. Currently the settings are part of the scene toolsettings. What makes sense, for 3d printing, but does not fit well with the per viewport blender 2.80 overlays. Reviewers: brecht, fclem Differential Revision: https://developer.blender.org/D4707
2019-04-24Cleanup: sort CMake include pathsCampbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-16CMake: add libs needed for gtestsCampbell Barton
2019-04-16CMake: add library deps to CMakeLists.txtCampbell Barton
Tested to work on Linux and macOS. This will be enabled once all platforms are verified. See D4684
2019-04-14CMake: prepare for BLENDER_SORTED_LIBS removalCampbell Barton
No functional change, this adds LIB definition and args to cmake files. Without this it's difficult to migrate away from 'BLENDER_SORTED_LIBS' since there are many platforms/configurations that could break when changing linking order. Manually add and enable WITHOUT_SORTED_LIBS to try building without sorted libs (currently fails since all variables are empty). This check will eventually be removed. See T46725.
2019-04-06DRW: Opti: Fix hotspot in DRW_mesh_batch_cache_get_surface_shadedClément Foucault
The hotspot was generated by mesh_cd_layers_type_overlap who was testing way more data than it should have. Here we reduce the whole CD layer mask to a 32bit bitflag that is easily or'ed and tested. Bonus point: We use atomic operation to merge the mask in order to allow future multi-threading. (this was a TODO) In the scene attached to T58188 this removes 5% of CPU time.
2019-02-27Cleanup: file rename lamp -> lightCampbell Barton
2019-02-14DRW: de-duplicate vertex & weight paint enginesCampbell Barton
These were almost exact duplicates, use one engine for drawing both kinds of vertex color.
2019-02-06GPU: refactor clipped drawing from DRW into GPUCampbell Barton
Needed to fix T61196, supporting clipped back-buffer in the 3D view which is done outside the draw module. It was also inconvenient having DRW_shader_* versions of GPU_shader_* API calls. - Clipping distances are now supported as a shader configuration for builtin shaders. - Add shader config argument when accessing builtin shaders. - Move GPU_shader_create_from_arrays() from DRW to GPU.