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-09-06GPU: remove 'GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR'Germano Cavalcante
The only difference between `GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR` and `GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR` is that in the vertex shader the 2D version uses `vec4(pos, 0.0, 1.0)` and the 3D version uses `vec4(pos, 1.0)`. But VBOs with 2D attributes work perfectly in shaders that use 3D attributes. Components not specified are filled with components from `vec4(0.0, 0.0, 0.0, 1.0)`. So there is no real benefit to having two different shader versions.
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-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
2020-10-20UV/Image: Remove Legacy DrawingJeroen Bakker
With D8234 a new drawing method for UV/Image editor was introduced. For debugging reasons we left the old drawing method in the code base. This patch will remove the old drawing method. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D9011
2020-08-24Fix selected UV vertex drawing ignoring sizeCampbell Barton
2020-08-24UVEdit: Fix assert caused by depth mask not being set before clearClément Foucault
This happened when using the shading panel when a uv editor opened.
2020-08-23Cleanup: GPU: Use explicit clear value in GPU_clear* commandsClément Foucault
This replace `GPU_clear()` by `GPU_clear_color()` and `GPU_clear_depth()`. Since we always set the clear value before clearing, it is unecessary to track the clear color state. Moreover, it makes it clearer what we clear the framebuffer to.
2020-08-20GPUState: Use explicit depth test enumClé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: Replace blend func separate by enumClément Foucault
2020-08-13UVEdit: Fix drawing after recent refactorClément Foucault
2020-08-13GPUBatch: Remove most use of GPU_batch_draw_advanced()Clément Foucault
This is in order to better encapsulate / isolate the drawing code.
2020-08-13GPUShader: Change shader state tracking to be part of the GPUContextClément Foucault
This remove the use of batch->program and replace it with batch->shader. This will allow GL abstraction latter.
2020-07-18Cleanup: GPU: Encapsulate glProvokingVertexClément Foucault
2020-07-15Fix T78647 UVEdit: Crash when entering edit mode with UV Editor openClément Foucault
Only affects MacOS.
2020-07-10Fix T78756: White UV drawing is displayed as DashedCampbell Barton
2020-07-03Cleanup: Editors/Space/UV-Edit, 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/editors/uv_edit` module. No functional changes.
2020-07-02Fix T76806 UV Editor: Display as Outline do not work on macOSClément Foucault
This is a simple workaround using polyline shader. This is temporary and a better solution should be found when we refactor the 2D view using DRW.
2020-06-22Fix T62917 UV editor: Edge overlay not shown when edge overlay type is DashClément Foucault
Fix by changing the shader to always compute dash for uv and just change dash size to something really big for other overlay types.
2020-06-02DrawManager: Graph Task SchedulingJeroen Bakker
This patch uses a graph flow scheduler for creating all mesh batches. On a Ryzen 1700 the framerate of Spring/020_02A.anim.blend went from 10 fps to 11.5 fps. For each mesh where batches needs to be updated a sub-graph will be added to the task_graph. This sub-graph starts with an extract_render_data_node. This fills/converts the required data from Mesh. Small extractions and extractions that can't be multi-threaded are grouped in a single `extract_single_threaded_task_node`. Other extractions will create a node for each loop exceeding 4096 items. these nodes are linked to the `user_data_init_task_node`. the `user_data_init_task_node` prepares the userdata needed for the extraction based on the data extracted from the mesh. Note: If the `lines` and `lines_loose` are requested, the `lines_loose` sub-buffer is created as part of the lines extraction. When the lines_loose is only requested the sub-buffer is created from the existing `lines` buffer. It is assumed that the lines buffer is always requested before or together with the lines_loose what is always the case (see `DRW_batch_requested(cache->batch.loose_edges, GPU_PRIM_LINES)` in `draw_cache_impl_mesh.c`). Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D7618
2020-05-19Fix UV shadow drawing not respecting 'UV Opacity' settingPhilipp Oeser
reapply changes from 30cbbccc6002 / D7764 that were only meant for master. Sorry for the noise!
2020-05-19Merge branch 'blender-v2.83-release'Philipp Oeser
2020-05-19Fix build error after 30cbbccc6002Philipp Oeser
That part only applies to master, sorry for the noise
2020-05-19Merge branch 'blender-v2.83-release'Philipp Oeser
2020-05-19Fix (unreported) UV shadow not drawing smoothPhilipp Oeser
When showing UV edges after modifiers [draw_uvs_shadow], these were never drawn anti-aliased [in contrast to the 'main' UVs]. Also: they did not respect the new 'UV Opacity' setting. Differential Revision: https://developer.blender.org/D7764
2020-04-16Theme: adjust active UV face color in the themeCampbell Barton
This color had it's alpha reduced in the drawing code, as the active face is no longer stippled. Now the color is used from the theme without adjusting the alpha.
2020-04-16UV: support changing the opacity of the UV overlayCampbell Barton
Add this option as it's useful to adjust how much UV's cover the image when UV mapping. D5348 by @EitanSomething with edits
2020-04-14GPUShader: Implement workaround for gizmo drawing on sRGB framebufferClément Foucault
This solution involves adding a uniform to each fragment shader that is used by gizmo drawing and use the framebuffer state to set this uniform accordingly. This solution can also be carried to external shaders (addons). A single line of code would then be enough to fix the issue. The only trickery here is the dummy define: `#define srgb_to_framebuffer_space(a)` This is in order to avoid breaking other DRW shaders that use the same fragment shader code but do not need the tranformation. Related to T74139 Reviewed By: brecht, campbellbarton Differential Revision: https://developer.blender.org/D7261
2020-03-25Cleanup: use 'r_' prefix for output argumentsCampbell Barton
Also pass some args as 'const'.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-06Cleanup: Rename ARegion variables from ar to regionJulian Eisel
The old convention was easy to confuse with ScrArea. Part of https://developer.blender.org/T74432. This is mostly a batch rename with some manual fixing. Only single word variable names are changed, no prefixed/suffixed names. Brecht van Lommel and Campbell Barton both gave me a green light for this convention change. Also ran clan clang format on affected files.
2020-01-02Cleanup: quiet const warningsCampbell Barton
2019-09-27Fix T69941 Assert selecting UVsClément Foucault
Was caused by DRW_mesh_batch_cache_get_edituv_faces_stretch_area called after DRW_mesh_batch_cache_create_requested. So it was created on the wrong object/mesh.
2019-09-13Cleanup: unused headers (GPU)Campbell Barton
2019-09-04Fix T63755: Area Stretching OverlayJeroen Bakker
Support for UV Stretching overlay during multi object editing. The VBO now holds the ratios per fase. In the shader these ratios will be compared against the global ratios. The global rations are created from all selected objects. The current implementation does not fit well with the draw module. The plan is to move the drawing of other spaces towards the draw manager what leads to a better fit. Currently the details on this solution is unclear but this requirement will become an attentionpoint in the future design. Reviewed By: fclem Differential Revision: https://developer.blender.org/D5665
2019-08-24Cleanup: use eval as a suffixCampbell Barton
Follow conversion already used in most places.
2019-08-16Fix part of T62917: selected edge not highlighted with black and white overlaysEitanSomething
Differential Revision: https://developer.blender.org/D5369
2019-08-14Mesh Batch Cache: Refactor + MultithreadClément Foucault
For clarity sake, the batch cache now uses exclusively per Loop attributes. While this is a bit of a waste of VRAM (for the few case where per vert attribs are enough) it reduces the complexity and amount of overall VBO to update in general situations. This patch also makes the VertexBuffers filling multithreaded. This make the update of dense meshes a bit faster. The main bottleneck is the IndexBuffers update which cannot be multithreaded efficiently (have to increment a counter and/or do a final sorting pass). We introduce the concept of "extract" functions/step. All extract functions are executed in one thread each and if possible, using multiple thread for looping over all elements. Reviewed By: brecht Differential Revision: http://developer.blender.org/D5424
2019-07-09Fix T66359: UV editor ignores face-dot sizeCampbell Barton
D5178 by @deadpin
2019-06-21Fix dashed line drawingCampbell Barton
The dash_factor wasn't being set in many places, having the graph editor open for eg, caused box-select in the 3D view not to show dashes.
2019-06-17Fix T57650 UVEdit: selection not visible if behind unselected UVsClément Foucault
Use depth buffer to order the uv edges correctly to always draw selected edges on top. We still use the double drawing workaround for points to keep the smooth antialiased display.
2019-05-28Cleanup: GPU: Move program point size to GPU_stateClément Foucault
2019-05-22GPU: Refactor GPU_batch_draw_range_exClément Foucault
Rename it to GPU_batch_draw_advanced and use base instance when possible. Also add GPU_batch_bind to bind the vao independantly of drawing commands.
2019-05-09Fix T64329 Crash when switching to Texture PaintClément Foucault
2019-05-09Fix crash displaying UV'sCampbell Barton
2019-05-01UV Sculpt: improve tool-system integrationCampbell Barton
In 2.7x UV sculpt was a kind of sub-mode (a toggle with it's own key-map & drawing code). Move this to an operator that uses the tool-system, this simplifies internal logic, especially brush selection which now matches sculpt and other paint modes. - Remove toggle used to enable uv sculpt. - Expose the brush, which was already used but there was no way to select different brushes. - Make UV sculpt use paint paint tool slots (using brushes how all other paint mode currently do). - Move UV Sculpt keymap to the tools keymap. - Remove Q to toggle UV sculpt mode, S/P/G keys to switch tools.
2019-04-22Cleanup: style, use braces for editorsCampbell 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-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-17Cleanup: rename Mesh.edit_btmesh -> edit_meshCampbell Barton
When bmesh was in a branch we had both edit_mesh and edit_btmesh, now there is no reason to use this odd name.