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-08-14GPencil: Engine: Make GL lights declaration optionalClément Foucault
This avoid some macro name clashing with other engines where this struct is not needed.
2022-07-12Fix T99103: crash when displaying or rendering Grease Pencil objectKhoi Dau
On some hardware/systems, blender may crash when adding, rendering or displaying Grease Pencil objects. In `/source/blender/draw/engines/gpencil/shaders/gpencil_vert.glsl`, line 35: ``` gpMaterialFlag gp_flag = floatBitsToInt(gp_mat._flag); ``` `gpMaterialFlag` is of type `uint`. This is a mismatched-type assignment that can cause crashes on some hardware/systems with GLSL that do not support implicit type casting. So use `floatBitsToUint` for type conversion. Differential Revision: https://developer.blender.org/D15433
2022-06-28Fix T98882: Regression: Gradient colors in a Grease Pencil material change ↵Germano Cavalcante
depending on the visibility of other objects The material ID was being wrongly passed in the shader.
2022-06-27Cleanup: DRW: Remove drw_view renaming MACROSClément Foucault
2022-05-13Cleanup: spelling in comments, capitalize tagsCampbell Barton
Also add missing task-ID reference & remove colon after \note as it doesn't render properly in doxygen.
2022-05-11Cleanup: use '_num' / '_count' suffix instead of '_ct'Campbell Barton
Use num & count (for counters), in drawing code, see: T85728.
2022-04-14Metal: GLSL shader compatibility 4th passJason Fielder
MSL follows C++ standard convention, and such variable declarations within switch statements must have their scope localised within each case. Adding braces in all cases ensures correct behaviour and avoids 'case ... bypass initialization of local variable' compilation error. struct initialisation to follow C++ rules for Metal. Implicit constructors replaced with either explicit constructors or list-initialization where appropriate. Ref T96261 Authored by Apple: Michael Parkin-White Reviewed By: fclem Maniphest Tasks: T96261 Differential Revision: https://developer.blender.org/D14451
2022-04-05GPencil: Fix buiding with GTESTClément Foucault
2022-04-05Fix T97010 GPencil: Artifacts on Grease PencilClément Foucault
Was caused by wrong name for uniform update. Regression introduced in rBeccb0b222e34
2022-04-01Cleanup: Use const for bounding boxes where possibleHans Goudey
2022-03-31GPencil: Fix regression with dots uvsClément Foucault
This was introduced by rBeccb0b222e3465baa71430223c5ee2f0206a7b02.
2022-03-22Cleanup: make format + extra parenthesisDalai Felinto
Nested ? : get better formatted with some parenthesis around the expressions.
2022-03-20GPencil: Port main object shader to ShaderCreateInfoClément Foucault
This is quite a huge cleanup. Making use of the `common_gpencil_lib.glsl` to share more codes and use more consistent codestyle. The gpencil engine specifics are now out of the `gpencil_vertex()` function making it easier to add more features. There should be no regression as all workarounds are kept as is.
2022-03-20GPencil: Use ShaderCreateInfo for fullscreen shadersClément Foucault
Simple port. Shouldn't break anything.
2022-03-20GPencil: Use ShaderCreateInfo for antialiasing shadersClément Foucault
Simple port. Shouldn't break anything.
2022-03-20GPencil: Use ShaderCreateInfo for vfx shadersClément Foucault
Simple port. Shouldn't break anything.
2022-03-11Cleanup: use M_PI_2 and M_PI_4 where possibleHallam Roberts
The constant M_PI_4 is added to GLSL to ensure it works there too. Differential Revision: https://developer.blender.org/D14288
2022-03-11Cleanup: fix source comment typosBrecht Van Lommel
Contributed by luzpaz. Differential Revision: https://developer.blender.org/D14307
2022-03-04Cleanup: spelling in comments, function nameCampbell Barton
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-31Cleanup: use our own conventions for tags in commentsCampbell Barton
2022-01-06Cleanup: spelling in commentsCampbell Barton
2021-12-20Fix T94262: Grease Pencil Blur Effect DoF mode wrongPhilipp Oeser
This was visible outside of camera view and was not respecting the "Depth of Field" checkbox on the Camera properties. Now return early if DoF should not be visible. Maniphest Tasks: T94262 Differential Revision: https://developer.blender.org/D13631
2021-12-08Cleanup: move public doc-strings into headers for 'draw'Campbell Barton
Ref T92709
2021-12-07DrawManager: Engine Instance Data.Jeroen Bakker
In the original design draw engines had to copy with a limitation that they were not allowed to reuse complex data structures between drawing calls. Data that could be reused were limited to: - GPUFramebuffers - GPUTextures - Memory that could be removed calling MEM_freeN (storage list) - DRWPass This is fine when the storage list contains arrays or structs but when more complex data types (vectors, maps) etc wasn't possible. This patch adds instance_data that can be reused between drawing calls. The instance_data is controlled by the draw engine and doesn't need to be limited as described above. When an engines stores instance_data it must implement the `DrawEngineType.instance_free` callback to free the data. The patch originates from eevee rewrite. But was added to master as the image engine rewrite also has a need for it. Reviewed By: fclem Differential Revision: https://developer.blender.org/D13425
2021-11-19Cleanup: fix typos in comments and docsBrecht Van Lommel
Contributed by luzpaz. Differential Revision: https://developer.blender.org/D13264
2021-11-02Images: refactor how failed image load attempts are rememberedJacques Lucke
Previously, `ImageTile->ok` and `ImageUser->ok` were used to indicate whether an image failed to load. There were three possible values which (probably) had the following meanings: * `0`: There was an error while loading the image. Don't try to load again. * `1`: Default value. Try to load the image. * `2`: The image was loaded successfully. This image-wide flag did not make sense unfortunately, because loading may work for some frames of an image sequence but not for others. Remember than an image data block can also contain a movie. The purpose of the `->ok` flag was to serve as an optimization to avoid trying to load a file over and over again when there is an error (e.g. the file does not exist or is invalid). To get the optimization back, the patch is changing `MovieCache` so that it can also cache failed load attempts. As a consequence, `ibuf` is allowed to be `NULL` in a few more places. I added the appropriate null checks. This also solves issues when image sequences are used with the Image Texture node in Geometry nodes (also see D12827). Differential Revision: https://developer.blender.org/D12957
2021-10-15Cleanup: Commonize code for checking scene lights/world settingsJesse Yurkovich
There were several places attempting to check to see if scene lights and world were enabled for display. This tries to find a common place for both of these to reduce duplication. Honestly, I couldn't find a really good spot for these and settled on DRW_engine. It's not the best spot since they're not strictly drawing related, but let's start here. Reviewed By: fclem Differential Revision: https://developer.blender.org/D12658
2021-10-03Cleanup: spelling in commentsCampbell Barton
2021-09-17Fix T91448: GPencil Fill simplify not working in renderAntonio Vazquez
The simplify was hardcode to be disabled in render.
2021-07-30Cleanup: clang-format (re-run after v12 version bump)Campbell Barton
2021-07-26Cleanup: spelling in commentsCampbell Barton
2021-07-23Cleanup: code comments punctuation / spacingCampbell Barton
2021-07-06GPencil: Rename BKE_gpencil_visible_stroke_iterAntonio Vazquez
Renamed to BKE_gpencil_visible_stroke_advanced_iter Also created a simple version of the iterator to be used without multiframe and onion skin.
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-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-15Cleanup: correct incomplete commentCampbell Barton
2021-05-28GPencil: Fix unreported random rotation for single point with textureAntonio Vazquez
When using ``Path`` alignment, if the stroke has one point the texture rotates randomly when move the viewport. This was because with one point is impossible to calculate a path. Now, if the stroke has only one point, the texture for this stroke is aligned to Object.
2021-05-26GPencil: Add option to disable masks in view layerFalk David
This patch adds an option in the Layers > Relations panel called "Disable Masks in Render". When checked, no masks on this layer are included in the render. Example: | {F10087680} | {F10087681} | See T88202 for why this is needed. Reviewed By: antoniov Maniphest Tasks: T88202 Differential Revision: https://developer.blender.org/D11234
2021-05-25Fix T86956: VSE shading mode ignores Grease Pencil Vertex colors.Jeroen Bakker
Issue is that due to the strange definition of render in grease pencil (meaning should be rendered similar to rendering). This included normal viewport rendering in OB_RENDER and OpenGL render in OB_RENDER. For other rendering modes the overlay vertex opacity would be used. This patch sets this value to 1 when rendering via a scene strip override. NOTE: that this isn't a good solution as I expect that users want to use the opacity of the Grease pencil object. Perhaps the GPencil team has a better solution for it.
2021-05-19Materials: support changing materials during evaluationJacques Lucke
This commit allows that the evaluated geometry of an object has different materials from the original geometry. This is needed for geometry nodes. The main thing that changes for render engines and exporters is that the number of material slots on an object and its geometry might not match anymore. For original data, the slot counts are still equal, but not for evaluated data. Accessing material slots though rna stays the same. The behavior adapts automatically depending on whether the object is evaluated. When accessing materials of an object through `BKE_object_material_*` one has to use a new api for evaluated objects: `BKE_object_material_get_eval` and `BKE_object_material_count_eval`. In the future, the different behavior might be hidden behind a more general C api, but that would require quite a few more changes. The ground truth for the number of materials is the number of materials on the geometry now. This is important in the current design, because Eevee needs to know the number of materials just based on the mesh in `mesh_render_mat_len_get` and similar places. In a few places I had to add a special case for mesh edit mode to get it to work properly. This is unfortunate, but I don't see a way around that for now. Differential Revision: https://developer.blender.org/D11236
2021-05-18Merge branch 'blender-v2.93-release'Antonio Vazquez
2021-05-18Fix T88370: GPencil render crash when use viewlayer and maskingAntonio Vazquez
When filtering the render using view layer, could be possible the mask is NULL and just need to be ignored.
2021-05-03Cleanup: spellingCampbell Barton
2021-04-29GPencil: glow fx, add threshold value color modeFalk David
This patch adds a threshold value to the glow effect in color mode. Currently, the threshold is hardcoded to 5%. You can select a color and specify a higher threshold to include similar colors in the effect. Note: depends on D10670 Reviewed By: #grease_pencil, pepeland Differential Revision: https://developer.blender.org/D10672
2021-04-14GPencil: Invert color offsetting for Single and Object modeAntonio Vazquez
Now, instead to offset the stroke color to make it visible over fill, the stroke keeps the original color and the fill is offset. Related to the issue in T87406.
2021-04-14Fix T87406: Stroke color when using object color modeFalk David
The color of the strokes was shifted when using `Single Color` or `Object Color`in Solid Display Mode. This was originally done so that it was still possible to differentiate strokes and fills. The fix allows for a completly flat shading by checking if the Lighting Mode is set to `Flat`. If it is, then the colors are not shifted for the strokes and everything will use the same color. Reviewed By: antoniov, fclem Maniphest Tasks: T87406 Differential Revision: https://developer.blender.org/D10957
2021-03-15Fix T86370: Select color for glow is invertedFalk David
The shader was filtering everything but the selected color. The fix inverts the check to make sure that color is selected. Reviewed By: fclem Maniphest Tasks: T86370 Differential Revision: https://developer.blender.org/D10670
2021-02-19GPencil: Don't show only lines in draw modeAntonio Vazquez
As now is possible to use multiframe in Draw mode, the option to display only lines must be disabled.