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-06Cleanup: spelling in code commentsCampbell Barton
2022-10-05DRW: Split ViewProjectionMatrix in order to increase precisionClément Foucault
This also removes the need to compute the persmat and saves some memory from the `ViewInfos` struct. This is needed to allow multiview support. Initial testing found no major performance regression during vertex heavy workload. Test file: {F13610017} Results: | Platform | Master | Split Matrix| | Linux + Mesa + AMD W6600 | 48 fps | 47 fps | | Macbook Pro M1 | 50 fps | 51 fps | | Linux + NVidia 1080Ti | 51 fps | 52 fps | | Linux + Radeon Vega 64 | 25.6 fps | 26.7 fps | Increased precision when far from origin: {F13610024} {F13610025} Reviewed By: jbakker Differential Revision: https://developer.blender.org/D16125
2022-03-22Metal: Make GLSL shader source MSL compliant alsoJason Fielder
Metal shading language follows the C++ 14 standard and in some cases requires a greater level of explicitness than GLSL. There are also some small language differences: - Explicit type-casts (C++ requirements) - Explicit constant values (C++ requirements, e.g. floating point values using 0.0 instead of 0). - Metal/OpenGL compatibility paths - GLSL Function prototypes - Explicit accessors for vector types when sampling textures. Authored by Apple: Michael Parkin-White Ref T96261 Reviewed By: fclem Maniphest Tasks: T96261 Differential Revision: https://developer.blender.org/D14378
2021-07-07Cleanup: spelling in commentsCampbell Barton
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-03-04Fix T86042 EEVEE: incorrect irradiance bakeClément Foucault
The environment (world) irradiance wasn't correctly skipped.
2021-02-21Cleanup: EEVEE: Rename variable named sample because ...Clément Foucault
.. it's a reserved keyword on GL > 4.0.
2021-02-21Cleanup: EEVEE: Use P for world position instead of WClément Foucault
This removes the last places where this was not the case. We follow cycles convention of P being for Postion.
2021-02-21EEVEE: Planar Reflections: Fix regressionClément Foucault
Fix regression with roughness not masking reflections when not using Screen Space raytracing. The trick was to only evaluate one planar per pixel, the one with the most influence. This should not be too limiting since this is what we do for SSR. Also change evaluation order do not apply occlusion on planars probes.
2021-02-21EEVEE: Ambient Occlusion: RefactorClément Foucault
- Fix noise/banding artifact on distant geometry. - Fix overshadowing on un-occluded surfaces at grazing angle producing "fresnel" like shadowing. Some of it still appears but this is caused to the low number of horizons per pixel. - Improve performance by using a fixed number of samples and fixing the sampling area size. A better sampling pattern is planned to recover the lost precision on large AO radius. - Improved normal reconstruction for the AO pass. - Improve Bent Normal reconstruction resulting in less faceted look on smoothed geometry. - Add Thickness heuristic to avoid overshadowing of thin objects. Factor is currently hardcoded. - Add bent normal support to Glossy reflections. - Change Glossy occlusion to give less light leaks from lightprobes. It can overshadow on smooth surface but this should be mitigated by using SSR. - Use Bent Normal for rough Glossy surfaces. - Occlusion is now correctly evaluated for each BSDF. However this does make everything slower. This is mitigated by the fact the search is a lot faster than before.
2021-02-13EEVEE: Change cubemap roughness fitClément Foucault
This changes the roughness mapping to better utilize the mip chain resolution. This improves glossy reflections with small roughness. Lightcache version bumped because old data does not have the same roughness mapping and cannot be used.
2021-02-13EEVEE: Refactor closure_lit_lib.glslClément Foucault
This refactor was needed for some reasons: - closure_lit_lib.glsl was unreadable and could not be easily extended to use new features. - It was generating ~5K LOC for any shader. Slowing down compilation. - Some calculations were incorrect and BSDF/Closure code had lots of workaround/hacks. What this refactor does: - Add some macros to define the light object loops / eval. - Clear separation between each closures which now have separate files. Each closure implements the eval functions. - Make principled BSDF a bit more correct in some cases (specular coloring, mix between glass and opaque). - The BSDF term are applied outside of the eval function and on the whole lighting (was separated for lights before). - Make light iteration last to avoid carrying more data than needed. - Makes sure that all inputs are within correct ranges before evaluating the closures (use `safe_normalize` on normals). - Making each BSDF isolated means that we might carry duplicated data (normals for instance) but this should be optimized by compilers. - Makes Translucent BSDF its own closure type to avoid having to disable raytraced shadows using hacks. - Separate transmission roughness is now working on Principled BSDF. - Makes principled shader variations using constants. Removing a lot of duplicated code. This needed `const` keyword detection in `gpu_material_library.c`. - SSR/SSS masking and data loading is a bit more consistent and defined outside of closure eval. The loading functions will act as accumulator if the lighting is not to be separated. - SSR pass now do a full deferred lighting evaluation, including lights, in order to avoid interference with the closure eval code. However, it seems that the cost of having a global SSR toggle uniform is making the surface shader more expensive (which is already the case, by the way). - Principle fully black specular tint now returns black instead of white. - This fixed some artifact issue on my AMD computer on normal surfaces (which might have been some uninitialized variables). - This touched the Ambient Occlusion because it needs to be evaluated for each closure. But to avoid the cost of this, we use another approach to just pass the result of the occlusion on interpolated normals and modify it using the bent normal for each Closure. This tends to reduce shadowing. I'm still looking into improving this but this is out of the scope of this patch. - Performance might be a bit worse with this patch since it is more oriented towards code modularity. But not by a lot. Render tests needs to be updated after this. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D10390 # Conflicts: # source/blender/draw/engines/eevee/eevee_shaders.c # source/blender/draw/engines/eevee/shaders/common_utiltex_lib.glsl # source/blender/draw/intern/shaders/common_math_lib.glsl
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-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
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-08-01Cleanup: misc spelling fixesCampbell Barton
T68035 by @luzpaz
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-12Eevee: Planar Ref.: Invert view matrix to remove triangle front face flipClément Foucault
This was the cause of some issue with normal mapping. This way is cleaner since it does not modify the state of the drawcalls and other ad-hoc solutions to fix the problems down the road. Unfortunately, it does require to fix every sampling coordinate for this texture. Fix T62215: flipped normals in reflection plane
2018-11-15Eevee: Add irradiance smoothingClément Foucault
This is a parameter that will make the interpolation between irradiance cells of a same Irradiance Volume smoother, reducing the weight of the light leaking correction factors. It is usefull in some cases to avoid harsh lighting transition that can happen when a sample point it near a surface.
2018-11-15Eevee: Irradiance Grid: Make the influence shape corners roundClément Foucault
This makes it easier to add corrective light grids without having ugly blending corners revealing the shape of the grid bounds.
2018-11-13Fix T57708: Crash on Eevee rendering with SSR enabled.mano-wii
Intel does not like dead code. The driver for `Intel HD Graphics 4000` crashes in these cases.
2018-11-01Eevee: Opti: Irradiance: Remove sqrt and max on backface testClément Foucault
Did not have any impact in my tests and it saves some instructions.
2018-10-20Fix Eevee Reflection CubeMap and Irradiance Volume on some Intel gpusmano-wii
When you pass a struct as a parameter to a function, the qualifier "layout(column_major)" is lost.
2018-07-10Eevee: LightCache: Initial ImplementationClément Foucault
This separate probe rendering from viewport rendering, making possible to run the baking in another thread (non blocking and faster). The baked lighting is saved in the blend file. Nothing needs to be recomputed on load. There is a few missing bits / bugs: - Cache cannot be saved to disk as a separate file, it is saved in the DNA for now making file larger and memory usage higher. - Auto update only cubemaps does update the grids (bug). - Probes cannot be updated individually (considered as dynamic). - Light Cache cannot be (re)generated during render.
2018-05-26Cleanup: whitespace, long lines, duplicate includeCampbell Barton
2018-05-16Shader Node Editor: Add Closure to RGB convertion node.Clément Foucault
Patch D3205 by Kanzaki Wataru Only implemented in Eevee for now. Collapse a closure to RGBA so we can do NPR stuff on the resulting color. Use an emission shader to convert the color back to a closure. Doing this will break PBR and will kill any SSR and SSS effects the shader the shader rely on. That said screen space refraction and ambient occlusion are supported due to the way they are implemented.
2018-01-22Eevee: Put all constant uniforms in a global UBO.Clément Foucault
This is an optimization / cleanup commit. The use of a global ubo remove lots of uniform lookups and only transfert data when needed. Lots of renaming for more consistent codestyle.
2017-12-04Eevee: Irradiance Visibility: Initial ImplementationClément Foucault
This augment the existing irradiance grid with a new visibility precomputation. We store a small shadowmap for each grid sample so that light does not leak through walls and such. The visibility parameter are similar to the one used by the Variance Shadow Map for point lights. Technical details: We store the visibility in the same texture (array) as the irradiance itself (in order to reduce the number of sampler). But the irradiance and the visibility are not the same data so we must encode them in order to use the same texture format. We use RGBA8 normalized texture and encode irradiance as RGBE (shared exponent). Using RGBE encoding instead of R11_G11_B10 may lead to some lighting changes, but quality seems to be nearly the same in my test cases. Using full RGBA16/32F maybe a future option but that will require much more memory and reduce the perf significantly. Visibility moments (VSM) are encoded as 16bits fixed point precision using a special range. This seems to retain enough precision for the needs. Also interpolation does not seems to be big problem (even though it's incorrect).
2017-09-28Eevee: Probe Grid: Add "progressive rendering"Clément Foucault
This gives the user a more rapid preview of what the final result will be. The grid cells are renderer in a series of powers of two offsets.
2017-08-10Eevee: Small code codestyle and fixes.Clément Foucault
Rename get_specular_dominant_dir to get_specular_reflection_dominant_dir. Add Zero length N check everywhere.
2017-07-31Eevee: SSR: Rewrote the raytracing algorithm.Clément Foucault
It now uses a quality slider instead of stride. Lower quality takes larger strides between samples and use lower mips when tracing rough rays. Now raytracing is done entierly in homogeneous coordinate space. This run much faster. Should be fairly optimized. We are still Bandwidth bound. Add a line-line intersection refine. Add a ray jitter between the multiple ray per pixel to fill some undersampling in mirror reflections. The tracing now stops if it goes behind an object. This needs some work to allow it to continue even if behind objects.
2017-07-27Eevee: Planar Reflection: only support mirror reflection if not using SSR.Clément Foucault
2017-07-25Eevee: SSR: Add support for planar probes.Clément Foucault
This add the possibility to use planar probe informations to create SSR. This has 2 advantages: - Tracing is less expensive since the hit is found much quicker. - We have much less artifact due to missing information. There is still area for improvement.
2017-07-24Eevee: Planar Reflection: Remove distance approximation.Clément Foucault
This commit separate the depth texture into another texture array. This remove the need to output radial depth into alpha. Unfortunatly it's difficult to recover position from the non linear depth buffer when applying reflection without adding a bunch of stuff. This is in preparation of SSR planar reflections.
2017-07-24Eevee: SSR: Encode Normal in buffer and add cubemap fallback.Clément Foucault
Normals can point away from the camera so we cannot just put XY in the buffer and reconstruct Z later as we would not know the sign of Z.
2017-06-28Eevee: Refactor of shading code to be more modular.Clément Foucault
This will enable creating shading models more easily.