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-01-06Viewport Compositor: Add a UBO for the compositorOmar Emara
This patch adds a new dedicated UBO for compositor shaders. The FrameNumber UBO member was moved to the new UBO. Additionally, the OCIO luminance coefficients were added to the UBO for utilization by various compositor operations.
2021-09-29Merge branch 'eevee-rewrite' into viewport-compositorClément Foucault
# Conflicts: # source/blender/blenkernel/BKE_scene.h # source/blender/blenkernel/intern/scene.c # source/blender/draw/intern/draw_manager.c # source/blender/draw/intern/draw_manager.h # source/blender/nodes/composite/nodes/node_composite_composite.cc
2021-09-29Merge branch 'draw-viewport-data' into eevee-rewriteClément Foucault
# Conflicts: # source/blender/draw/engines/eevee/eevee_cryptomatte.c # source/blender/draw/engines/eevee/eevee_effects.c # source/blender/draw/engines/eevee/eevee_engine.c # source/blender/draw/engines/eevee/eevee_lookdev.c # source/blender/draw/engines/eevee/eevee_materials.c # source/blender/draw/engines/eevee/eevee_motion_blur.c # source/blender/draw/engines/eevee/eevee_private.h # source/blender/draw/engines/eevee/eevee_render.c # source/blender/draw/engines/eevee/eevee_subsurface.c # source/blender/draw/engines/eevee/eevee_volumes.c # source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl # source/blender/draw/engines/eevee/shaders/effect_downsample_frag.glsl # source/blender/draw/engines/eevee/shaders/effect_minmaxz_frag.glsl # source/blender/draw/intern/DRW_render.h # source/blender/draw/intern/draw_cache.h # source/blender/gpu/GPU_material.h # source/blender/gpu/intern/gpu_codegen.c # source/blender/gpu/intern/gpu_material.c # source/blender/gpu/shaders/gpu_shader_codegen_lib.glsl # source/blender/gpu/shaders/material/gpu_shader_material_hair_info.glsl # source/blender/gpu/shaders/material/gpu_shader_material_principled.glsl # source/blender/gpu/shaders/material/gpu_shader_material_subsurface_scattering.glsl # source/blender/makesdna/DNA_gpencil_types.h # source/blender/makesdna/DNA_node_types.h # source/blender/nodes/shader/nodes/node_shader_bsdf_principled.c # source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.c
2021-09-29Merge branch 'master' into draw-viewport-dataClément Foucault
# Conflicts: # source/blender/draw/DRW_engine.h # source/blender/draw/intern/draw_manager.c # source/blender/draw/intern/draw_manager.h
2021-09-15Viewport Compositor: Initial commitClément Foucault
This introduce a new compositor engine. It applies the compositor nodetree onto the render result in the viewport using GLSL shader. For now it only very few nodes are supported and only the combined pass is passed to the evaluation pass. This reuse almost the same pipeline as `GPUMaterial`.
2021-09-12DRW: Add barebone realtime compositor engineClément Foucault
This is just the initial commit. Compositor just clears the framebuffer to red.
2021-09-07EEVEE: Use special depth shader to resolve the depth bufferClément Foucault
This was the cause of a bug on Intel Integrated GPU and might as well impact other platforms.
2021-09-03UDIM: Show the UV grid even when images are loadedJesse Yurkovich
Allow the UDIM grid to be shown and adjusted when there are images loaded in UV edit mode. Right now the grid feature disappears once an image is loaded and many have found this to be confusing. Based on community and artist feedback, there was support to change this behavior[1] This patch does the following: - Allows the grid to be shown even when images are present - The max allowable dimensions for the grid has been increased from 10x10 to 10x100 to match the underlying maximum UDIM range that blender supports Note: This should not affect other Image editor modes like Paint/Mask or the Render Result viewer etc. Future work in this area is currently documented in a dedicated design task[2] [1] https://devtalk.blender.org/t/the-udim-tile-grid-design-and-feedback-thread/20136 [2] https://developer.blender.org/T90913 Differential Revision: https://developer.blender.org/D11860
2021-08-31Cleanup: Converted draw_color_management to CPP.Jeroen Bakker
2021-08-05DRW: New Select Debug EngineGermano Cavalcante
This is a simple engine used only to debug the texture of select ids. It is only used when the `WITH_DRAW_DEBUG` option is enabled and the debug value is 31. Reviewed By: fclem Differential Revision: https://developer.blender.org/D5490
2021-07-26Cleanup: Rearrange mesh extraction filesGermano Cavalcante
In the draw module, it's not easy to identify what its header is, and where the shared functions are. So move `draw_cache_extract_mesh_extractors.c` and `draw_cache_extract_mesh_private.h` to the same folder as the extractors and rename these files to make them more identifiable. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D11991
2021-07-20Merge branch 'draw-viewport-data' into eevee-rewriteClément Foucault
# Conflicts: # source/blender/blenlib/BLI_assert.h # source/blender/blenloader/intern/versioning_290.c # source/blender/draw/engines/eevee/eevee_cryptomatte.c # source/blender/draw/engines/eevee/eevee_depth_of_field.c # source/blender/draw/engines/eevee/eevee_effects.c # source/blender/draw/engines/eevee/eevee_engine.c # source/blender/draw/engines/eevee/eevee_lightcache.c # source/blender/draw/engines/eevee/eevee_lightprobes.c # source/blender/draw/engines/eevee/eevee_lights.c # source/blender/draw/engines/eevee/eevee_lookdev.c # source/blender/draw/engines/eevee/eevee_materials.c # source/blender/draw/engines/eevee/eevee_mist.c # source/blender/draw/engines/eevee/eevee_motion_blur.c # source/blender/draw/engines/eevee/eevee_occlusion.c # source/blender/draw/engines/eevee/eevee_private.h # source/blender/draw/engines/eevee/eevee_render.c # source/blender/draw/engines/eevee/eevee_renderpasses.c # source/blender/draw/engines/eevee/eevee_screen_raytrace.c # source/blender/draw/engines/eevee/eevee_shaders.c # source/blender/draw/engines/eevee/eevee_shadows.c # source/blender/draw/engines/eevee/eevee_shadows_cascade.c # source/blender/draw/engines/eevee/eevee_subsurface.c # source/blender/draw/engines/eevee/eevee_temporal_sampling.c # source/blender/draw/engines/eevee/eevee_volumes.c # source/blender/draw/engines/eevee/shaders/ambient_occlusion_lib.glsl # source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl # source/blender/draw/engines/eevee/shaders/btdf_lut_frag.glsl # source/blender/draw/engines/eevee/shaders/closure_eval_lib.glsl # source/blender/draw/engines/eevee/shaders/closure_type_lib.glsl # source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl # source/blender/draw/engines/eevee/shaders/common_utiltex_lib.glsl # source/blender/draw/engines/eevee/shaders/eevee_depth_of_field_tiles_flatten_frag.glsl # source/blender/draw/engines/eevee/shaders/effect_dof_bokeh_frag.glsl # source/blender/draw/engines/eevee/shaders/effect_dof_dilate_tiles_frag.glsl # source/blender/draw/engines/eevee/shaders/effect_dof_gather_frag.glsl # source/blender/draw/engines/eevee/shaders/effect_dof_lib.glsl # source/blender/draw/engines/eevee/shaders/effect_dof_reduce_frag.glsl # source/blender/draw/engines/eevee/shaders/effect_dof_resolve_frag.glsl # source/blender/draw/engines/eevee/shaders/effect_dof_setup_frag.glsl # source/blender/draw/engines/eevee/shaders/effect_reflection_resolve_frag.glsl # source/blender/draw/engines/eevee/shaders/effect_reflection_trace_frag.glsl # source/blender/draw/engines/eevee/shaders/effect_subsurface_frag.glsl # source/blender/draw/engines/eevee/shaders/effect_temporal_aa.glsl # source/blender/draw/engines/eevee/shaders/effect_translucency_frag.glsl # source/blender/draw/engines/eevee/shaders/lightprobe_cube_display_vert.glsl # source/blender/draw/engines/eevee/shaders/lightprobe_lib.glsl # source/blender/draw/engines/eevee/shaders/lights_lib.glsl # source/blender/draw/engines/eevee/shaders/random_lib.glsl # source/blender/draw/engines/eevee/shaders/raytrace_lib.glsl # source/blender/draw/engines/eevee/shaders/ssr_lib.glsl # source/blender/draw/engines/eevee/shaders/surface_lib.glsl # source/blender/draw/engines/eevee/shaders/volumetric_geom.glsl # source/blender/draw/engines/eevee/shaders/volumetric_lib.glsl # source/blender/draw/intern/draw_manager_shader.c # source/blender/draw/intern/shaders/common_math_lib.glsl # source/blender/gpu/CMakeLists.txt # source/blender/gpu/intern/gpu_codegen.c # source/blender/gpu/intern/gpu_shader.cc # source/blender/gpu/shaders/material/gpu_shader_material_geometry.glsl # source/blender/gpu/shaders/material/gpu_shader_material_principled.glsl # source/blender/gpu/shaders/material/gpu_shader_material_subsurface_scattering.glsl # source/blender/gpu/shaders/material/gpu_shader_material_world_normals.glsl # source/blender/nodes/shader/nodes/node_shader_output_aov.c
2021-07-19DRW: Move buffer & temp textures & framebuffer management to DrawManagerClément Foucault
This is a necessary step for EEVEE's new arch. This moves more data to the draw manager. This makes it easier to have the render or draw engines manage their own data. This makes more sense and cleans-up what the GPUViewport holds Also rewrites the Texture pool manager to be in C++. This also move the DefaultFramebuffer/TextureList and the engine related data to a new `DRWViewData` struct. This struct manages the per view (as in stereo view) engine data. There is a bit of cleanup in the way the draw manager is setup. We now use a temporary DRWData instead of creating a dummy viewport. Differential Revision: https://developer.blender.org/D11966
2021-07-08CMake: add missing headers, sort file listsCampbell Barton
2021-07-01Cleanup: Separate each extractor into specific compile unitsGermano Cavalcante
Makes code cleaner and easier to find.
2021-07-01EEVEE: Hair: Add back shaded hair supportClément Foucault
Same implementation as before but it is less intrusive towards the shading Node glsl code. Hair shaders also now supports displacement.
2021-06-22Draw: Added testcases for hair refine shaders.Jeroen Bakker
2021-06-20EEVEE: Cleanup: Replace lighting evaluation macro by functionsClément Foucault
The functions need to be declared before main as prototypes. The appended libs will use the resources (textures, UBOs) defined at global scope. This removes a bit of code duplication and some long macros.
2021-06-15EEVEE: Port back barycentric coordinates.Clément Foucault
Nothing changed appart from the style of the integration which is now fully on EEVEE's side.
2021-06-12Fix missing directory in CMakeLists.txtGermano Cavalcante
2021-06-08Cleanup: Separate compile unit edituv.Jeroen Bakker
2021-06-08Cleanup: Separate compile unit lines_adjacency.Jeroen Bakker
2021-06-08Cleanup: Separate compile unit lines_paint_mask.Jeroen Bakker
2021-06-08Cleanup: Separate fdots extraction in own compile unit.Jeroen Bakker
2021-06-07EEVEE: Material: Add back support for backfacing and transparencyClément Foucault
Nothing much different compared to the previous implementation. The transparent BSDF and principled BSDF now detects when the material is potentially transparent to select the best way to render it.
2021-06-07Cleanup: Move extract lines to compile unit.Jeroen Bakker
2021-06-07Cleanup: Move extract tris in own compile unit.Jeroen Bakker
2021-06-07Cleanup: move extract points into own compile unit.Jeroen Bakker
2021-06-06EEVEE: LookDev: Add back overlay supportClément Foucault
This differs a bit from old implementation. - Instead of manually adjusting the viewport we correctly place the sphere in the vertex shader. - Rendering happens after TAA accumulation: This is because we now support panoramic cameras and TAA would distort the spheres.
2021-06-05EEVEE: Lookdev: Add back lighting supportClément Foucault
This does not include reference spheres rendering. The approach is a bit different than before. Now we use a `bNodeTree` to control the rendering of lookdev. This generates a `GPUMaterial` that is stored per `Instance`. This way rendering lookdev is just updating the temp light cache using this material as world material. Removing the use of custom shader. This introduces a small hack in order to bind the studiolight hdri after the nodetree glsl parsing. The background display however is still using a custom shader in order to sample the world cubemap with different roughness. The view space option of the studiolight is now faster by using a transform before shading instead of rebaking the lightprobe constantly. This should not have any particular impact on render time.
2021-06-03Overlay: Flash on Mode Transfer overlayPablo Dobarro
This implements T87633 This overlay renders a flash animation on the target object when transfering the mode to it using the mode transfer operator. This provides visual feedback when switching between objects without extra overlays that affect the general color and lighting in the scene. Differences with the design task: - This uses just a fade out animation instead of a fade in/out animation. The code is ready for fade in/out, but as the rest of the overlays (face sets, masks...) change instantly without animation, having a fade in/out effect gives the impression that the object flashes twice (once for the face sets, twice for the peak alpha of the flash animation). - The rendering uses a flat color without fresnel for now, but this can be improved in the future to make it look more like the shader in the prototype. - Not enabled by default (can be enabled in the overlays panel), maybe the defaults can change for 3.0 to disable fade inactive and enable this instead. Reviewed By: jbakker, JulienKaspar Differential Revision: https://developer.blender.org/D11055
2021-06-03EEVEE: LightCache: Port back cache DisplayClément Foucault
Nothing significantly different appart from codestyle.
2021-06-01DrawManager: Use CPP for Mesh Extraction Scheduling.Jeroen Bakker
More cleanups will come to make this more CPP-like.
2021-06-01Cleanup: Split draw_cache_extract_mesh into multiple files.Jeroen Bakker
draw_cache_extract_mesh for task scheduling. Will be refactored to draw_cache_extract_mesh_scheduling later on after migrating to CPP. draw_cache_extract_mesh_render_data extraction of mesh render data from edit mesh/mesh into a more generic structure. draw_cache_extract_mesh_extractors containing all the extractors. This will be split up further into a single file per extractor.
2021-05-31EEVEE: LightProbe: Finish loading and rendering of lightcacheClément Foucault
Starting to port lightcache.c to c++.
2021-05-30EEVEE: Lightprobe: Add back lightprobe rendering support for world.Clément Foucault
Only world probe is supported for now. The new implementation diverge from the original by randomly selecting one lightprobe instead of sampling them all. This speeds-up rendering a bit.
2021-05-30EEVEE: Lightprobe: Port back lightprobe filteringClément Foucault
No much change appart from code organization and structure.
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-28EEVEE: Lightprobe: Add simple world probe rendering and downsamplingClément Foucault
2021-05-28EEVEE: Add back world nodetree supportClément Foucault
Only for background for now. Support is now not using defines and just use the correct globals and uniforms to keep the same values as before.
2021-05-27Geometry Nodes: Draw curve data in the viewportHans Goudey
This patch adds relatively small changes to the curve draw cache implementation in order to draw the curve data in the viewport. The dependency graph iterator is also modified so that it iterates over the curve geometry component, which is presented to users as `Curve` data with a pointer to the `CurveEval` The idea with the spline data type in geometry nodes is that curve data itself is only the control points, and any evaluated data with faces is a mesh. That is mostly expected elsewhere in Blender anyway. This means it's only necessary to implement wire edge drawing of `CurveEval` data. Adding a `CurveEval` pointer to `Curve` is in line with changes I'd like to make in the future like using `CurveEval` in more places such as edit mode. An alternate solution involves converting the curve wire data to a mesh, however, that requires copying all of the data, and since avoiding it is rather simple and is in-line with future plans anyway, I think doing it this way is better. Differential Revision: https://developer.blender.org/D11351
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-05-26EEVEE: Rework multi material handlingClément Foucault
Shading groups are now created by the material_array_get functions instead of passing a reference to be filled later. This avoids having to wait later to maybe create a sub shading group. This also simplifies different geomety type handling.
2021-05-24EEVEE: GPencil: Add basic support for gpencil geometryClément Foucault
This adds support for rendering gpencil objects. There is a lot of features to implement specially the ones requiring per object uniforms.
2021-05-23EEVEE: Add back split sum BSDF approximationClément Foucault
This improves the surface appearance of most bsdf.
2021-05-22Cleanup: Move curve draw cache implementation to C++Hans Goudey
I'd like to use this file to draw curves from geometry nodes, which would otherwise require implementing a C API. The changes in this commit are minimal, mostly just casts and changing to nullptr. Differential Revision: https://developer.blender.org/D11350
2021-05-21GPU/EEVEE: Refactor codegen and nodetree supportClément Foucault
This is the first step towards the new evaluation scheme of EEVEE closures. This commit contains: - Removal of GPU_SOURCE_BUILTIN type, prefering global instead. This avoid many boilerplate code since most of the old builtins are now datas that are always present (i.e: view matrices, normals). - Rewritting of codegen in C++ to use `std::stringstream`. - Added a callback to let engine decide what to do with codegen code. This remove a lot of needs for defines because of code order dependency. The engine can insert the nodetree code in custom ways to create advance effects (i.e: add displacement or vertex lighting). Engine now returns final shader strings. - Closure nodes evaluation replacment is a placeholder for now.
2021-05-18EEVEE: Material: Add basic material logicClément Foucault
This is a port of the old material grouping. This is a bit more clean as we use containers for each passes and other structures. Nodetree is generated without major error for simple materials but it is not yet used as closures are not outputed.
2021-05-14Draw: Put DrawTest in its own compile unit.Jeroen Bakker
DrawTest will be used by other tests as well.