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-07-30Cleanup: GPU: Remove GPU_draw.h and move fluid gpu function to DRWClément Foucault
2020-07-30Cleanup: Split gpu_texture_image.c into BKE and IMB modulesClément Foucault
This is in order to disolve GPU_draw.h into more meaningful code blocks. All the Image related function are in `image_gpu.c`. All the MovieClip related function are in `movieclip.c`. The IMB module now has a connection with GPU. This is not strickly necessary and the code could be move to `image_gpu.c` if needed. The Image garbage collection is also ported to `image_gpu.c`.
2020-07-29Cleanup: GPU: Move Image based function to GPU_draw.hClément Foucault
This makes it less confusing what functions are for blender structures.
2020-07-26Cleanup: Image: Rename redundant enum for clarityClément Foucault
2020-07-26GPUTexture: Replace GL textarget enum by Image enumClément Foucault
2020-07-21Cleanup: CodeQuality: Replace OB_DRAWXRAY by OB_DRAW_IN_FRONTClément Foucault
This is to match the option name and to avoid confusion with workbench xray mode.
2020-07-15PointCloud: Initial rendering support for WorkbenchClément Foucault
Also includes outline overlays. Removes the temp overlay drawing We make the geometry follow camera like billboards this uses less geometry. Currently we use half octahedron for now. Goal would be to use icospheres. This patch also optimize the case when pointcloud has uniform radius. However we should premultiply the radius prop by the default radius beforehand to avoid a multiplication on CPU. Using geometry instead of pseudo raytraced spheres is more scalable as we can render as low as 1 or 2 triangle to a full half sphere and can integrate easily in the render pipeline using a low amount of code. Reviewed By: brecht Differential Revision: https://developer.blender.org/D8301
2020-06-23Cleanup: rename 'name' to 'filepath' for DNA typesCampbell Barton
Using 'name' for the full path of a file reads badly, especially when id.name is used in related code.
2020-06-08Workbench: Use eGPUSamplerState to change texture sampling behaviorClément Foucault
This removes some fragment shader hacks and improve the support of different repeat & filtering modes. This fix T77453 Image texture not repeating in viewport
2020-06-03Cleanup: DRW: Remove persistent uniform functionsClément Foucault
2020-05-12Cleanup: Remove print statementJeroen Bakker
2020-03-25Cleanup: typo in printPhilipp Oeser
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-11Workbench Simplification RefactorClément Foucault
This patch is (almost) a complete rewrite of workbench engine. The features remain unchanged but the code quality is greatly improved. Hair shading is brighter but also more correct. This also introduce the concept of `DRWShaderLibrary` to make a simple include system inside the GLSL files. Differential Revision: https://developer.blender.org/D7060
2020-03-06CodeCleanup: Added View3DShading enumsJeroen Bakker
Added the core enums that workbench draw engine uses.
2020-02-05T73589: Code Quality: Renaming on BKE_material.hAntonio Vazquez
Old Name New Name ========= ========= init_def_material BKE_materials_init BKE_material_gpencil_default_free BKE_materials_exit test_object_materials BKE_object_materials_test test_all_objects_materials BKE_objects_materials_test_all give_matarar BKE_object_material_array give_totcolp BKE_object_material_num give_current_material_p BKE_object_material_get_p give_current_material BKE_object_material_get assign_material BKE_object_material_assign assign_matarar BKE_object_material_array_assign give_matarar_id BKE_id_material_array give_totcolp_id BKE_id_material_num assign_material_id BKE_id_material_assign clear_matcopybuf BKE_material_copybuf_clear free_matcopybuf BKE_material_copybuf_free copy_matcopybuf BKE_material_copybuf_copy paste_matcopybuf BKE_material_copybuf_paste BKE_material_init_gpencil_settings BKE_gpencil_material_attr_init BKE_material_add_gpencil BKE_gpencil_material_add BKE_material_gpencil_get BKE_gpencil_material BKE_material_gpencil_default_get BKE_gpencil_material_default BKE_material_gpencil_settings_get BKE_gpencil_material_settings
2020-01-29Fix T73188: RenderResult as Camera BG ImageJeroen Bakker
In blender 2.79 you could use a render result as a camera background image. This is useful during layout/compositing. During Blender 2.80 development there were 2 issues introduced that removed this feature. * to receive a render result the image required a lock. This lock wasn't passed and therefore no image was read from the result. Generating an GPUTexture from an Blender image also didn't do the locking. * the iuser->scene field wasn't set what is required for render results. This change adds an optional `ibuf` parameter to `GPU_texture_from_blender` that can be passed when available. Reviewed By: fclem, brecht Differential Revision: https://developer.blender.org/D6684
2020-01-16Fix T73133: UDIM texture count in Eevee is limited by OpenGLLukas Stockner
Based on @fclem's suggestion in D6421, this commit implements support for storing all tiles of a UDIM texture in a single 2D array texture on the GPU. Previously, Eevee was binding one OpenGL texture per tile, quickly running into hardware limits with nontrivial UDIM texture sets. Workbench meanwhile had no UDIM support at all, as reusing the per-tile approach would require splitting the mesh by tile as well as texture. With this commit, both Workbench as well as Eevee now support huge numbers of tiles, with the eventual limits being GPU memory and ultimately GL_MAX_ARRAY_TEXTURE_LAYERS, which tends to be in the 1000s on modern GPUs. Initially my plan was to have one array texture per unique size, but managing the different textures and keeping everything consistent ended up being way too complex. Therefore, we now use a simpler version that allocates a texture that is large enough to fit the largest tile and then packs all tiles into as many layers as necessary. As a result, each UDIM texture only binds two textures (one for the actual images, one for metadata) regardless of how many tiles are used. Note that this rolls back per-tile GPUTextures, meaning that we again have per-Image GPUTextures like we did before the original UDIM commit, but now with four instead of two types. Reviewed By: fclem Differential Revision: https://developer.blender.org/D6456
2019-12-18Workbench: Force Vertex Colors in Paint ModeJeroen Bakker
Vertex colors behaved differently as the paint overlay mixed the colors in display mode and the results was multiplied on top of the original shading. This patch will align the implementation to texture painting where the colors are drawn by the workbench engine so the correct shading is applied. This also means that we don't show the vertex colors overlay when not in solid mode. Reviewed By: fclem Differential Revision: https://developer.blender.org/D6436
2019-12-05Cleanup: Workbench: Remove Double negationClément Foucault
2019-12-05Workbench: Fix missing Clipping state when usint Alt+B clippingClément Foucault
Also make the code a bit more clear.
2019-11-27Cleanup: Remove BIF_gl.hJeroen Bakker
BIF_gl.h included hacks like redefining glew functions and a constant. The named constant `GLA_PIXEL_OFS` has been moved to `GPU_viewport.h` Reviewed By: brecht Differential Revision: https://developer.blender.org/D5860
2019-09-20Fix T69995: Object Drawtype Set To Solid IssuesJeroen Bakker
When setting an object draw type to Solid it always used the Material color mode. This change only sets the material color when the viewport is set to display textures.
2019-09-17DRW: Refactor to support draw call batchingClément Foucault
Reviewers: brecht Differential Revision: D4997
2019-09-14Revert "DRW: Refactor to support draw call batching"Clément Foucault
This reverts commit ce34a6b0d727bbde6ae373afa8ec6c42bc8980ce.
2019-09-13DRW: Refactor to support draw call batchingClément Foucault
Reviewers: brecht Differential Revision: D4997
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-07-17Fix T67001: Studio and Flat lightning in single color do not respect ↵mano-wii
clipping region `DRW_STATE_CLIP_PLANES` has to be enabled independent of the workbench material. Reviewers: fclem, jbakker Differential Revision: https://developer.blender.org/D5278
2019-07-05TexturePaint: Force Workbench Texture Color ModeJeroen Bakker
When in texture paint mode and in solid mode the object that is being texture painted will be rendered by the workbench engine with textures. All other objects would render the same. For other cases the texture paint draw engine will still draw the texture. The texture mode draw engine now only drawn the masks. The opacity sliders influences the texture mask. This change has been implemented conserably. In the future we need to look into making this better, like adding support that every object can be colored differently. Currently when rendering in the workbench we can have up to 3 different color types active (what the user selected, the fallback in case no materials have been configured and this one, forcing textures) Reviewed By: fclem, brecht Differential Revision: https://developer.blender.org/D5190
2019-07-01Fix T65974 Workbench: transparency rendering brokenClément Foucault
2019-07-01Workbench: Combine Xray Alpha with object/material alpha ...Clément Foucault
... instead of overiding it (previous behavior). In practice it's not really noticeable. This means an object with alpha will never be more opaque when enabling xray.
2019-06-07Fix T64625: Eevee image textures with alpha have dark edgesBrecht Van Lommel
Now texture storage of images is defined by the alpha mode of the image. The downside of this is that there can be artifacts near alpha edges where pixels with zero alpha bleed in. It also adds more code complexity since image textures are no longer all stored the same way. This changes allows us to keep using sRGB texture formats, which have edge darkening when stored with premultiplied alpha. Game engines seems to generally do the same thing, and we want to be compatible with them.
2019-05-31Fix sculpt mode drawing with modifiers still being wrong in some casesBrecht Van Lommel
Centralize logic for when to use the PBVH for drawing, fix missing tests in mask drawing, fix missing tests for multiple windows, only do more expensive update for all viewports at end of the stroke.
2019-05-27Cleanup: DRW: Move WorldClipPlanes to builtin uniformClément Foucault
2019-05-24Viewport: Change default studiolightClément Foucault
Differential Revision: https://developer.blender.org/D4939
2019-05-13Cycles/Eevee: unified and improved texture image color space handlingBrecht Van Lommel
Cycles now uses the color space on the image datablock, and uses OpenColorIO to convert to scene linear as needed. Byte images do not take extra memory, they are compressed in scene linear + sRGB transfer function which in common cases is a no-op. Eevee and workbench were changed to work similar. Float images are stored as scene linear. Byte images are compressed as scene linear + sRGB and stored in a GL_SRGB8_ALPHA8 texture. From the GLSL shader side this means they are read as scene linear, simplifying the code and taking advantage of hardware support. Further, OpenGL image textures are now all stored with premultiplied alpha. Eevee texture sampling looks a little different now because interpolation happens premultiplied and in scene linear space. Overlays and grease pencil work in sRGB space so those now have an extra conversion to sRGB after reading from image textures. This is not particularly elegant but as long as engines use different conventions, one or the other needs to do conversion. This change breaks compatibility for cases where multiple image texture nodes were using the same image with different color space node settings. However it gives more predictable behavior for baking and texture painting if save, load and image editing operations have a single color space to handle. Differential Revision: https://developer.blender.org/D4807
2019-05-01Cleanup: comments (long lines) in drawCampbell Barton
2019-04-23Workbench: Support Active Vertex ColorJeroen Bakker
Currently it is not possible to view the vertex colors of an object. To optimize the workflow, workbench will need to support Vertex Colors. The Vertex Colors is a new option in `shading->color_type`. When objects do not have vertex color, the objects will be rendered with the `V3D_SHADING_OBJECT_COLOR`. In order to support vertex colors in workbench the current texture/solid shading structure is migrated to a primary shaders and fallback shaders. Fix: T57000 Reviewers: brecht, fclem Differential Revision: https://developer.blender.org/D4694
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-24Cleanup: redundant use of string formatting functionsCampbell Barton
2019-03-23Fix workbench object outline ignoring clippingCampbell Barton
Workbench forward engine wasn't recompiling shaders when clipping changed, use GPUShaderConfigData when creating shaders.
2019-03-23Cleanp: remove redundant clipping uniformCampbell Barton
workbench_material_shgroup_uniform handles this.
2019-03-19Workbench: World Clipping For Specular TransparentJeroen Bakker
When Specular Transparent materials are used the world clipping did not work on the transparent materials. The reason was that the accum shaders did not vary on the existance of the clipping planes This patch will variate the accum shaders when clipping planes are active. Reviewed By: fclem Maniphest Tasks: T61023
2019-03-14Fix T61937: image sequences not updating in workbench display mode.Brecht Van Lommel
Need to pass the image user along to get the frame number.
2019-02-28Revert "Objects: Remove Textured from object display type"Clément Foucault
This reverts commit 6a4a984ff731070d0702821fe1e67dea40e593b9.
2019-02-28Objects: Remove Textured from object display typeClément Foucault
As discussed with @billreynish this makes little sense now that we don't have a dedicated textured mode. We don't have a superior texture or shaded mode anymore and we also cannot mix different engines together (workbench with eevee/lookdev). The only feature it removes is the possibility to hide textures for certain object in solid mode.
2019-02-28Fix T58405: viewport drawing issues with display device set to None.Brecht Van Lommel
Disabling color management this way is not very useful, but as long as the option is there it should work correct.
2019-02-23Fix: Workbench assert on non-image texture nodeDalai Felinto
This was not report, but it would happen if you open the sample file from T61858 and changed to solid view with texture.
2019-02-19DNA: rename Object.col -> colorCampbell Barton
Was confusing, unrelated to: colbits, col_mask, col_group, actcol & totcol.
2019-02-18Fix T57457: animated image sequences not working in Eevee.Brecht Van Lommel
The dependency graph now handles updating image users to point to the current frame, and tags images to be refreshed on the GPU. The image editor user is still updated outside of the dependency graph. We still do not support multiple image users using a different current frame in the same image, same as 2.7. This may require adding a GPU image texture cache to keep memory usage under control. Things like rendering an animation while the viewport stays fixed at the current frame works though.