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
2020-09-05GPUTexture: Change texture creation APIClément Foucault
This is to modernize the API: - Add meaningful name to all textures (except DRW textures). - Remove unused err_out argument: only used for offscreen python. - Add mipmap count to creation functions for future changes. - Clarify the data usage in creation functions. This is a cleanup commit, there is no functional change. # Conflicts: # source/blender/gpu/GPU_texture.h
2020-09-05Cleanup: GPUTexture: Remove use of GPU_texture_create_nDClément Foucault
Use creation + update function instead.
2020-08-08Cleanup: use array syntax for sizeof with fixed valuesCampbell Barton
Also order sizeof(..) first to promote other values to size_t.
2020-08-07Cleanup: declare arrays arrays where possibleCampbell Barton
2020-08-07Cleanup: Blenkernel, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/blenkernel` module. No functional changes.
2020-07-03Clang-Tidy: Enable readability-redundant-control-flowHans Goudey
2020-06-25Cleanup: spellingCampbell Barton
2020-06-02GPU: Texture: Replace internal sampler state by explicit state objectClément Foucault
This makes it easier to track as well as allowing us to sample the same texture with different sampling parameters (which should fix the related T73942 in the long run). Reviewed By: brecht Differential Revision: https://developer.blender.org/D7831
2020-05-07Fix T76510: Eevee OpenVDB render artifacts due to texture clampingBrecht Van Lommel
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-09Cleanup: Replace ABS/SQUARE/CUBE with function callsSergey Sharybin
While it might be handy to have type-less functionality which is similar to how C++ math is implemented it can not be easily achieved with just preprocessor in a way which does not have side-effects on wrong usage. There macros where often used on a non-trivial expression, and there was at least one usage where it was causing an actual side effect/bug on Windows (see change around square_f(sh[index++]) in studiolight.c). For such cases it is handy to have a function which is guaranteed to have zero side-effects. The motivation behind actually removing the macros is that there is already a way to do similar calculation. Also, not having such macros is a way to guarantee that its usage is not changed in a way which have side-effects and that it's not used as an inspiration for cases where it should not be used. Differential Revision: https://developer.blender.org/D7051
2020-02-07CodeCleanup: Remove unused studiolight algorithmJeroen Bakker
Code was originally added to test a different approach to calculate the irradiance buffer. The approach was just to slow so we never used it. This change will remove it from the code base
2020-01-13Fix T73069: StudiolightsJeroen Bakker
Studiolights that were just created didn't had the `STUDIOLIGHT_SPECULAR_HIGHLIGHT_PASS` flag. Without this flag the studiolight the viewport didn't show the specular highlights and it wasn't possible to switch the highlights on/off in the popover. After reloading the studio lights this was possible. This patch will always set the flag for any newly created, or being edited studiolight, so the workbench render engine is fed with the right data.
2019-11-24Cleanup: doxygen commentsCampbell Barton
Also correct some outdated symbol references, add missing 'name' commands.
2019-09-14Cleanup: use const args, variablesCampbell Barton
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-27Fix compiler error in WindowsAntonio Vazquez
This error was introduced in commit https://developer.blender.org/rB66700196074ad168f3322f2766846a0a07f7a00f
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-04Cleanup: spellingCampbell Barton
2019-05-24Viewport: Change default studiolightClément Foucault
Differential Revision: https://developer.blender.org/D4939
2019-05-24Viewport: add more contrast to default studio light, make it default againBrecht Van Lommel
It's closer to the default matcap now, but slightly less metallic and dark. The reason to use studio lights as default is because the roughness and metallic parameters of the material then have an effect, and because Texture color mode does not work for matcaps.
2019-05-01ClangFormat: run with ReflowComments on source/Campbell Barton
Prepare for enabling ReflowComments.
2019-04-27Cleanup: comments (long lines) in blenkernelCampbell Barton
2019-04-22Cleanup: style, use braces for blenkernelCampbell Barton
2019-04-20Cleanup: add missing macros to clang-formatCampbell Barton
2019-04-20Cleanup: quiet extra-semicolon warningCampbell Barton
2019-04-17ClangFormat: format '#if 0' code in source/Campbell 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-31Fix: Buffer overflow in StudioLightRay Molenkamp
sl->light_ambient is a float[3], copy_v4_fl4 overwrites sl->free_function with a bogus pointer on 32 bit.
2019-03-20Cleanup: use lowercase for dimensions in function namesCampbell Barton
Most API's already use this convention.
2019-02-27Cleanup: rename lamp -> lightCampbell Barton
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-03Cleanup: trailing commasCampbell Barton
Needed for clan-format not to wrap onto one line.
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: remove redundant BKE/BLI/BIF headersCampbell Barton
2019-01-02Fixes and edits to studio light operatorsCampbell Barton
- Remove pathlib use (was converting to/from string with no real advantage). - Use user_resource(..., create=True) to ensure the path exists. - Pass full path to BKE_studiolight_create, don't add extension after. - Fix 'sl' filtering glob and move from ui code to operator. - Fix string copy length.
2018-12-31Cleanup: specify default studiolight name, instead using first alphabetically.Brecht Van Lommel
2018-12-07Cleanup: styleCampbell Barton
2018-12-05Fix T58104: Duplicated previews for Matcaps/HDRIs in portable installsPhilipp Oeser
Reviewers: brecht Maniphest Tasks: T58104 Differential Revision: https://developer.blender.org/D4028
2018-11-30StudioLight: Add a 4th light to adjust lightingClément Foucault
There was a bug due to non-aligned struct in the DNA that prevented us to increase the size of the userdef light array. Since the studio lights are now presets and stored in external files, there is no need to keep backward compatibility with theses lights. Remove the old array and create a new one. Add blue tint light for specular.
2018-11-30Studiolight: Fix bad memcpy sizeClément Foucault
2018-11-29Workbench: Add back studio lighting presetsClément Foucault
This changes a bit how the userprefs solid lights works. They are not visible until enabling the "Edit Solid Light" checkbox. Once enabled the current studiolight used for solid mode will be overwritten. Once the lighting settings are tweaked, the user can click the "Save as Studio light" button to save the current settings. This makes it easy to create new lighting without messing the other presets. The studio lights are stored as ASCII files on the disk using a dead simple custom format. The UI/UX is not perfect and will be improved in other commits. Also includes: * Separate LookDev HDRI selection from Solid Lights * Hide LookDev HDRIs from the Solid Lights selection list
2018-11-29Workbench: Rename orientation to type and Camera studio light to StudioClément Foucault
2018-11-20Cleanup: styleCampbell Barton
2018-11-20Fis T57948: Crash in 2.8x lookdevClément Foucault
2018-11-20Cleanup: style, unusedCampbell Barton
2018-11-19Workbench: Use non-negative lighting evaluationClément Foucault
This makes the lighting a bit more diffuse but don't produce negative values. Add a bias of 1.5f to make the lighting a bit more directionnal. The implementation is based on: https://github.com/kayru/Probulator/blob/master/Source/Probulator/SphericalHarmonics.h#L136 which is derived from: http://www.geomerics.com/wp-content/uploads/2015/08/CEDEC_Geomerics_ReconstructingDiffuseLighting1.pdf The shader implementation is optimized and has the same runtime cost as previous method: * no sh eval : 0.13ms * prev sh eval : 0.14ms * new sh eval : 0.22ms * new sh eval opti : 0.14ms
2018-11-19Studio Lights: Big CleanupsClément Foucault
* Less Lengthy enum/macro names. * Optimize computation of Spherical Harmonics. * Reduce radiance cubemap size a bit. Higher resolution is not necessary. * Remove STUDIOLIGHT_LIGHT_DIRECTION_CALCULATED (was not used). * Do windowing on each component separately instead of using luminance. * Use ITER_PIXELS to iterate on each pixels, using pixel center coords. * Remove gpu_matcap_3components as it is only needed when creating the gputex. * Fix a lot of confusion in axis denomination/swizzle. These changes should not affect functionallity.
2018-11-19STUDIOLIGHT: leave a comment of why ↵mano-wii
`STUDIOLIGHT_SPHERICAL_HARMONICS_WINDOWING` was commented.