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-02-06GPU: refactor clipped drawing from DRW into GPUCampbell Barton
Needed to fix T61196, supporting clipped back-buffer in the 3D view which is done outside the draw module. It was also inconvenient having DRW_shader_* versions of GPU_shader_* API calls. - Clipping distances are now supported as a shader configuration for builtin shaders. - Add shader config argument when accessing builtin shaders. - Move GPU_shader_create_from_arrays() from DRW to GPU.
2019-02-05Cleanup: remove contributors for CMake filesCampbell Barton
Following removal from C source code. See: 8c68ed6df16d8893
2019-01-11GPUShader: Add selection id shaderClément Foucault
This is to separate id drawing from standard color drawing.
2018-12-01UI: Simplify the area border drawingClément Foucault
Instead of doing a lot of alpha blended drawing with jittering, use the fragment shader to do the masking using a circle mask. This is much simpler and requires much less resources. Hopefully this may solve the issue we have with the Intels UHD Graphics 620 on linux.
2018-10-16Fix cmake not triggering rebuild on .glsl changesDalai Felinto
At least on windows we do not re-run datatoc when the .glsl files change. To test is simple, just change edit_mesh_overlay_common_lib.glsl remove lines, write plain text, ..., now rebuild and go in edit mode with the default cube. I also had to remove the entry in gpu/CMakeLists.txt for gpu_shader_material.glsl since this was being tracked directly, as well as running data_to_c_simple (otherwise CMake raises an error for duplicated entries). We probably want to do the same for the other datatoc functions. Reviewers: LazyDodo, brecht Differential Revision: https://developer.blender.org/D3803
2018-10-09Cleanup: Remove old shader referenceClément Foucault
2018-10-09Cleanup: Remove old smoke drawing codeClément Foucault
2018-10-04Cleanup: Remove some unneeded codeJacques Lucke
Reviewers: fclem Differential Revision: https://developer.blender.org/D3767
2018-10-01Edit UVs: Refactor drawing Edit UV in Image EditorClément Foucault
NOTE: This commit only concern edit UVs and not the "shadow" mesh displayed when texture painting. This will be address in a future commit. We now cache the uv mesh in the mesh batch cache and only reupload data on changes. Update could be more granular (and a bit faster) but it's not our main concern ATM. This should fix problem caused by the IMM api used to draw large meshes. This makes performance skyrocket compared to previous implementation. There is still a big CPU bottleneck when not in sync selection mode but it is not related to the drawing function directly.
2018-09-24Weight Paint: Multiply overlay on the meshJacques Lucke
Use the multiply blending mode for the weight paint overlay. To support the opacity slider, we need a new shader. Otherwise this combination of multiplication and mixing does not seem to be supported by glBlendFunc. Reviewers: brecht Differential Revision: https://developer.blender.org/D3727
2018-09-12GPU: Remove residue of OpenSubdivSergey Sharybin
Was done more like a hack on top of old drawing pipeline. Should be re-implemented to fit new draw manager closer.
2018-09-06CMake: add missing headersCampbell Barton
2018-08-23UI: Optimize the area border drawingClément Foucault
It is was not really a bottleneck but it was triggering my OCD when 1/3rd of the drawcalls in a normal scene were basically only caused by this.
2018-08-14GPUShader: Remove some of the unused shadersClément Foucault
keeping GPU_SHADER_SMOKE until other occurences are removed.
2018-08-14Cleanup: remove unused basic shader, we use many specialized shaders now.Brecht Van Lommel
2018-07-31New Grease Pencil object for 2D animationAntonioya
This commit merge the full development done in greasepencil-object branch and include mainly the following features. - New grease pencil object. - New drawing engine. - New grease pencil modes Draw/Sculpt/Edit and Weight Paint. - New brushes for grease pencil. - New modifiers for grease pencil. - New shaders FX. - New material system (replace old palettes and colors). - Split of annotations (old grease pencil) and new grease pencil object. - UI adapted to blender 2.8. You can get more info here: https://code.blender.org/2017/12/drawing-2d-animation-in-blender-2-8/ https://code.blender.org/2018/07/grease-pencil-status-update/ This is the result of nearly two years of development and I want thanks firstly the other members of the grease pencil team: Daniel M. Lara, Matias Mendiola and Joshua Leung for their support, ideas and to keep working in the project all the time, without them this project had been impossible. Also, I want thanks other Blender developers for their help, advices and to be there always to help me, and specially to Clément Foucault, Dalai Felinto, Pablo Vázquez and Campbell Barton.
2018-07-19GPU: Add GC to FBOs and UBOs and centralize all GCsClément Foucault
GPUFrameBuffers were being free when no context was attached or in the wrong gl context. This make sure this does not happen again. You can now safely free any gl resource from any thread (well as long as it's not used anymore!).
2018-07-18GWN: Port to GPU module: Replace GWN prefix by GPUClément Foucault
2018-07-18GWN: Port to GPU module: Move files to GPUClément Foucault
This does not include all the struct and type renaming. Only files were renamed. gwn_batch.c/h was fusioned with GPU_batch.c/h gwn_immediate.c/h was fusioned with GPU_immediate.c/h gwn_imm_util.c/h was fusioned with GPU_immediate_util.c/h
2018-07-15Cleanup: split GPU_batchCampbell Barton
Split out presets and utilities for creating batches. These functions are quite specialized and not related to typical usage.
2018-06-29Merge branch 'master' into blender2.8Campbell Barton
2018-06-29Cleanup: trailing newlinesCampbell Barton
2018-06-27bf_gpu: Add GPU_state module.Ray Molenkamp
This has wrappers for the most common gl* functions in the codebase, and is in preparation for D3502 Reviewers: brecht, fclem Differential Revision: https://developer.blender.org/D3501
2018-06-17Cleanup: codestyleCampbell Barton
2018-06-16This option limits visibility of the glew.h header to just bf_gpu and ↵Ray Molenkamp
intern_gawain this is to highlight areas in the code that still directly do opengl calls or use opengl types. This is in preparation for supporting alternative rendering back-ends. Reviewers: brecht, fclem Differential Revision: https://developer.blender.org/D3304
2018-05-03Metaball: Move handles shader to draw/modes/shader and reference them in ↵Germano
draw_common.c
2018-05-02GPUShader: Remove unused envelope shaders.Clément Foucault
2018-05-02GPUShader: Add GPU_SHADER_2D_IMAGE_MULTISAMPLE_2/4/8/16Clément Foucault
This shader is used instead of blitting back and forth to a single sample buffer. This means it resolves the color and depth samples and outputs a fragment which can be depth tested and blended on top of an existing framebuffer. We do static shader variation with manual loop unrolling for performance reason. In my test I get 25% more perf with intel integrated gpu and 75% performance gain with dedicated nvidia card compared to a single shader with a uniform for sample count.
2018-04-26UI: desaturate toolbar icons that the mouse is not over.Brecht Van Lommel
This does not look great with light toolbar buttons as in the default, so consider this a work in progress.
2018-04-22Remove unused shaderCampbell Barton
Originally added for icon drawing, no longer used.
2018-04-21View3D: Atenuate banding artifacts on background gradient.Clément Foucault
Dithering the output color for 8bit precision framebuffer with bayer matrix. On my tests the bayer matrux patterns are not noticeable at all. Note that it also does that in opengl rendered mode which can be in a much higher bitdepth. We can fix that if that's a problem in the future but I doubt it will.
2018-04-20UI: Support for runtime geometry iconsCampbell Barton
2018-04-19Remove Blender Internal and legacy viewport from Blender 2.8.Ton Roosendaal
Brecht authored this commit, but he gave me the honours to actually do it. Here it goes; Blender Internal. Bye bye, you did great! * Point density, voxel data, ocean, environment map textures were removed, as these only worked within BI rendering. Note that the ocean modifier and the Cycles point density shader node continue to work. * Dynamic paint using material shading was removed, as this only worked with BI. If we ever wanted to support this again probably it should go through the baking API. * GPU shader export through the Python API was removed. This only worked for the old BI GLSL shaders, which no longer exists. Doing something similar for Eevee would be significantly more complicated because it uses a lot of multiplass rendering and logic outside the shader, it's probably impractical. * Collada material import / export code is mostly gone, as it only worked for BI materials. We need to add Cycles / Eevee material support at some point. * The mesh noise operator was removed since it only worked with BI material texture slots. A displacement modifier can be used instead. * The delete texture paint slot operator was removed since it only worked for BI material texture slots. Could be added back with node support. * Not all legacy viewport features are supported in the new viewport, but their code was removed. If we need to bring anything back we can look at older git revisions. * There is some legacy viewport code that I could not remove yet, and some that I probably missed. * Shader node execution code was left mostly intact, even though it is not used anywhere now. We may eventually use this to replace the texture nodes with Cycles / Eevee shader nodes. * The Cycles Bake panel now includes settings for baking multires normal and displacement maps. The underlying code needs to be merged properly, and we plan to add back support for multires AO baking and add support to Cycles baking for features like vertex color, displacement, and other missing baking features. * This commit removes DNA and the Python API for BI material, lamp, world and scene settings. This breaks a lot of addons. * There is more DNA that can be removed or renamed, where Cycles or Eevee are reusing some old BI properties but the names are not really correct anymore. * Texture slots for materials, lamps and world were removed. They remain for brushes, particles and freestyle linestyles. * 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and other renderers use this to find all panels to show, minus a few panels that they have their own replacement for.
2018-04-17Removing Blender Game Engine from Blender 2.8Dalai Felinto
Folders removed entirely: * //extern/recastnavigation * //intern/decklink * //intern/moto * //source/blender/editors/space_logic * //source/blenderplayer * //source/gameengine This includes DNA data and any reference to the BGE code in Blender itself. We are bumping the subversion. Pending tasks: * Tile/clamp code in image editor draw code. * Viewport drawing code (so much of this will go away because of BI removal that we can wait until then to remove this.
2018-04-17GPU: Add GPU_SHADER_INSTANCE_VARIYING_ID_VARIYING_SIZE.Clément Foucault
Will be used for probe outline id drawing.
2018-04-07UI: Perf: Port color widgets to batch.Clément Foucault
This is more for completeness than perf. Shader is tiny bit more complex but we get less overdraw and drawcalls.
2018-04-06UI: Perf: Improve ui_draw_dropshadow.Clément Foucault
Replace the 12 iterations of UI_draw_roundbox_4fv with only one batch. This mean less overdraw and less drawcalls. I had to hack the opacity falloff curve manually to get approximatly the same result as previous technique. I'm sure with a bit more brain power somebody could find the perfect function.
2018-04-05GPUShader: Add 2D Nodelink shader.Clément Foucault
Special shader to draw nodelinks for the node editor. We only pass bezier points to the GPU and vertex position is handled inside the vertex shader. The arrow is also part of the batch to avoid separate drawcalls for it. We still draw 2 pass one for shadow and one for the link color on top. One variation to draw instances of theses links so that we only do one drawcall.
2018-03-31UI: Perf: Batch icons drawcalls together.Clément Foucault
For this we use a new shader that gets it's data from a uniform array. Vertex shader position the vertices using these data. Using glUniform is way faster than using imm for that matter. Like BLF rendering, UI icons are always (as far as I know) non occluded and displayed above everything else. They also does not overlap with texts so they can be batched at the same time.
2018-03-30BFL: Fix broken vertical texts.Clément Foucault
I've made a separate version of the geom shader that works with full 3D modelviewmat. This commit also includes some fixup inside blf_batching_start().
2018-03-29BLF: Perf: Divide by 6 the amount of verts sent to the GPU.Clément Foucault
This means smaller imm buffer usage. This does not reduce the number of drawcalls. This uses geometry shader which is slow for the GPU but given we are really CPU bound on this case, it should not matter. A perfect implementation would: - Set the glyph coord in a bufferTexture and just send the glyph ID to the GPU to read the bufferTexture. - Use GWN_draw_primitive and draw 2*strllen triangle and just retrieve the glyph ID and color based on gl_VertexID / 6. - Stream fixed size buffer that the Driver can discard quickly but this is the same as improving IMM directly.
2018-03-29GPUShader: Add specialized widget base shader.Clément Foucault
This vertex shader let us draw widgets with batches instead of imm calls.
2018-03-28UI: Perf: Make icon_draw_texture use GWN_draw_primitive.Clément Foucault
This bypass the use of immediate mode for theses drawcalls. Placement and and icon select (via uvs) is done inside the vertex shader.
2018-03-23GPUCompositing: Remove last reference to gpu_shader_fullscreen_vert.glslClément Foucault
It was breaking compilation with MSVC apparently.
2018-03-22GPUCompositing: Remove entire module.Clément Foucault
This module has no use now with the new DrawManager and DrawEngines and it is using deprecated paths. Moving gpu_shader_fullscreen_vert.glsl to draw/modes/shaders/common_fullscreen_vert.glsl
2018-02-26DRW: Add new Draw Manager OpenGL Context.Clément Foucault
This separate context allows two things: - It allows viewports in multi-windows configuration. - F12 render can use this context in a separate thread and do a non-blocking render. The downside is that the context cannot be used while rendering so a request to refresh a viewport will lock the UI. This is something that will be adressed in the future. Under the hood what does that mean: - Not adding more mess with VAOs management in gawain. - Doing depth only draw for operators / selection needs to be done in an offscreen buffer. - The 3D cursor "autodis" operator is still reading the backbuffer so we need to copy the result to it. - All FBOs needed by the drawmanager must to be created/destroyed with its context active. - We cannot use batches created for UI in the DRW context and vice-versa. There is a clear separation of resources that enables the use of safe multi-threading.
2018-02-16Metalball drawing: rename mball helpers to handlesGermano
and also rename some related functions
2018-02-13Code cleanup: stop using rectangle textures in window draw, simplify code.Brecht Van Lommel
2018-01-15Cleanup: split GPU_batch_presets into own fileCampbell Barton
Mixing other batch code in this file easily shadowed existing variables. Keep presets separate (we may have more, 2D & 3D presets)
2017-11-16Fix T51210: Draw Manager: Support for Metaball DrawingGermano
Differential Revision: D2914