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-11-07 Fix T101533: Wrong DoF when a non-camera object is the active cameraMiguel Pozo
Make sure non-camera data is not casted to a Camera pointer. Solution suggested by Damien Picard (@pioverfour).
2022-03-11Cleanup: fix source typos homogenous->homogeneousBrecht Van Lommel
Contributed by luzpaz. Differential Revision: https://developer.blender.org/D14306
2022-02-25GPUTexture: Use immutable storageClément Foucault
This means textures need to have the number of mipmap levels specified upfront. It does not mean the data is immutable. There is fallback code for OpenGL < 4.2. Immutable storage will enables texture views in the future.
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-31Cleanup: use our own conventions for tags in commentsCampbell Barton
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-03-10Cleanup: spellingCampbell Barton
2021-03-02EEVEE: Depth of field: Do not shrink highlights when using overblurClément Foucault
This fixes the issue of bokeh size being smaller when using overblur. The additional overblur needs to be centered on the outer radius.
2021-02-17Cleanup: spellingCampbell Barton
2021-02-16Cleanup: spellingCampbell Barton
2021-02-15Cleanup: clang tidyJacques Lucke
2021-02-13EEVEE: Depth of field: New implementationClément Foucault
This is a complete refactor over the old system. The goal was to increase quality first and then have something more flexible and optimised. |{F9603145} | {F9603142}|{F9603147}| This fixes issues we had with the old system which were: - Too much overdraw (low performance). - Not enough precision in render targets (hugly color banding/drifting). - Poor resolution near in-focus regions. - Wrong support of orthographic views. - Missing alpha support in viewport. - Missing bokeh shape inversion on foreground field. - Issues on some GPUs. (see T72489) (But I'm sure this one will have other issues as well heh...) - Fix T81092 I chose Unreal's Diaphragm DOF as a reference / goal implementation. It is well described in the presentation "A Life of a Bokeh" by Guillaume Abadie. You can check about it here https://epicgames.ent.box.com/s/s86j70iamxvsuu6j35pilypficznec04 Along side the main implementation we provide a way to increase the quality by jittering the camera position for each sample (the ones specified under the Sampling tab). The jittering is dividing the actual post processing dof radius so that it fills the undersampling. The user can still add more overblur to have a noiseless image, but reducing bokeh shape sharpness. Effect of overblur (left without, right with): | {F9603122} | {F9603123}| The actual implementation differs a bit: - Foreground gather implementation uses the same "ring binning" accumulator as background but uses a custom occlusion method. This gives the problem of inflating the foreground elements when they are over background or in-focus regions. This is was a hard decision but this was preferable to the other method that was giving poor opacity masks for foreground and had other more noticeable issues. Do note it is possible to improve this part in the future if a better alternative is found. - Use occlusion texture for foreground. Presentation says it wasn't really needed for them. - The TAA stabilisation pass is replace by a simple neighborhood clamping at the reduce copy stage for simplicity. - We don't do a brute-force in-focus separate gather pass. Instead we just do the brute force pass during resolve. Using the separate pass could be a future optimization if needed but might give less precise results. - We don't use compute shaders at all so shader branching might not be optimal. But performance is still way better than our previous implementation. - We mainly rely on density change to fix all undersampling issues even for foreground (which is something the reference implementation is not doing strangely). Remaining issues (not considered blocking for me): - Slight defocus stability: Due to slight defocus bruteforce gather using the bare scene color, highlights are dilated and make convergence quite slow or imposible when using jittered DOF (or gives ) - ~~Slight defocus inflating: There seems to be a 1px inflation discontinuity of the slight focus convolution compared to the half resolution. This is not really noticeable if using jittered camera.~~ Fixed - Foreground occlusion approximation is a bit glitchy and gives incorrect result if the a defocus foreground element overlaps a farther foreground element. Note that this is easily mitigated using the jittered camera position. |{F9603114}|{F9603115}|{F9603116}| - Foreground is inflating, not revealing background. However this avoids some other bugs too as discussed previously. Also mitigated with jittered camera position. |{F9603130}|{F9603129}| - Sensor vertical fit is still broken (does not match cycles). - Scattred bokeh shapes can be a bit strange at polygon vertices. This is due to the distance field stored in the Bokeh LUT which is not rounded at the edges. This is barely noticeable if the shape does not rotate. - ~~Sampling pattern of the jittered camera position is suboptimal. Could try something like hammersley or poisson disc distribution.~~Used hexaweb sampling pattern which is not random but has better stability and overall coverage. - Very large bokeh (> 300 px) can exhibit undersampling artifact in gather pass and quite a bit of bleeding. But at this size it is preferable to use jittered camera position. Codewise the changes are pretty much self contained and each pass are well documented. However the whole pipeline is quite complex to understand from bird's-eye view. Notes: - There is the possibility of using arbitrary bokeh texture with this implementation. However implementation is a bit involved. - Gathering max sample count is hardcoded to avoid to deal with shader variations. The actual max sample count is already quite high but samples are not evenly distributed due to the ring binning method. - While this implementation does not need 32bit/channel textures to render correctly it does use many other textures so actual VRAM usage is higher than previous method for viewport but less for render. Textures are reused to avoid many allocations. - Bokeh LUT computation is fast and done for each redraw because it can be animated. Also the texture can be shared with other viewport with different camera settings.
2020-09-02EEVEE: Shader tests for Depth of FieldJeroen Bakker
This patch moves the EEVEE depth of field shaders to eevee_shaders.c and adds them to the eevee shaders test suite. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D8771
2020-08-07Cleanup: declare arrays arrays where possibleCampbell Barton
2020-07-30EEVEE: GLSL refactor/cleanupClément Foucault
- add the use of DRWShaderLibrary to EEVEE's glsl codebase to reduce code complexity and duplication. - split bsdf_common_lib.glsl into multiple sub library which are now shared with other engines. - the surface shader code is now more organised and have its own files. - change default world to use a material nodetree and make lookdev shader more clear. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D8306
2020-06-03DRW: Remove use of builtin matrices and replace by common_view_libClément Foucault
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2019-09-07Cleanup: use post increment/decrementCampbell Barton
When the result isn't used, prefer post increment/decrement (already used nearly everywhere in Blender).
2019-07-15Fix T66860 Crash on opening .blend file from 2.79Clément Foucault
This was caused by the preview render of the material property panel being 1px wide. The computed half buffers width were rounded to 0.
2019-06-12Cleanup: spelling in commentsCampbell Barton
2019-05-30DRW: Refactor to use object pointer for drawcall by defaultClément Foucault
This cleans up a bit of duplicated code and some confusion about what was culled and what wasn't. Now everything is culled based on the given object pointer. If the object pointer is NULL there is no culling performed.
2019-05-28Cleanup: DRW: Rename DRW_STATE_BLEND_* for API clarityClément Foucault
2019-05-22DrawEngines: Depth Of Field UnitsJeroen Bakker
The unit system is designed for displaying and editing and not for rendering. Eevee, Workbench and GPencil used these settings to convert the focal length and sensor size to world units. Making depth of field render differently with Cycles. For now we will remove the scale in the draw engines to match cycles, until we implemented a camera parameters specific scale. Reviewed By: brecht, fclem Maniphest Tasks: T64988 Differential Revision: https://developer.blender.org/D4925
2019-05-17Cleanup: Eevee: Use DRW_PASS_CREATE macro when possibleClément Foucault
2019-05-17Cycles/Eevee: unify depth of field settings for camerasJeroen Bakker
There is now a checkbox to enable/disable depth of field per camera. For Eevee this replace the scene level setting. For Cycles there is now only an F-Stop value, no longer a Radius. Existing files are converted based on Cycles or Eevee being set in the scene. Differential Revision: https://developer.blender.org/D4882
2019-05-14Cleanup: DRW: Remove uneeded _add suffix from DRW_shgroup_call_addClément Foucault
2019-05-14Eevee: Replace DRW_shgroup_empty_tri_batch_create by procedural callsClément Foucault
2019-05-01Eevee: Add support for alpha background in viewportClément Foucault
Viewport now displays alpha checkerboard pattern like Cycles does when film alpha is set to "Transparent". Some small workarounds were necessary for Depth of Field and correct TAA support.
2019-05-01Cleanup: comments (long lines) in drawCampbell 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-03-20Cleanup: use lowercase for dimensions in function namesCampbell Barton
Most API's already use this convention.
2019-03-19Cleanup: comment blocksCampbell Barton
2019-03-16Eevee: DOF: Optimization: Move some operations out of the shaderClément Foucault
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-16DNA: rename near/far -> clip_start/clip_endCampbell Barton
Rename for Camera, View3D (also CameraParams & Render not DNA)
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2019-01-26Cleanup: draw manager headersCampbell Barton
2019-01-23Cleanup: use eGPU prefix for GPU enum typesCampbell Barton
2019-01-23Cleanup: add BEGIN/END to GPL headersCampbell Barton
2019-01-04EEVEE DoF: Fix runtime error: division by zero when blades was 0Dalai Felinto
Even though the fragment shader was already discarding all members of dof_bokeh_sides when blades was zero, the C code was still trying to use this for a few divisions leading to runtime asserts. Those are harmless yet can lead some to waste time while pursuiting other bugs (namely a near freeze when blades aspect ratio is too low).
2018-10-19Cleanup: compiler warningsCampbell Barton
2018-10-15Eevee: Fix Missing alpha when rendering with DOFClément Foucault
NOTE: There is a float imprecision near the focus plane due to the current technique used for DOF. This makes the alpha channel transparent on nearly in focus objects even when they should not. This artifact should be fixed when the DOF will use scatter as gather for low brightness areas. Fix T57042 : Eevee does not render alpha when DOF is turned on
2018-09-19Merge branch 'master' into blender2.8Brecht Van Lommel
2018-07-18GWN: Port to GPU module: Replace GWN prefix by GPUClément Foucault
2018-07-08Cleanup: rename 'ct' to 'len' for size varsCampbell Barton
2018-05-25Fix eevee render settings not workingDalai Felinto
This was no longer working since 15c2801aac33.
2018-05-17Move EEVEE properties into sceneDalai Felinto
We handle doversion for the scene properties, but not for the view layer overrides. Overrides will be implemented in a different way via dynamic overrides. For now this data is completely lost.
2018-05-13Eevee: Depht Of Field: Merge Scatter passes together.Clément Foucault
This means only one texture to draw to and only one sprite per pixel. The texture is twice as large and near and far planes are side by side. The sprite choose the biggest coc to expand to and is redirected to the area (layer) it belongs to. The fragment shader discard every pixel that does not belong to the correct layer.