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-09-27Cleanup: remove unused DerivedMesh code.Sebastian Parborg
Differential Revision: https://developer.blender.org/D3736
2018-09-11Followup for previous PBVH commitSergey Sharybin
Didn't realize the index buffer is stored once in a BVH and same pointer is reused. Surprisingly, simple files were fixed with the previous fix. Now disabled the optimization all together, and it was simpler to just completely remove all residue of the code. It is likely to be a different implementation anyway, so no need to try to keep code in a semi-broken state.
2018-08-24Sculpt: Optimize Mask Overlay drawingClément Foucault
* Remove support for diffuse color in the pbvh buffers. * Upload raw data to GPU. * Only draw nodes that have mask data when drawing the overlay. This should fix T56466
2018-07-18GWN: Port to GPU module: Replace GWN prefix by GPUClément Foucault
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-01-15Merge branch 'master' into blender2.8Sergey Sharybin
2018-01-15Sculpting: Sdd an option to hide mask in viewportSergey Sharybin
Brushes themselves are still affected by the mask, but the viewport is not showing the mask. This way it's easier to see details while sculpting. Studio request by Julien Kaspar
2018-01-15GPU buffers: Use bitflag to whether we want to show diffuse colorSergey Sharybin
Those fine-tuning bits will be extended soon, so makes sense to start using some more verbose flag names when calling functions.
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-11Merge branch 'master' into blender2.8Campbell Barton
2017-05-11Cleanup: GPU PBVH namingCampbell Barton
Use GPU_pbvh prefix.
2017-05-11DWM: Use draw manager for sculpt PBVH drawingCampbell Barton
Add a shader-group type to draw generated geometry by running a callback.
2017-03-03OpenGL: draw PBVH bounding box with new imm modeMike Erwin
It wasn't using old immediate mode, but was using - client vertex arrays (obsolete) - quads (obsolete) - state attrib stack (obsolete) - polygon mode (still allowed, but gross)
2016-07-06Cleanup: redundant 4th index in sculpt PBVHCampbell Barton
Since moving to MLoopTri this is no longer needed.
2016-06-22Cleanup: styleCampbell Barton
2016-06-02Fix T47637: Multiple multires objects in Sculpt mode make blender crash.Bastien Montagne
That was a nice and funny hunt, albeit rather time consumming! To summarize, so far code was using a static global gpu_buffer for pbvh vbo drawing of 'grid' types (multires mostly?). There were two issues here: 1) Global gpu buffer was assigned to GPU_PBVH_Buffers->index_buf, but then nearly no check was done when freeing that buffer, to ensure we were not freeing the global one (not totally sure this one was actually causing any issue, but was bad and unsafe anyway). Was solved by adding a flag to GPU_PBVH_Buffers to indicate when we are using some 'common' buffer here, which freeing is handled separately. 2) Main issue: if several multires objects in sculpt mode with different grid size were present simultaneously, the global gpu buffer had to be resized for each object draw (i.e., freed and re-allocated), but then the pbvh nodes from other objects storing freed reference to that global buffer had no way to know that it had been freed, which was causing the segfault & crash. Was solved by getting rid of that global buffer, and instead allocating one 'grid_commmon_gpu_buffer' per pbvh. Told ya baby, globals are *PURE EVIL*!
2016-05-31Properly handle vertex color color space for Cycles GLSLSergey Sharybin
A bit tricky, need to pass additional information about what the attribute is and how to deal with it. BI path stays unchanged, just to make things simplier for now. Fixes T48555: Cycles GLSL- Incorrect Vertex Color results from Attribute node
2015-11-26cleanup: C99 and vertex array commentsMike Erwin
GPU_buffer no longer has a fallback to client vertex arrays, so remove comments about it. Changed a few internal structs/function interfaces to use bool where appropriate. Use for-loop scope and flexible declaration placement. PBVH does the same thing but needs ~150 fewer lines to do it! The change to BLI_ghashIterator_init is admittedly hackish but makes GHASH_ITER_INDEX nicer to use.
2015-11-22Remove vertex array support from GPUBuffers. Remove USER_DISABLE_VBO. AllAntony Riakiotakis
GPUBuffer rendering is now done using vertex buffers. Vertex arrays are completely removed from GL 3.2 core profile, so we'll have to do this change at some point anyway. This commit, though big, is not modifying blender in any way. Use should be exactly as if the vetex buffer option is constantly on.
2015-07-25Convert CCGSubsurf VBO system to also sort hidden and visible faces.Antony Riakiotakis
It's not actually used during drawing though.
2015-07-25GPU Buffers:Antony Riakiotakis
This commit begins implementation of the idea about hidden face separation outlined in http://code.blender.org/2015/06/optimizing-blenders-real-time-mesh- We split hidden and visible faces to different parts of the triangle buffer. Mapped drawing will now skip iterating through hidden polys. Of course the final target, when all derived mesh types use VBO sorting, is to skip checking for hide flag per face completely. All faces will be pre-sorted anyway and we'll be able to draw them with one draw call.
2015-07-25GPU buffer materials:Antony Riakiotakis
Separate and reuse some shared code. Also avoid counting for information we already know, such as total loop triangles etc.
2015-07-23Subsurf: Optimize edge drawing, now it uses VBOs.Antony Riakiotakis
Also the refactor exposed an error where we requested too much memory from the video memory in general for all mesh types. Now we are back to normal :)
2015-07-20Use abstraction to unbind buffers, should avoid crashes in systems thatAntony Riakiotakis
don't support VBOs. Exposed by initialization error in GLEW, which should be fixed seperately.
2015-07-17Fix no longer being possible to display a suzanne with 8 levels ofAntony Riakiotakis
subdivision. Classic integet overflow/size_t substitution case. Machines are getting powerful enough to easily expose these kinds of error now.
2015-07-16Add tessellation data to DerivedMesh (LoopTri)Campbell Barton
This stores loop indices into the loop array giving easier acess to data such as vertex-colors and UV's, removing the need to store an MFace duplicate of custom-data. This doesn't yet move all internal code from MFace to LoopTri just yet. Only applies to: - opengl drawing - sculpting (pbvh) - vertex/weight paint Thanks to @psy-fi for review, fixes and improvements to drawing!
2015-07-16Sculpt draw code:Antony Riakiotakis
Remove legacy code completely, now dyntopo, multires et al even work on GL 1.1 for really hardcore users :p Real purpose here though is to be able to have fast multires drawing even with VBO off, since it requires using indices for vertex buffers. Also made own code elf puke an eaten normal update function which made multires not update normals in solid mode...sorry.
2015-07-15 VBO offscreen selection drawing, cdderivedmeshAntony Riakiotakis
Get rid of legacy drawing, it's only used for selection, in which case we can prepare a temporary color buffer and draw at once. Code is not complete here because we still redundantly set the draw color in the draw function and don't ommit hidden faces automatically. Still it works 100% without immediate mode now.
2015-07-15DerivedMesh: minor changes to callback useCampbell Barton
- use void instead of float for array arg (cast in the switch statement) - remove unused args - use const for poly-mapping and user_data args
2015-07-14Display optimizations part 1.Antony Riakiotakis
This patch changes the way we draw meshes by introducing indexed drawing. This makes it possible to easily upload and rearrange faces ad lib according to any criteria. Currently we use material sorting but textured sorting and hiding will be added to optimize textured drawing and skip per face testing. It also adds support for vertex buffers for subsurf modifiers (Except from GLSL drawing), making drawing of subsurf much faster without need for bogus modifiers. Tests show that we gain approximately 20-25% performance by that for solid mode drawing with up to 50% gains for material drawing. Textured drawing should also have a small performance gain, but more substantial optimizations are possible there. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D1406
2015-07-10Cleanup: use const for gpu bufferCampbell Barton
2015-06-16Optimize drawing of outlines as wellAntony Riakiotakis
2015-06-16Drawing speedup:Antony Riakiotakis
We really don't need to iterate all edges of the mesh every frame to search for loose edges, this calculation can be cached when filling the edge index buffer.
2015-03-28Cleanup: redundant struct declarationsCampbell Barton
2015-03-23cleanup: use spaces for alignmentMike Erwin
while studying GPU lib
2014-11-28Cleanup GPU: get rid of some extremely legacy draw code.Antony Riakiotakis
Basically this commit gets rid of most of the derived mesh immediate mode drawing (cases such as subsurf excluded). Even when VBO is turned off in user preferences, we still use vertex arrays, which are very similar to VBOs but memory is client side. Vertex arrays are OpenGL 1.1 so compatibility is not an issue here. Reviewers: campbellbarton, sergey, jwilkins Differential Revision: https://developer.blender.org/D919
2014-08-27Cleanup: remove _DEBUG define usageCampbell Barton
2014-07-21GSOC 2013 paintAntony Riakiotakis
Yep, at last it's here! There are a few minor issues remaining but development can go on in master after discussion at blender institute. For full list of features see: http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.72/Painting Thanks to Sergey and Campbell for the extensive review and to the countless artists that have given their input and reported issues during development.
2014-05-05Attempt to solve T39950,Antony Riakiotakis
Avoid filling up buffers when total buffer triangles are zero. Better still would be to tag a node as hidden when doing recreation of the PBVH tree by checking for any visible elements. Original bug report probably has to do with OpenGL doing something funky but hidden nodes should be tagged as hidden to completely avoid iterating for painting. This is to be done in a later commit. Also some naming cleanup for consistency, GPU_build_pbvh_mesh_buffers to GPU_build_mesh_pbvh_buffers.
2014-05-01Add PBVH debug display, where we can see the PBVH node bounding boxes.Antony Riakiotakis
To enable enter debug value 14. Leaf nodes are green while container nodes are red.
2014-04-17Code cleanup: use boolsCampbell Barton
also rename BLI_omp_thread_count -> BLI_system_thread_count_omp
2014-04-09Code cleanup: ifdef unused linklist for GPU drawobject'sCampbell Barton
2014-04-08Dyntopo: replace GHash with GSet, saves some memoryCampbell Barton
2014-04-03Fix T39517,Antony Riakiotakis
Issue here is that "show diffuse" option does not respect its intended purpose which is to be used only for masking. There are a couple of caveats here: Dyntopo and multires -always- have mask data enabled, and thus as soon as one goes to dyntopo mode or adds a multires modifier he would get the default grey color instead. Matcaps would break when nodes asked for a diffuse material color (this was broken before too). Solved by adding global material state for when matcaps are enabled. Also matcaps don't always played well with VBOs off. Added a few more missing updates for mask operators to notify show_diffuse property as changed. This was also needed on rebuilding dyntopo pbvh. Also make zero mask color duller again after artist feedback.
2014-04-02Fix T39520, show diffuse not working in dyntopo.Antony Riakiotakis
Was marked as a todo in the code. This does not yet take care of correct display for multi material meshes, since it would need correct separation of faces during pbvh creation. Instead we just take material of first face in node and assume that the rest faces have the same. This will create some funky effects if one attempts to sculpt in this way. Note: This does not yet address T39517
2014-04-01Code cleanup: use bool instead of intSergey Sharybin
2014-04-01Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT defineCampbell Barton
2014-01-03Code clean-up change naming of gpu buffers used by pbvh to betterAntony Riakiotakis
reflect that. Previous name GPU_Buffers was very similar to GPU_Buffer, renamed to GPU_PBVH_Buffers
2013-08-26replace hashes with sets where possible.Campbell Barton
2013-08-09OpenGL VBO's: free VBO pool before redraw, otherwise this just holds onto memoryBrecht Van Lommel
after objects are deleted until another big object is added. There's no good reason to do this, or to think that our pool is somehow much faster than using the OpenGL API to allocate and free buffers.