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-06-01T54991: Restore support for Motion Path drawing in 2.8Joshua Leung
This commit restores support for Motion Path drawing in 2.8 (as it wasn't ported over to the new draw engines earlier, and the existing space_view3d/drawanimviz.c code was removed during the Blender Internal removal). Notes: * Motion Paths are now implemented as an overlay (enabled by default). Therefore, you can turn all of them on/off from the "Overlays" popover * By and large, we have kept the same draw style as was used in 2.7 Further changes can happen later following further design work. * One change from 2.7 is that thicker lines are used by default (2px vs 1px) Todo's: * There are some bad-level calls introduced here (i.e. the actgroup_to_keylist() stuff). These were introduced to optimise drawing performance (by avoiding full keyframes -> keylist conversion step on each drawcall). Instead, this has been moved to the calculation step (in blenkernel). Soon, there will be some cleanups/improvements with those functions, so until then, we'll keep the bad level calls. Credits: * Clément Foucault (fclem) - Draw Engine magic + Shader Conversion/Optimisation * Joshua Leung (Aligorith) - COW fixes, UI integration, etc. Revision History: See "tmp-b28-motionpath_drawing" branch (rBa12ab5b2ef49ccacae091ccb54d72de0d63f990d)
2018-05-26Cleanup: whitespace, long lines, duplicate includeCampbell Barton
2018-05-24Fix Lamps, Empties, Cameras and Speakers not using theme colorsPablo Vazquez
2018-05-16Armature: Cleanup: Remove unused function and use less silly wire drawing.Clément Foucault
2018-05-08Armature: Add back Stick bone draw type.Clément Foucault
The actual code is a bit convoluted but allows good and "pseudo efficient" drawing. (pseudo efficient because rendering instances with that amount of vertices is really inneficient. We should go full procedural but need to have bufferTexture implemented first) But drawing speed is not a bottleneck here and it's already a million time less crappy than the old (2.79) immediate mode method. Instead of drawing actual wires with different width we render a triangle fan batch (containing 3 fans: bone, head, tail) which is then oriented in screen space to the bone direction. We then interpolate a float value accross vertices giving us a nice blend factor to blend the colors and gives us really smooth interpolation inside the bone. The outside edge still being geometry will be antialiased by MSAA if enabled.
2018-05-07Object Mode: Use stipple shader for relationship lines.Clément Foucault
2018-05-06Armature: Fix bone axes not using bone color.Clément Foucault
2018-05-06Armature: Fix/Change bone axes display.Clément Foucault
Now the axes are displayed correctly at the tip of the bone and with the axes names. I've made some modifications though: - Axes are colored. (should not be in object mode but that's TODO) - Axes ends are not flat arrows anymore. Replaced with a small diamond. - Axes names are now scale by their respective axes instead of being affected by other axes. - Changed axes names "font" to be a bit more sexy.
2018-05-05Armature: Rename bone shaders and add 2 colors smooth blending.Clément Foucault
This will enable us to do more nice stuff in future commits. This commit is a temporary commit, it will compile but will crash if trying to display any armature. Next commit does work.
2018-05-05Armature: Make bone outlines thickness variable.Clément Foucault
2018-05-05Groups: remove drawing group objects in a different color.Brecht Van Lommel
With the upcoming unification of groups and collections this will make no sense anymore, as all objects will be in a collection.
2018-05-03Fix T54805: Bones are white in edit modeDalai Felinto
2018-05-03Metaball: Move handles shader to draw/modes/shader and reference them in ↵Germano
draw_common.c
2018-05-03Metaball: pointers used in `DRW_shgroup_call_dynamic_add` don't need to hold ↵Germano
the reference.
2018-05-02Armature: Envelope: Small cleanup + don't smooth the distance display.Clément Foucault
The actual weighting calculation is not smooth as the bone display. The bone itself can be smooth for esthetic purpose but the distance display should match the underlying weighting formula.
2018-05-02Armature: More work and cleanup on envelope bones drawing.Clément Foucault
- Draw tail & head sphere with point shader (no needs for another way). - Use the same function for issuing the calls for wire and solid envelope.
2018-05-02Armature: Envelope Bones: Change drawing method.Clément Foucault
We now use a more pleasant and efficient way to display enveloppe bones and their radius. For this we use a capsule geometry that is displaced (in the vertex shader) to a signed distance field that represents the bone shape. The bone distance radius are now drawn in 3D using a "pseudo-fresnel" effect. This gives a better understanding of what is inside the radius of influence. When capsules are not needed, we switch to default raytraced points. The capsules are not distorded by the bone's matrix (same as their actual influence radius) and are correctly displayed even with complex scaled parents hierarchy.
2018-05-02Armature: "Raytrace" bones endpoint spheres.Clément Foucault
Here is how it works: We render a high poly disc that we orient & scale towards the camera so that it covers the same pixel of the sphere it's supposed to represent. Then the pixel shader raytrace the sphere (effectively starting from the poly disc depth) and outputs the depth to gl_FragDepth. This approach has many benefit: - high quality obviously: per pixel accurate depth! - compatible with MSAA: since the sphere horizon is delimited by polygons, we get the coverage computed by the rasterizer. However we still gets aliasing if the sphere intersect directly other meshes. - virtually no overdraw: there is no backface to shade but we still get overdraw because by little triangle [gpus rasterize pixel by groups of 4]. - allows early depth test: since the poly disc is set at the nearest depth we can output, we can use GL_ARB_conservative_depth to enable early depth test and discard pixels that are already behind geometry. - can draw outline pretty easily without geometry shader.
2018-05-02DRW: Armature: New bone outline shader.Clément Foucault
This fix the issue with the zfighting we were getting at bones edges. Moreover, this enables us to render arbitrarly large outline with varying thickness.
2018-04-30DRW: Remove DRWTextureFormat in favor or GPUTextureFormat.Clément Foucault
Because: - Less redundancy. - Better suffixes. Also a few modification to GPU_texture_create_* to simplify the API: - make the format explicit to the texture creation process. - remove the component count as it's specified in the GPUTextureFormat.
2018-04-17Object Mode: Fix wrong wire color on non-meshes objects.Clément Foucault
2018-04-17DRW: Fix lightprobe objects outlines.Clément Foucault
2018-03-25DRW: Fix crash/broken Metaballs display.Clément Foucault
2018-02-28Object Mode: Fix incorrect lightprobe wire color when in edit mode.Clément Foucault
2018-02-27DRW: Do not recreate the common uniform buffer every frame.Clément Foucault
2018-02-16Metalball drawing: rename mball helpers to handlesGermano
and also rename some related functions
2018-02-15Cleanup: style, warningCampbell Barton
2018-02-14DRW: Refactor: Less feature duplication with Gwn.Clément Foucault
This removes the need of custom attribs for instancing. Instancing works fully with dynamic batches & Gwn_VertFormat now. This is in prevision of the VAO manager patch.
2018-02-06Object Mode: Add to EvaluationContext & DRWContextStateCampbell Barton
2018-01-11DRW: Fix T53583 Armature instances not drawing.Clément Foucault
Was due to the fact that the instances don't have a "static" obmat that can be referenced to use as a uniform. Solution : precompute the full matrix for each bone and pass it as instance data. (theses are copied into a buffer and can be discarded right away) Note: this could be optimized further and make only one drawcall (shgroup) to draw all bone instance of one type (vs. one call per armature).
2018-01-09Curve Edit Mode: Use curve handle theme colorsmano-wii
2018-01-04DRW: Fix boolean uniform lenght.Clément Foucault
Boolean uniform needs to be 4bytes long for opengl. Use "int" for every bool you want to pass as a uniform.
2017-12-07Merge branch 'master' into blender2.8Campbell Barton
2017-11-23Rename any instance of scene layer or render layer in code with view layerDalai Felinto
The RenderResult struct still has a listbase of RenderLayer, but that's ok since this is strictly for rendering. * Subversion bump (to 2.80.2) * DNA low level doversion (renames) - only for .blend created since 2.80 started Note: We can't use DNA_struct_elem_find or get file version in init_structDNA, so we are manually iterating over the array of the SDNA elements instead. Note 2: This doversion change with renames can be reverted in a few months. But so far it's required for 2.8 files created between October 2016 and now. Reviewers: campbellbarton, sergey Differential Revision: https://developer.blender.org/D2927
2017-11-16Fix T51210: Draw Manager: Support for Metaball DrawingGermano
Differential Revision: D2914
2017-11-09Cleanup: Use full name for scene_layer in drawSergey Sharybin
2017-08-01Cleanup: double promotionCampbell Barton
2017-06-19Gawain API naming refactorCampbell Barton
Use consistent prefix for gawain API names as well as some abbreviations to avoid over-long names, see: D2678
2017-05-24Fix leak in particle velocity global rampCampbell Barton
2017-05-23Implement particle velocity and acceleration visualizationLuca Rood
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-03Draw Manager: fix draw-state switching logicCampbell Barton
Changing states didn't properly reset between shading groups causing the GL state to be wrong based on draw order. States are now only set when changed.
2017-04-22missing from last commitCampbell Barton
2017-04-22Fix armature drawing ignoring object matrixCampbell Barton
Looks like name-space collision.
2017-04-20Draw Manager: round vertex size upCampbell Barton
Without this assigning `gl_PointSize = sizeVertex` made vertices too small.
2017-04-18Draw Manager: Fix uniforms array not been found.Clément Foucault
2017-04-15Cleanup: explicit names for return arguments and position lastCampbell Barton
2017-04-11Draw Manager: Fix blended color.Clément Foucault