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
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
2017-07-13Cleanup/rename etc. dashed line shaders.Bastien Montagne
Goal is to make them more modular, to allow more variants (variable single-color, thickness, ...) to be added without having to copy-and-change-one-line of whole chain of shaders.
2017-06-13CMake: add missing includesCampbell Barton
2017-05-19Cleanup: removing dummy legacy dashed line shader.Bastien Montagne
Dashed requires geom shader, which was not available with older OpenGL, now that we are on 3.3 we do not need that dummy workaround anymore.
2017-05-18DwM: Armature: Cleanup envelope bone code a bit.Bastien Montagne
Mainly adding 'wire' suffix to wire/distance drawing func and shader. Also, match wire vertex shader behavior with solid one regarding head/tail only drawing (i.e. alwas expect head bone mat, never tail one, and assume that if a radius is negative, then we only draw on the other end of the bone).
2017-05-18DwM: Armature: add solid envelope bone drawing.Bastien Montagne
Envelope bones are now pretty much identical to old drawing code. Note that currently new DwM drawing code does not seem to care about wire/solid drawing modes at all, guess this is still TODO... For now we hence just get both wire and solid for envelope bones, this can be refined later.
2017-05-17DwM: Armature: Add distance outline and wire drawing of envelope bones.Bastien Montagne
This is not complete, it does not implement 3D solid drawing of envelope bones. 2D wire is hence always drawn for now. Some notes: I did not try to implement the 'capsule' approach suggested by @fclem, because: 1. I spent enough time on this already, and finally got something working. 2. I managed to get rid of geometry shader completely. 3. Current approach allows us to use same shader for distance outline and envelope wire. It's working fine, except for one glitch - superpositions of envelope outlines do not work as expected, not sure what's wrong here, tried to disable zbuff, enable GL_BLEND, no luck so far... I think we need our own 'background' drawpass to get them working (also to avoid them drawing over the wire lines).
2017-05-16GPU: use ifdef for flat shaderCampbell Barton
2017-05-11Eevee: Add tonemapping using ocio.Clément Foucault
Actually it's done by the Draw Manager, so other engines can use it.
2017-05-10DWM: Use Gawain for sculpt drawingCampbell Barton
Currently only uses the simple shader.
2017-05-03Weight painting with draw managerLuca Rood
This implements weight rendering with the draw manager, with all drawing options (Shading, wire, face masking, vertex masking). This is part of T51208 Reviewers: campbellbarton Subscribers: dfelinto Differential Revision: https://developer.blender.org/D2654
2017-05-01Reworked version of dashed line shader.Bastien Montagne
Using geometry shader allows us to get rid of the 'line origin' extra vertex attribute, which means dashed shader no longer requires fiddling with those vertex attributes definition, and, most importantly, does not require anymore special drawing code! As you can see, this makes code much simpler, and much less verbose, especially in complex cases. In addition, changed how dashes are handled, to have two 'modes', a simple one with single color (using default "color" uniform name), and a more advanced one allowing more complex and multi-color patterns. Note that since GLSL 1.2 does not support geometry shaders, a hack was added for now (which gives solid lines, but at least does not make Blender crash).
2017-04-26Add 3D version of dashed line shader.Bastien Montagne
This is actually nearly same code as 2D version, maybe we can deduplicate that later?
2017-04-19Fix alpha overlay for sculpt/paint when using core profileSergey Sharybin
Same fundamental problem as fonts -- there is no longer GL_ALPHA format.
2017-04-16OpenGL: fix GPU_SHADER_SIMPLE_LIGHTING_SMOOTH_COLORMike Erwin
The fragment shader expects a normal, but the vertex shader was not providing one. Fix: added a new vertex shader that has normals + smooth color interpolation. I also split gpu_shader_3D_vert in two: - one with just position - one with position + normal For each of the builtin shaders, we should be able to look at the GLSL and tell exactly what it's doing. Using #defines and #ifdefs for rendering options makes the shaders hard to read and easy to break.
2017-04-10Object Engine: Ported Force Field object drawing.Clément Foucault