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
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
2017-04-08Fix WITH_LEGACY_OPENGL=ONCampbell Barton
This wasn't working outside of gpu module.
2017-04-06New build option WITH_LEGACY_OPENGLDalai Felinto
This introduces a new CMake option - WITH_LEGACY_OPENGL. Without this option things may not draw perfectly, however, we should soon be able to build with OpenGL core profile. The matrix-related api calls are (still) not handled here (glTranslate, ...). There seems to be no consensus on whether to make this build option the default. We can talk about this later. For now two things are the priority: (1) To get rid of deprecated calls when WITH_LEGACY_OPENGL is ON (2) To make core profile work for Mesa/Mac when WITH_LEGACY_OPENGL is OFF Reviewers: merwin, sergey, campbellbarton Differential Revision: https://developer.blender.org/D2603 Many thanks for Sergey Sharybin for the help.
2017-04-05Cleanup: Move imm_draw utils into own fileCampbell Barton
These were in BIF_glutil which is documented to be removed, so best not define new API's there.
2017-04-05Fix rotation manipulators not clippingJulian Eisel
Added new shader for clipping, also cleaned up rotation manipulator drawing code a bit. This code should be replaced by new transform manipulators soon, just keeping this working in the meanwhile.
2017-04-03GPULamp: Separate GPULamp from GPUMaterialClément Foucault
Since we need GPULamps for draw engines, it makes sense to separate them.
2017-03-18Draw Manager: Created a general fullscreen shader.Clément Foucault
2017-03-17move Gawain library to internMike Erwin
Before now it lived in source/blender/gpu for convenience. Only a few files in the gpu module use Gawain directly. Tested on Mac, time to push and test on Windows. Todo: some CMake magic to make it easy to #include "gawain/some_header.h" from any C or H file. Main problem here is the many editors that include GPU_immediate.h which includes Gawain's immediate.h -- is there a way to avoid changing every editor's CMakeLists?
2017-03-14CMake: add missing headersCampbell Barton
2017-03-11OpenGL: Convert drawobject.c (cont)Clément Foucault
Particle system (not edit mode)
2017-03-09Merge branch 'master' into blender2.8Campbell Barton
2017-03-083D View: new nethod of opengl selectionCampbell Barton
Intended to replace legacy GL_SELECT, without the limitations of sample queries which can't access depth information. This commit adds VIEW3D_SELECT_PICK_NEAREST and VIEW3D_SELECT_PICK_ALL which access the depth buffers to detect whats under the pointer, so initial selection is always the closest item. The performance of this method depends a lot on the OpenGL implementations glReadPixels. Since reading depth can be slow, buffers are cached for object picking so selecting re-uses depth data, performing 1 draw instead of 3 (for 24, 18, 10 px regions, picking with many items under the pointer). Occlusion queries draw twice when picking nearest, so worst case 6x draw calls per selection. Even with these improvements occlusion queries is faster on AMD hardware. Depth selection is disabled by default, toggle option under select method. May enable by default if this works well on different hardware. Reviewed as D2543
2017-03-05Clay Engine: More Lamp drawing workClément Foucault
2017-03-05Clay Engine: camera drawingClément Foucault
2017-03-03Gawain: add ShaderInterface for GLSL introspectionMike Erwin
After a GLSL program is linked we can get all its inputs & never have to ask it again. Several uniforms are considered "built-in". Nothing special about these to OpenGL itself, they just follow conventions of our built-in shaders. This will help the matrix API, immediate & batch drawing APIs, and allow extra error/compatibility checking.
2017-03-02Gawain: move PRIM types to new file, classify by geometryMike Erwin
PrimitiveClass will help match shaders to draw calls & detect usage errors. For example a point sprite shader only makes sense with PRIM_POINTS. Updated other files to include new primitive.h
2017-03-02Edit Mode overlay: Moved Shaders to draw modules and resolved some draw issue.Clément Foucault
We don't want to clutter gpu_shader.c with engine specific code Added face's center dot Simplified loose vert shader
2017-03-02Edit Mode overlays: separate multiple shaders for loose edges and vertsClément Foucault
2017-02-28rename built-in point shaders, SMOOTH --> AAMike Erwin
Updated shader names and code that uses them. All of these shaders produce round points that are anti-aliased and blended against the background. These were initially named SMOOTH because they replace glEnable(GL_POINT_SMOOTH). But SMOOTH in shader-land refers to vertex attribute interpolation (like glShadeModel(GL_SMOOTH)). Using SMOOTH to mean two things is confusing, so we now use AA to mean "the point is anti-aliased".
2017-02-26Clay Engine: Edit mesh overlaysClément Foucault
Based on the previous overlay shader from merwin. This shader takes care of clipped vertex cases and do all edit mode face info in one pass (except face centers). As the shading is done one the triangle itself the visual can't go beyond the surface of the mesh. That leads to half displayed edges on the outline of the mesh. This problem can be fixed by a second pass. This is work in progress.
2017-02-24OpenGL: wm_gesture uses new imm modeianwill
D2376 by @ianwill, part of T49043 review by @merwin Box select, circle select, etc. Introducing the dashed-line shader! See D2376 for more info.
2017-02-24OpenGL immediate mode: new shader image shuffle colorClément Foucault
new shader to draw an image with one isolated channel
2017-02-22Clay Engine: Renaming shader.Clément Foucault
2017-02-22Clay Engine: Prepare for Armature drawing.Clément Foucault
- Added runtime display matrices to EditBone and bPoseChannel - Added Object space instance vertex shader and modified the simple lighting shader accordingly
2017-02-17Add diagonal stripe shader (GPU_SHADER_2D_DIAG_STRIPES)Luca Rood
Reviewed By: merwin Differential Revision: https://developer.blender.org/D2512
2017-02-15Clay Engine: drawaxis names drawn with shaders & instanceClément Foucault
2017-02-11GPU shaders / Clay engine : small renaming / cleanupClément Foucault
2017-02-11Clay Engine: converted Empties to the new instancing methodClément Foucault
2017-02-11add builtin GPU_SHADER_KEYFRAME_DIAMONDMike Erwin
Now we can draw keyframe markers as point sprites, with fewer draw calls and state changes. Based on the builtin shader for round points with anti-aliased outline. This one is more pointy.
2017-02-11OpenGL immediate mode: interface_draw.c (cont)Clément Foucault
ui_draw_but_COLORBAND Introduced a new checker shader to be used mostly on transparent areas. OpenGL immediate mode: interface_draw.c (cont) ui_draw_but_UNITVEC Introduced a new shader to be used for simple lighting.
2017-02-07Clay-Engine (merge clay-engine)Clément Foucault
Initial work by Clément Foucault with contributions from Dalai Felinto (mainly per-collection engine settings logic, and depsgraph iterator placeholder). This makes Blender require OpenGL 3.3. Which means Intel graphic card and OSX will break. Disable CLAY_ENGINE in CMake in those cases. This is a prototype render engine intended to help the design of real render engines. This is mainly an engine with enphasis in matcap and ambient occlusion. Implemented Features -------------------- * Clay Render Engine, following the new API, to be used as reference for future engines * A more complete Matcap customization with more options * Per-Collection render engine settings * New Ground Truth AO - not enabled Missing Features ---------------- * Finish object edit mode - Fix shaders to use new matrix - Fix artifacts when edge does off screen - Fix depth issue - Selection sillhouette - Mesh wires - Use mesh normals (for higher quality matcap) - Non-Mesh objects drawing - Widget drawing - Performance issues * Finish mesh edit mode - Derived-Mesh-less edit mode API (mesh_rende.c) * General edit mode - Per-collection edit mode settings * General engines - Per-collection engine settings (they are their, but they still need to be flushed by depsgraph, and used by the drawing code)
2017-01-09Fix T49861: Interlace stereo drawingDalai Felinto
This does not address stapling shader in 2.8, though the solution can be similar (own shader, not polutting interlace shader). part of T49043 Reviewers: merwin Differential Revision: https://developer.blender.org/D2440
2016-11-29Gawain: manage GL buffer IDs in a thread-safe wayMike Erwin
Needed because deps graph can destroy objects from any thread. We ran into the same problem & solved it in GPU_buffers. Implemented in C++11 since it provides the needed machinery. The interface is in C like the rest of Gawain.
2016-11-18convert icon_draw_texture to gawain imm mode replacementsMartijn Berger
2016-11-08OpenGL: wm_operators.c uses new immediate modeMike Erwin
D2311 by @ianwill This is the radial control that appears when we change the size of a brush in sculpt and vertex and texture painting modes, by pressing "f". Also includes a new built-in shader that can be useful in other places. Part of T49043
2016-11-05OpenGL: edge overlay shadersMike Erwin
As seen at #bcon16. These were produced quickly and probably need further work. SIMPLE variant draws triangle mesh edges. Based on this research: http://www2.imm.dtu.dk/pubdb/views/edoc_download.php/4884/pdf/imm4884.pdf http://developer.download.nvidia.com/SDK/10/direct3d/Source/SolidWireframe/Doc/SolidWireframe.pdf Non-SIMPLE variant can adjust thickness per edge. This can be used to draw only some edges, or accentuate some edges. Given the right inputs this is a general n-gon perimeter shader. Part of T49165