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-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
2021-12-08Cleanup: move public doc-strings into headers for 'draw'Campbell Barton
Ref T92709
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-02-25Fix T85959 EEVEE: DOF with "Jitter Camera" brokenClément Foucault
Was caused by recent changes in window_translate_m4 by rBbb2af40ec7dd.
2021-02-22Fix T85609 EEVEE: Viewport "vibrates" when mouse input is activeClément Foucault
Taa offset was applied on first sample. This wasn't happening before DOF refactor. Also fixes T85618 Wireframe Displays Strangely in Eevee (Rendered, material Preview)
2021-02-16Cleanup: spellingCampbell Barton
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.
2021-01-04Cleanup: docy comments beginning with '/**' don't end with '**/'Campbell Barton
2020-09-07EEVEE: Shaders testsJeroen Bakker
This will add the remaining static shaders to the eevee shader test suite. - Downsampling - GGX LUT generation - Mist - Motion Blur - Ambient Occlusion - Render Passes - Screen Raytracing - Shadows - Subsurface - Volumes Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D8779
2020-08-24Merge branch 'blender-v2.90-release' into masterClément Foucault
# Conflicts: # source/blender/editors/space_node/node_draw.c # source/blender/editors/space_sequencer/sequencer_draw.c
2020-08-24Fix T79970 EEVEE: Camera Animation Breaks Motion Blur (Two Steps or More)Clément Foucault
This was caused by motion blur camera movement tagging the view as invalid and thus resetting the temporal sampling. Critical fix for 2.90. Need second look, but quite confident. This function is only called once when Motion blur is off. Reviewed by: jbakker Differential Revision: https://developer.blender.org/D8676
2020-08-11Merge branch 'blender-v2.90-release'Clément Foucault
2020-08-11Fix T79672 EEVEE: Motion blur steps value broken after recent changeClément Foucault
Was just an issue of `taa_render_sample` being reset to 1 when it shouldn't.
2020-08-07Cleanup: declare arrays arrays where possibleCampbell Barton
2020-08-06Fix T78520 EEVEE: No viewport update when changing material nodetreeClément Foucault
This was comming from rBd82c3d86155ea3c7831c7b5ef5d07bc8e2d99394
2020-08-05Fix T79370 EEVEE: Texture paint does not update during strokeClément Foucault
Was caused by rBd82c3d86155e
2020-07-14Fix T78704: RenderPass normals disapear when view isn't updatedJeroen Bakker
When the view isn't updated the renderpass thought that it was rendering the next sample, skipping the conversion from encoded to blender normals. This patch resets the current sample when only rendering single sample layers. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D8280
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-06-26Fix T71539 EEVEE: Still redraw during playback when it shouldn'tClément Foucault
2020-06-23Fix T62961 EEVEE: Viewport refresh when hovering widgetsClément Foucault
We now bypass EEVEE's rendering if the TAA accumulation has ended.
2020-06-23EEVEE: Motion Blur: Add accumulation motion blur for better precisionClément Foucault
This revisit the render pipeline to support time slicing for better motion blur. We support accumulation with or without the Post-process motion blur. If using the post-process, we reuse last step next motion data to avoid another scene reevaluation. This also adds support for hair motion blur which is handled in a similar way as mesh motion blur. The total number of samples is distributed evenly accross all timesteps to avoid sampling weighting issues. For this reason, the sample count is (internally) rounded up to the next multiple of the step count. Only FX Motion BLur: {F8632258} FX Motion Blur + 4 time steps: {F8632260} FX Motion Blur + 32 time steps: {F8632261} Reviewed By: jbakker Differential Revision: https://developer.blender.org/D8079
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-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-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-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
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
2019-11-28EEVEE: Viewport RenderpassesJeroen Bakker
This patch will allow the user to select the EEVEE renderpass to be shown in the viewport by default the combined pass will be shown. Limitations: * Viewport rendering stores the result in a `RenderResult`. RenderResult is not aware of the type of data it holds. In many places where RenderResult is used it is assumed that it stores a combined pass and the display+view transform are applied. I will propose to fix this in a future patch. But that is still being designed and discussed. Reviewed By: fclem Differential Revision: https://developer.blender.org/D6319
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-18Fix T66811 Eevee: Flickering in weight paint modeClément Foucault
This was caused by TAA offset being computed as the 2nd sample even if the sampling was reset afterwards. The fix is to update the matrices after any potential reset.
2019-05-22Eevee: Use DRW_view_* API instead of DRW_viewport_matrix_*Clément Foucault
2019-05-17Cleanup: Eevee: Use DRW_PASS_CREATE macro when possibleClément Foucault
2019-05-16EEVEE: Viewport Rendering TAAJeroen Bakker
EEVEE assumed that the OGL renderer did FSAA, as the FSAA was removed we needed to revalidate this assumption. The temporal sampling only inited the matrices during init phase. As now we need to update the matrices for every sample rendered the code for updating the matrices was isolated in a new function `EEVEE_temporal_sampling_update_matrices`. Reviewed By: fclem Maniphest Tasks: T64646 Differential Revision: https://developer.blender.org/D4871
2019-05-14Cleanup: DRW: Remove uneeded _add suffix from DRW_shgroup_call_addClément Foucault
2019-05-01Eevee: Lookdev: Cleanup implementation & support for Bloom and TAAClément Foucault
Make Lookdev works with bloom and TAA by rendering it before TAA and fixing the motion vectors of the lookdev balls. Rework Lookdev to remove much of its complexity. Use simpler matrices with more understandable setup code.
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-14Fix T58610: EEVEE: camera motion blur renders only one viewport sampleClément Foucault
This fix saves the camera matrices in order to not call BKE_animsys_evaluate_animdata during each draw loop. This function tags the view as dirty even if the camera does not move. This effectivly, avoids the constant reset of TAA.
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-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: add BEGIN/END to GPL headersCampbell Barton
2018-11-16Fix crash when rendering a scene first and then goes to eevee preview modes ↵mano-wii
and cleanup The crash only occurs with Intel 3rd generation GPUs. It occurs because the program needs to be used at least once in the opengl context in which it is created.
2018-09-11Cleanup: styleCampbell Barton
2018-09-10Eevee: Depth of Feild: Fix ringing issue of background objectsClément Foucault
There was an issue caused by Antialiasing being done after DoF. Move TAA after DOF and Motion Blur. Also certain pixel with lower CoC would be spread all over the background because the neighbooring pixel have higher CoC. So we need to apply some bilateral filtering when downsampling. Currently we limit the influence of neighbor pixels with a CoC inside the range [MaxCoC-2, MaxCoC].
2018-08-02Eevee: Fix missing UBO binds.Clément Foucault
Some of them are unecessary and should be removed from the shader instead. But for now we need a quick fix for the crashes happening on some platforms. See T55475.
2018-07-20Eevee: Fix wrong SSR reprojection when switching orthographic viewClément Foucault
We just reset the temporal sampling and avoid using the previous frame for SSR at all.
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-11Cleanup: use 'uint' in draw managerCampbell Barton