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-10-25DRW: Pointcloud: Refactor drawing to remove instancingClément Foucault
This change the attribute binding scheme to something similar to the curves objects. Attributes are now buffer textures sampled per points. The actual geometry is now rendered using an index buffer that avoid too many vertex shader invocation. Drawcall is wrapped in a DRW function to reduce complexity of future changes.
2022-04-19DRW: Centralize smoke domain texture managementClément Foucault
This code was duplicated in multiple engines. Now it is the draw manager responsability to manage the throwaway fluid textures.
2022-04-04Cleanup: ensure space after file named in headersCampbell Barton
Add blank lines after file references to avoid them being interpreted as doc-strings the following declarations.
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2022-01-26D13910: Workbench: Port shaders to use GPUShaderCreateInfoClément Foucault
Also adds a few things to GPUShader for easily create shaders. Heavy usage of macros to compose the createInfo and avoid duplications and copy paste bugs. This makes the link between the shader request functions (in workbench_shader.cc) and the actual createInfo a bit obscure since the names are composed and not searchable. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D13910
2022-01-07Cleanup: remove redundant const qualifiers for POD typesCampbell Barton
MSVC used to warn about const mismatch for arguments passed by value. Remove these as newer versions of MSVC no longer show this warning.
2021-12-08Cleanup: move public doc-strings into headers for 'draw'Campbell Barton
Ref T92709
2021-08-05Cleanup: remove redundant parenthesisCampbell Barton
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-02-16Workbench: Improve AntiAliasing samplingJeroen Bakker
This improves stability and convergence speed of Workbench Temporal AntiAliasing. This adds a filtering kernel (blackmann-haris, same as EEVEE/Cycles) to the temporal antialiasing sampling. We also gather neighbor pixels since they might end up in the pixel footprint. We use a 1px radius for the filter window which is a bit less than the 1.5 default of cycles and EEVEE since it does blur quite a bit more than what we have now. Another improvement is that the filtering is now in log space which improves AntiAliasing around highlights. Theses improvement may not be very useful for every day case but it was an experiment to try to make TAA usable for GPencil. Test file used : {F9798807} |filtered+logspace|filtered|original| |{F9798847}|{F9798848}|{F9798849}| Reviewed By: jbakker Differential Revision: https://developer.blender.org/D10414
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
2021-01-26Fix T84160: Wrong DOF when camera is overridenRichard Antalik
Workbench engine used active camera to setup DOF effect even when camera was overridden. Store camera override in `WORKBENCH_PrivateData` and use it in `workbench_dof_engine_init()` Reviewed By: brecht Differential Revision: https://developer.blender.org/D9952
2021-01-05Cleanup: remove UNUSED(..) from public function declarationsCampbell Barton
This doesn't serve any purpose and can become out of sync with the function it's self without reporting warnings.
2020-09-15Liquid Simulation Display Options (GSoC 2020)Sriharsha Kotcharlakot
All the changes made in the branch `soc-2020-fluid-tools` are included in this patch. **Major changes:** === Viewport Display === - //Raw voxel display// or //closest (nearest-neighbor)// interpolation for displaying the underlying voxel data of the simulation grids more clearly. - An option to display //gridlines// when the slicing method is //single//. ==== Grid Display ==== - Visualization for flags, pressure and level-set representation grids with a fixed color coding based on Manta GUI. ==== Vector Display ==== - //**M**arker **A**nd **C**ell// grid visualization options for vector grids like velocity or external forces. - Made vector display options available for external forces. ==== Coloring options for //gridlines// ==== - Range highlighting and cell filtering options for displaying the simulation grid data more precisely. - Color gridlines with flags. - Also, made slicing and interpolation options available for Volume Object. Reviewed By: JacquesLucke, sebbas Differential Revision: https://developer.blender.org/D8705
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-08-28DrawEngine: Shader Test SuiteJeroen Bakker
A test case that compiles all the GLSL shaders for workbench, gpencil, overlay and some of eevee. Compilation is still platform dependent, but when run on a test-farm with different hardware we will be able to detect GLSL compilation errors early on. The test will be compiled when `WITH_GTEST` and `WITH_OPENGL_DRAW_TESTS` are On. For eevee only the shaders inside eevee_shaders.c are included. EEVEE has some shaders located inside the submodule. They aren't accessible to the outside and aren't added to the test case. We should see how we want to add them. For the test cases it is better to move them to eevee_shaders.c, but for eevee perspective it is better to keep them in the submodule. Keeping them in the submodule could lead to situations that is harder to test. as the shader could already have been initialized. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D8667
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-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
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-15Workbench: Replace viewvecs caculation by DRWViewClément Foucault
2020-07-01Cleanup: spellingCampbell Barton
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-05-14Fix T76558: Decreasing Viewport Anti-Aliasing Samples Makes Scene WhiterJeroen Bakker
When setting the Viewport Anti-Aliasing samples in the user preferences to a lower sample count the anti-aliasing was not reset. This lead to incorrect result as the accum buffer would still hold the values of the larger sample count. This fix resets the TAA when the sample count is changed. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D7728
2020-04-17Workbench: Fix unreported bug: garbage viewport when changing AA settingsClément Foucault
Was caused by uninitialized buffer.
2020-03-31Fix T74898: Multiresolution Ghost After OrbitingJeroen Bakker
EEVEE and Workbench both had the same issue that they continue with the last sample when leaving navigating. This is ok for regular meshes as they are all the same. For multiresolution it ain't as a low res version of the mesh is used during navigation. This patch also resets the AA samples when the user leaves navigation.
2020-03-23Fix T74923: Weight Painting Overlay Invisible for In Front ObjectsJeroen Bakker
For In Front Objects we need to use the in front depth buffer. This patch will use the in front depth buffer and also makes sure that it is filled with the center pixel depth. Reviewed By: fclem Differential Revision: https://developer.blender.org/D7216
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
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-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-06CodeCleanup: Added View3DShading enumsJeroen Bakker
Added the core enums that workbench draw engine uses.
2020-02-24Cleanup: Workbench: Remove checkerboard depthClément Foucault
This is not needed anymore with the new overlay xray fading.
2020-02-15Cleanup: use define for golden ratioCampbell Barton
Move from workbench_private.h where it wasn't used.
2020-02-11DRW: Color Management improvementClément Foucault
Reviewed By: brecht sergey jbakker Differential Revision: http://developer.blender.org/D6729
2020-01-16Fix T73133: UDIM texture count in Eevee is limited by OpenGLLukas Stockner
Based on @fclem's suggestion in D6421, this commit implements support for storing all tiles of a UDIM texture in a single 2D array texture on the GPU. Previously, Eevee was binding one OpenGL texture per tile, quickly running into hardware limits with nontrivial UDIM texture sets. Workbench meanwhile had no UDIM support at all, as reusing the per-tile approach would require splitting the mesh by tile as well as texture. With this commit, both Workbench as well as Eevee now support huge numbers of tiles, with the eventual limits being GPU memory and ultimately GL_MAX_ARRAY_TEXTURE_LAYERS, which tends to be in the 1000s on modern GPUs. Initially my plan was to have one array texture per unique size, but managing the different textures and keeping everything consistent ended up being way too complex. Therefore, we now use a simpler version that allocates a texture that is large enough to fit the largest tile and then packs all tiles into as many layers as necessary. As a result, each UDIM texture only binds two textures (one for the actual images, one for metadata) regardless of how many tiles are used. Note that this rolls back per-tile GPUTextures, meaning that we again have per-Image GPUTextures like we did before the original UDIM commit, but now with four instead of two types. Reviewed By: fclem Differential Revision: https://developer.blender.org/D6456
2019-12-18Workbench: Force Vertex Colors in Paint ModeJeroen Bakker
Vertex colors behaved differently as the paint overlay mixed the colors in display mode and the results was multiplied on top of the original shading. This patch will align the implementation to texture painting where the colors are drawn by the workbench engine so the correct shading is applied. This also means that we don't show the vertex colors overlay when not in solid mode. Reviewed By: fclem Differential Revision: https://developer.blender.org/D6436
2019-11-27Workbench: PerformanceJeroen Bakker
Small performance improvements by caching the world_ubo in the World. It was detected that NVIDIA driver created threads to update the world_ubo (304 bytes). This patch will reuse the previous created ubo when not changed. Reviewed By: fclem Differential Revision: https://developer.blender.org/D6087
2019-10-17Cleanup: spellingCampbell Barton
Also remove historic bftgl reference.
2019-10-16Workbench: Background DitheringJeroen Bakker
Background dithering was introduced to solve banding issues on gradient backgrounds. This patch will enable dithering based on the texture that is used for drawing. Only when using a GPU_RGBA8 texture the dithering will be enabled. This disables dithering for final rendering, vertex and texture paint modes. Reviewed By: fclem Differential Revision: https://developer.blender.org/D6056
2019-09-29Sculpt: disable workbench anti-aliasing during stroke paintingBrecht Van Lommel
This mostly happens automatically anyway since there is usually not enough time left over for it. But when it does it happen it breaks partial redraw, and may also have a negative impact on responsiveness. Ref T70295
2019-09-17DRW: Refactor to support draw call batchingClément Foucault
Reviewers: brecht Differential Revision: D4997
2019-09-14Revert "DRW: Refactor to support draw call batching"Clément Foucault
This reverts commit ce34a6b0d727bbde6ae373afa8ec6c42bc8980ce.
2019-09-13DRW: Refactor to support draw call batchingClément Foucault
Reviewers: brecht Differential Revision: D4997
2019-08-27Workbench: Specular Highlighting for MatCapsJeroen Bakker
With Blender 2.80 we introduced a more flexible matcap system. One change we did was to multiply the matcap with the base color that was shaded. As matcaps contains diffuse and specular lighting in a single texture this lead to rendering artifacts. Artists were complaining that everything looked to metalic. We now support a separate `diffuse` and `specular` pass for matcaps. `shaded_color = diffuse_light * base_color + specular_light` For matcaps to support this feature they need to be multilayer openexr files with 2 renderpasses (named `diffuse` and `specular`). In the future we can change this to first pass/second pass in stead of this naming convention. Reviewed By: fclem, brecht Differential Revision: https://developer.blender.org/D5335
2019-08-06Cleanup: redundant const usageCampbell Barton
2019-08-06Fix T66100: WorkBench Banding IssuesJeroen Bakker
Color banding issues can appear, as result of the 8 bitdepth RGBA that is used in the viewport. This change will use `GPU_RGBA16F` for final renderings and for drawing textures. This allows displaying HDRI textures. Vertex Colors uses `GPU_RGBA16` to resolve color banding issues. All other modes use `GPU_RGBA8` to reduce bandwidth and gpu memory. Reviewed By: fclem, brecht Differential Revision: https://developer.blender.org/D5179
2019-07-05TexturePaint: Force Workbench Texture Color ModeJeroen Bakker
When in texture paint mode and in solid mode the object that is being texture painted will be rendered by the workbench engine with textures. All other objects would render the same. For other cases the texture paint draw engine will still draw the texture. The texture mode draw engine now only drawn the masks. The opacity sliders influences the texture mask. This change has been implemented conserably. In the future we need to look into making this better, like adding support that every object can be colored differently. Currently when rendering in the workbench we can have up to 3 different color types active (what the user selected, the fallback in case no materials have been configured and this one, forcing textures) Reviewed By: fclem, brecht Differential Revision: https://developer.blender.org/D5190
2019-07-01Workbench: Combine Xray Alpha with object/material alpha ...Clément Foucault
... instead of overiding it (previous behavior). In practice it's not really noticeable. This means an object with alpha will never be more opaque when enabling xray.
2019-05-31Fix sculpt mode drawing with modifiers still being wrong in some casesBrecht Van Lommel
Centralize logic for when to use the PBVH for drawing, fix missing tests in mask drawing, fix missing tests for multiple windows, only do more expensive update for all viewports at end of the stroke.
2019-05-22Workbench: Fix TAA logicClément Foucault
Having both TAA and FXAA enabled at the same time resulted in conflicts. The jitter_index was incremented twice before being used instead of once.
2019-05-22Workbench: Use DRWView instead of DRW_viewport_matrix_*Clément Foucault
Continuing the transition to the new API