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-06-09Cleanup: use const variables & argumentsCampbell Barton
2022-05-02GPUShader: Port dashed line shaders to use shaderCreateInfoClément Foucault
This should have no functional changes. This reduce the complexity of the shader by only supporting 2 colors. We never use more than 2 color in practice and this makes usage not require a UBO.
2022-03-30Metal: Adding alternative support for GPU_PRIM_TRI_FAN/LINE_LOOP For Metal ↵Jason Fielder
backend. - Metal uniform array compatibility in DRW module. - Guard OpenGL-specific workarounds and flushes behind GPU_type_matches_ex API guard. Add further render boundaries for render paths called outside of the main loop. Authored by Apple: Michael Parkin-White Ref: T96261 Reviewed By: fclem Differential Revision: https://developer.blender.org/D14438
2022-03-25Cleanup: use count or num instead of nbrCampbell Barton
Follow conventions from T85728.
2022-03-13Cleanup: clang formatAaron Carlisle
2022-03-11Fix wrong line width when using Show Lines in Histogram scopeBrecht Van Lommel
By not resetting the line width, other scopes were using the wrong line thickness. Contributed by RedMser. Differential Revision: https://developer.blender.org/D12030
2022-02-11UI: Improve node drop shadowLeon Schittek
Improve the nodes' drop shadow by making it scale with the view and replace the loop for the alpha calculation with something more explicit. The amount of drop shadow softness was scaled with the zoom level and therefore had a fixed screen space size. DPI and UI scale weren't taken into account either. This patch fixes both issues by basing the shadow softness on the `widget_unit` that scales correctly in zoomable views and takes UI scale etc. into account. Differential Revision: https://developer.blender.org/D13356
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-17Cleanup: Improve naming of immediate mode buffer draw functionsJulian Eisel
Followup to the previous commit. Jeroen and I agreed the old naming was confusing.
2022-01-17Revert "Revert "GPUShaderCreateInfo for interface abstraction""Jeroen Bakker
This reverts commit edee5a947b7ea3e1324aa334a22c7c9bbf47f5f7. Fixes compilation error (Missing file BLI_float2.hh)
2022-01-17Revert "GPUShaderCreateInfo for interface abstraction"Jeroen Bakker
This reverts commit 8fb2ff458ba579dba08bfdf57d043ad158b5db07. Missing some files.
2022-01-17GPUShaderCreateInfo for interface abstractionJeroen Bakker
This is a first part of the Shader Create Info system could be. A shader create info provides a way to define shader structure, resources and interfaces. This makes for a quick way to provide backend agnostic binding informations while also making shader variations easy to declare. - Clear source input (only one file). Cleans up the GPU api since we can create a shader from one descriptor - Resources and interfaces are generated by the backend (much simpler than parsing). - Bindings are explicit from position in the array. - GPUShaderInterface becomes a trivial translation of enums and string copy. - No external dependency to third party lib. - Cleaner code, less fragmentation of resources in several libs. - Easy to modify / extend at runtime. - no parser involve, very easy to code. - Does not hold any data, can be static and kept on disc. - Could hold precompiled bytecode for static shaders. This also includes a new global dependency system. GLSL shaders can include other sources by using #pragma BLENDER_REQUIRE(...). This patch already migrated several builtin shaders. Other shaders should be migrated one at a time, and could be done inside master. There is a new compile directive `WITH_GPU_SHADER_BUILDER` this is an optional directive for linting shaders to increase turn around time. What is remaining: - pyGPU API {T94975} - Migration of other shaders. This could be a community effort. Reviewed By: jbakker Maniphest Tasks: T94975 Differential Revision: https://developer.blender.org/D13360
2021-12-08Cleanup: move public doc-strings into headers for 'editors'Campbell Barton
Ref T92709
2021-11-24UI: Improve scaling of widgets when zoomingLeon Leno
This commit improves the scaling of some ui widgets when zooming by making the radius of the rounded corners dependent on the element's zoom level. Needed to fix T92278 without padding issues, see D13125. Reviewed By: Hans Goudey, Julian Eisel Differential Revision: https://developer.blender.org/D12842
2021-10-25Cleanup: Remove unused functions, make functions staticHans Goudey
2021-10-04Fix T91904: Assert when loading empty CurveProfileHans Goudey
Somehow, the file from T71329 has an empty curve profile. While that may be a problem in itself, it's reasonable to avoid asserts or crashes when loading or drawing such a CurveProfile. This commit just makes sure the table always has a single vertex, and adds some checks in drawing code.
2021-10-04Cleanup: Replace macro with functionHans Goudey
2021-08-12Cleanup: use C++ style comments for disabled codeCampbell Barton
2021-07-30Cleanup: clang-format (re-run after v12 version bump)Campbell Barton
2021-07-07Cleanup: spelling in commentsCampbell Barton
2021-07-05Cleanup: 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-04Cleanup: use const arraysCampbell Barton
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
2021-01-25Cleanup: pass 'rctf' rectangle to 2D box drawing functionsCampbell Barton
Passing 4x arguments for the rectangle, mixed in with round-box radius & color wasn't very readable. Instead, pass a `rctf` as the first argument to UI box drawing functions.
2021-01-25UI: Round-box drawing cleanupHarley Acheson
The new GPU_SHADER_2D_WIDGET_BASE shader allows us to draw many complex shapes with anti-aliasing. One thing it can do is draw an opaque rounded rectangle with colors that differ between its interior and outline. In order to do the above in a single pass I recently added an "_ex" version of UI_draw_roundbox that exposes most of that shaders features. This simplifies interface_draw.c by removing redundancy in the calling of this shader by using this new uber "_ex" version. Ref D10189
2021-01-25Cleanup: remove unused UI_draw_roundbox_shade_y functionCampbell Barton
Marked unused 2017 f69678482c849d873b9686cd6068946205db7c2b) Remove since this remains unused, split from D10189 to allow reverting if we ever need it back.
2021-01-24UI: Viewport Navigate Gizmo RefactorHarley Acheson
Simplification and changes to the Navigation gizmo. Better indication of negative axes, consistent use of color and size to indicate orientation, ability to be resized. Differential Revision: https://developer.blender.org/D9744 Reviewed by Campbell Barton
2021-01-05Fix T84183: Dark area in the bevel custom profile widgetPi Lanningham
If there was a control point at an extreme position when drawing a curve profile (in the bottom corner), the fill's trianglulation could fail, giving a misleading view of the curve. This is because the extra points added to create a closed shape were exactly on the border of the view. This commit adds a small margin to those points, so the triangulation doesn't fail because the line overlaps itself. Another possible solution is to use a different algorithm to fill the polygon, such as scanfill, which is used by curve objects. This seemed simpler, and seems to work fairly robustly. Differential Revision: https://developer.blender.org/D9989
2020-11-06Cleanup: use ELEM macroCampbell Barton
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-09-09Cleanup: reduce variable scopeJacques Lucke
2020-09-04UI Code Quality: Store curve-button gradient type in derived structJulian Eisel
We want to move away from using `uiBut.a1`/`a2`, which is a hard to reason about design. Part of T74432. Also correct comment.
2020-08-28UI: Improve curve grid drawing codepembem22
This patch fixes assert on grid drawing. `for` loops are used instead of `while` loops to make sure the number of lines is exact. The old code draws lots of unnecessary lines offscreen. This bug is fixed as well. See the patch for a comparison without a scissor test. Differential Revision: https://developer.blender.org/D8745
2020-08-26Cleanup: use const variables in interface codeCampbell Barton
2020-08-18Cleanup: GPUState: remove double GPU_blend callsClément Foucault
2020-08-18GPUState: GPU_blend final API renamingClément Foucault
We now use GPU_blend for enabling / disabling blending and explicitly set the blend equation.
2020-08-18Cleanup: GPUState: remove use of GPU_blend_set_funcClément Foucault
2020-08-18Cleanup: GPUState: Replace blend func separate by enumClément Foucault
2020-08-18Cleanup: GPUState: remove float variant of GPU_scissor_getClément Foucault
2020-08-18Cleanup: GPU: Replace Batch uniform by shader uniform using macroClément Foucault
This is a first step into removing uniforms from GPU_batch and Imm.
2020-08-14UI Code Quality: Use derived struct for color ramp buttonsHans Goudey
The same changes as rB570044e9f412 and rB0ab21bf06ae0.
2020-08-14UI Code Quality: Use derived struct for curve mapping buttonsHans Goudey
The same changes as in rB570044e9f412.
2020-08-14UI Code Quality: Use derived struct for curve profile buttonsHans Goudey
Continuing the work from rB49f088e2d093. Differential Revision: https://developer.blender.org/D8561
2020-08-13Merge branch 'blender-v2.90-release'Hans Goudey
2020-08-13UI: Fix curve widget fill artifactspembem22
Disable antialiasing which caused artifacts. Differential Revision: https://developer.blender.org/D8497
2020-08-07Cleanup: declare arrays arrays where possibleCampbell Barton
2020-07-30Cleanup: Rename defineHans Goudey
*_LEN follows names elsewhere in Blender more closely than "_N_"
2020-07-26GPU: Remove GL constant from BIF_glutilClément Foucault