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-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.
2018-11-19LOOKDEV: disable STUDIOLIGHT_SPHERICAL_HARMONICS_WINDOWINGmano-wii
This option is causing the texture to become full of nan(ind)s. I don't know how it worked before. Until this is resolved, this feature (which improves the quality of LOOKDEV's irradiance texture) will be disabled.
2018-07-16StudioLight: Fix codestyleClément Foucault
2018-07-16Matcap: Fix missing pixel on preview iconsClément Foucault
2018-07-10GPUTexture: Refactor of texture creation & new featureClément Foucault
- Texture creation now requires explicit data type. - GPU_texture_add_mipmap enable explicit mipmap upload. - GPU_texture_get_mipmap_size can be used to get the size of a mipmap level of an existing GPUTexture - GPU_texture_read let you read back data from a gpu texture.
2018-07-10Cleanup: styleCampbell Barton
2018-06-29Workbench: Spherical Harmonics testsJeroen Bakker
Added a compile directive in order to test SH4 in stead of SH2Win. For now I disabled SH4, it is a bit more clear, but has a small performance impact. Will check later for a better approach
2018-06-25Cleanup: code styleCampbell Barton
2018-06-22StudioLight: Better APIJeroen Bakker
In stead of a single refresh function that re-init the whole system. The API now supports adding and removing. Which will be much faster and less flickering of missing icons when adding/removing lights
2018-06-22StudioLight: Only apply windowing when SH level is 2Jeroen Bakker
It does not make much sense for the other levels
2018-06-22Studiolight: Spherical Harmonics WindowingJeroen Bakker
Apply Windowing on the Spherical Harmonics result. This would lead to better results.