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
2019-12-02Overlay Engine: Refactor & CleanupClément Foucault
This is the unification of all overlays into one overlay engine as described in T65347. I went over all the code making it more future proof with less hacks and removing old / not relevent parts. Goals / Acheivements: - Remove internal shader usage (only drw shaders) - Remove viewportSize and viewportSizeInv and put them in gloabl ubo - Fixed some drawing issues: Missing probe option and Missing Alt+B clipping of some shader - Remove old (legacy) shaders dependancy (not using view UBO). - Less shader variation (less compilation time at first load and less patching needed for vulkan) - removed some geom shaders when I could - Remove static e_data (except shaders storage where it is OK) - Clear the way to fix some anoying limitations (dithered transparency, background image compositing etc...) - Wireframe drawing now uses the same batching capabilities as workbench & eevee (indirect drawing). - Reduced complexity, removed ~3000 Lines of code in draw (also removed a lot of unused shader in GPU). - Post AA to avoid complexity and cost of MSAA. Remaining issues: - ~~Armature edits, overlay toggles, (... others?) are not refreshing viewport after AA is complete~~ - FXAA is not the best for wires, maybe investigate SMAA - Maybe do something more temporally stable for AA. - ~~Paint overlays are not working with AA.~~ - ~~infront objects are difficult to select.~~ - ~~the infront wires sometimes goes through they solid counterpart (missing clear maybe?) (toggle overlays on-off when using infront+wireframe overlay in solid shading)~~ Note: I made some decision to change slightly the appearance of some objects to simplify their drawing. Namely the empty arrows end (which is now hollow/wire) and distance points of the cameras/spots being done by lines. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6296
2019-10-17Volumetric: Debug Voxel Size and LocationJeroen Bakker
When displaying the voxel size for an adaptive domain the resolution of the adaptive domain was used to calculate the world size of the voxel. This patch changes this to use the initial size of the domain. When using adaptive domain the overlay was not rendered in the right place. Thanks to sebbas for part of the patch! Reviewed By: sebbas, fclem Differential Revision: https://developer.blender.org/D6076
2019-10-16Fix T68380 Skin modifier root not displayedClément Foucault
2019-10-05Show Background Image Beneath Transparent Objects (Cycles only)Jeroen Bakker
Camera background images were not shown under transparent objects. This patch performs an alpha under for background images for cycles. In order to see the difference the Film transparency needs to be turned on. Note that workbench and EEVEE still needs to be adapted as they don't write store alpha value in the viewport. Side note. This implementation is already an improvement of the current behavior, what users are requesting. (Show background images underneath cycles viewport rendering.) It is clear that this patch still needs to be extended to workbench and eevee. For now that should be marked as a known limitation. Reviewed By: fclem Differential Revision: https://developer.blender.org/D5437
2019-09-27Fix T70106 Objects with multiple materials are not displaying correctlyClément Foucault
Seems to be an issue with OSX and loading objects matrices from uniform buffers. Using legacy path for that reason.
2019-09-19Fix T69853: Object orientation is wrong with some AMD deprecated drivers.mano-wii
This solution only reuses the performance workaround made for Intel. But the original problem was not solved. Not much we can do to solve it.
2019-09-18GPU: AMD: Remove workaround that doesn't workmano-wii
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-09-09Cleanup: trailing space, remove tabs, pep8Campbell Barton
2019-09-03Fix empty image wire drawing with front/back depthCampbell Barton
The vertex shaders depth offset was ignored in this case.
2019-08-26Missed adding file in recent commitCampbell Barton
2019-08-19View3D Grid: fix imperial grid drawingmano-wii
This is a step to finish the D4325 and fix the T61286. Currently the grid is highlighted in steps of 10 out of 10, which is wrong for the imperial units as seen in `buImperialLenDef`. The idea of the code is to pass the steps of the grid already dimensioned as a uniform. Another important thing to note is that subdivisions now only affect the grid without unity. This matches the 2.7x Blender versions. No performance loss (almost no gain too). Reviewers: fclem Subscribers: zlsa, rl.amorato Differential Revision: https://developer.blender.org/D4379
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-08-08Fix T67587: Fix Drawing in Wireframe Non X-Ray ModeJeroen Bakker
When using Vertex or Weight paint mode on a wireframe the overlay was blended with the background. In this case we now use alpha blending. Reviewed By: fclem Differential Revision: https://developer.blender.org/D5340
2019-08-01Cleanup: misc spelling fixesCampbell Barton
T68035 by @luzpaz
2019-07-31Spelling fixes in comments and descriptions, patch by luzpazBrecht Van Lommel
Differential Revision: https://developer.blender.org/D3744
2019-07-19DRW: lattice vertices were too smallCampbell Barton
2019-07-18Fix edit-mode particle vertex draw sizeCampbell Barton
Vertices were hard to see, draw the same size as edit-mesh vertices.
2019-07-08Fix T65534 Eevee don't respect active UVmapClément Foucault
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-05DRW: add back gl_PointSize for AMD driversCampbell Barton
2019-07-05Cleanup: remove redundant gl_PointSize assignmentCampbell Barton
2019-07-05DRW: weight-paint wire overlay made vertex selection hard to seeCampbell Barton
2019-06-27Cleanup: EditMode: Remove uneeded shader depth biasClément Foucault
The bias is done using the DRWView now, no need to double it.
2019-06-27DRW: Fix point shaders not using gl_PointSizeClément Foucault
All Shaders inside DRW should use gl_PointSize.
2019-06-21Fix T62876: Camera Background ImagesJeroen Bakker
Migrate old legacy code to the draw mamager/object mode. The old legacy version did not work with wireframe. By migrating the code to modern draw manager code we have mode control on the drawing process. Still background images do not work with OIT, the cause seems to be that the transparent pixels are treated as background pixels. Also There are some artifacts when working with Holdouts and DoF, this is because the draw engines do not pass the correct alpha values. Reviewers: fclem, brecht Differential Revision: https://developer.blender.org/D4638
2019-06-21Fix T65745: Bone Selection X-Ray Drawing.Jeroen Bakker
The Pose Bone Selection used normal matric multiplication, but that mismatched the Depth buffer from all draw engines. They used the optimized matrices from common_view_lib. This change will use the optimized version, so the depth buffer matches and the render artifacts would be correct. Please note that bone selection is not using shcfg and therefore render clipping is still off. Reviewed By: fclem Differential Revision: https://developer.blender.org/D5100
2019-06-19Fix active face-dot colorCampbell Barton
Unlike edge/vert this was blending with the regular selection color.
2019-06-14Cleanup: DRW: Remove one useless matrix multiplicationClément Foucault
2019-06-11Fix T65406 Edit Mode: Edge selection is below wireframe overlayClément Foucault
This was due to a double offset of the wireframe. We also reduce the wireframe offset. The look of the wireframe overlay changes a little with on distant wires.
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-06-05TexturePaint: Missing Texture Depth TestJeroen Bakker
Depth testing was off as it used the precomputed ModelView matrix. As draw engines currently use a different approach the depth was sometimes a bit off making the color disappear. This change will use a different vertex shader that will write the correct depth. I expected the same change to be needed in the bone selection overlay but was not able to reproduce it. Reviewed By: fclem Maniphest Tasks: T64615 Differential Revision: https://developer.blender.org/D5006
2019-06-04Cleanup: style, use braces for draw (fxaa_lib)Campbell Barton
2019-06-03Cleanup: style, use braces in drawCampbell Barton
2019-05-303D View: Support light probe data clippingCampbell Barton
2019-05-27Cleanup: DRW: Make clipped shader use UBO clip planesClément Foucault
2019-05-24Edit Mesh: Change color behaviorClément Foucault
- Make edges darker in vert & face select mode (making more contrast to not loose the topology). Downside is less select edges visibility in vertex mode. But I'm confident that it's not as painfull as it seems. - Make select faces less saturated to have more color contrast between select faces and edges. - Make unselected faces white to increase contrast with faces and edges. The brightening is negligeable for bright surfaces and help readability on darker surfaces. Reminder that if the faces overlays are too distracting (i.e: uv mapping, or texturing) they can be toggled off in the overlay panel. Reviewers: billreynish, campbellbarton, brecht Reviewed By: billreynish, campbellbarton, brecht Subscribers: brecht Differential Revision: https://developer.blender.org/D4941
2019-05-22DRW: Add DRWView to improve different view handlingClément Foucault
This will have multiple benefit. TODO detail benefits (culling, more explicit, handling of clipping planes) For now the view usage is wrapped to make changes needed more progressive.
2019-05-22Fix T64499: edit mode display glitch on Intel HD 4x00 and Windows 7/8Brecht Van Lommel
There may well be more vertex shaders that need this, but I couldn't find them in my testing. Differential Revision: https://developer.blender.org/D4921
2019-05-17Eevee / Workbench: Fix hair normalsClément Foucault
Hair normals were not behaving correctly. This corrects their looks and fix the node shader geometry that was showing the flat normal.
2019-05-17DRW: Make fullscreen vertex shader position and uv without attributesClément Foucault
2019-05-14Fix Shader compilation error on MacOS & some other platform/driverClément Foucault
texture2D() is no longer supported by modern opengl, use texture() instead.
2019-05-14Fix zfighting from edit mode face overlaysClément Foucault
2019-05-14Fix T64574 : Weird shadow mesh glitches in viewportClément Foucault
This is not the most clean but this is what is needed to make point_object_to_ndc equivalent to point_object_to_world + point_world_to_ndc
2019-05-14Fix T64574 : Weird shadow mesh glitches in viewportClément Foucault
This is not the most clean but this is what is needed to make point_object_to_ndc equivalent to point_object_to_world + point_world_to_ndc
2019-05-14Cleanup: DRW: Move ModelMatrix declaration to common_view_libClément Foucault
2019-05-14Cleanup: DRW: Add and use DRW_shgroup_uniform_vec2_copyClément Foucault
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