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-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-03-21Draw manager: Fix missing active camera triangle with CoWSergey Sharybin
2018-03-10DRW: Put all view-only dependant uniform in a UBO.Clément Foucault
This leads to less lookups to the GWNShaderInterface and less uniform upload. We still keep a legacy path so that Builtin uniforms can still work. We might restrict this path to Builtin shader only in the future.
2018-03-02DRW: Refactor simple instancing.Clément Foucault
Instead of creating a new instancing shading group without attrib, we now have instancing calls. The benefits is that they can be culled. They can be used in conjuction with the standard and generate calls but shader must support it (which is generally not the case). We store a pointer to the actual count so that the number can be tweaked between redraw. This will makes multi layer rendering more efficient.
2018-03-02Object Mode: Make use of optimized DRW_shgroup_call_object_addClément Foucault
2018-02-25Object Mode: Display meshes without faces and edges in object mode.Clément Foucault
2018-02-21Gawain: Refactor: VAOs caching AND use new VAOs manager.Clément Foucault
A major bottleneck of current implementation is the call to create_bindings() for basically every drawcalls. This is due to the VAO being tagged dirty when assigning a new shader to the Batch, defeating the purpose of the Batch (reuse it for drawing). Since managing hundreds of batches in DrawManager and DrawCache seems not fun enough to me, I prefered rewritting the batches itself. --- Batch changes --- For this to happen I needed to change the Instancing to be part of the Batch rather than being another batch supplied at drawtime. The Gwn_VertBuffers are copied from the batch to be instanciated and a new Gwn_VertBuffer is supplied for instancing attribs. This mean a VAO can be generated and cached for this instancing case. A Batch can be rendered with instancing, without instancing attribs and without the need for a new VAO using the GWN_batch_draw_range_ex with the force_instance parameter set to true. --- Draw manager changes --- The downside with this approach is that we must track the validity of the instanced batch (the original one). For this the only way (I could think of) is to set a callback for when the batch is getting free. This means a bit of refactor in the DrawManager with the separation of batching and instancing Batches. --- VAO cache --- Each VAO is generated for a given ShaderInterface. This means we can keep it alive as long as the shader interface lives. If a ShaderInterface is discarded, it needs to destroy every VAO associated to it. Otherwise, a new ShaderInterface with the same adress could be generated and reuse the same VAO with incorrect bindings. The VAO cache itself is using a mix between a static array of VAO and a dynamic array if the is not enough space in the static. Using this hybrid approach is a bit more performant than the dynamic array alone. The array will not resize down but empty entries will be filled up again. It's unlikely we get a buffer overflow from this. Resizing could be done on next allocation if needed. --- Results --- Using Cached VAOs means that we are not querying each vertex attrib for each vbo for each drawcall, every redraw! In a CPU limited test scene (10000 cubes in Clay engine) I get a reduction of CPU drawing time from ~20ms to 13ms. The only area that is not caching VAOs is the instancing from particles (see comment DRW_shgroup_instance_batch).
2018-02-16Metalball drawing: rename mball helpers to handlesGermano
and also rename some related functions
2018-02-15Make particle edit draw mode a noopMai Lavelle
Seems this was just a template, but that template painted everything green. Not sure what this draw mode should do really.
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-13Object Mode: remove Scene.obedit in draw managerCampbell Barton
Part of larger change to remove this variable entirely.
2018-02-08Fix mixed weight-paint & pose modeCampbell Barton
2018-02-07Merge branch 'master' into blender2.8Campbell Barton
2018-02-06Object Mode: Add to EvaluationContext & DRWContextStateCampbell Barton
2018-01-30Fix crash drawing light probeCampbell Barton
2018-01-30DRW / Render: Add support for render pipeline in drawmanager.Clément Foucault
For simplicity we choose to execute the rendering of Opengl engines in the main thread and block the interface. This might be addressed in the future at least for video rendering. A drawmanager wrapper (DRW_render_to_image) is called by the render pipeline to set up the Opengl state and then call the specific draw_engine->render_to_image function.
2018-01-29Deduplicate GLSL frag code in particle drawingGermano
Differential Revision: D2993
2018-01-29Refactor object engine data storageSergey Sharybin
Main idea is to make specific engine types be a subclass of generic ObjectEngineData structure. This required following changes: - Have extra size argument to engine data allocation function. Not sure whether there is less error-prone way of doing this. - Add init() callback to engine data allocation function. Additionally, added some extra checks to Eevee's engine data getters, so we do not silently cast lamp data to lightprobe data. Reviewers: dfelinto, fclem Differential Revision: https://developer.blender.org/D3027
2018-01-22DRW: Object Mode: Fix bad camera display in camera viewClément Foucault
This fix T53485 : Ortho cameras display frame when in camera view
2018-01-22DRW: Make the lamp widgets lines stippled.Clément Foucault
2018-01-19Fix T53788: Camera animation not workingSergey Sharybin
Both object level and camera datablock properties animation did not work with copy on write enabled. The root of the issue is going to the fact, that all interface elements are referencing original datablock. For example, View3D has pointer to camera it's using, and all areas which does access v3d->camera should in fact query for the evaluated version of that camera, within the current context. Annoying part of this change is that we now need to pass depsgraph in lots of places. Which is rather annoying. Alternative would be to cache evaluated camera in viewport itself, but then it makes it annoying to keep things in sync. Not sure if there is nicer solution here. Reviewers: dfelinto, campbellbarton, mont29 Subscribers: dragoneex Differential Revision: https://developer.blender.org/D3007
2018-01-17Revert "Fix use-after free in DRW_shader_create_with_lib"Campbell Barton
Caused an error entering edit-mode. d60f26f37a & 2659500835
2018-01-17DRW: Codestyle refactor: Use macro to create shader libs.Clément Foucault
This clears up the code from many DynStr usage. Easier to read.
2018-01-15Fix: Mesh Edit Mode Shader: Correct artifacts that appeared on edges of edit ↵Germano
mode with some AMD GPUs In case the problem appeared with the `AMD Radeon HD 7570M`
2018-01-12Draw Manager: Edit Mode Shader: Remove `#ifdef GPU_INTEL`Germano
The problem with memory alignment on Intel GPUs does not happen anymore after the last shader changes.
2018-01-11Edit Mode Overlay Shaders: remove loose comment left by last commitGermano
2018-01-11Fix error weird sliding vertices appearing in edit mode with some Intel GPUsGermano
Appear when zooming
2018-01-11Fix T51576: Blender crash when change to edit mode with some Intel GPUsGermano
Differential Revision: D2995
2018-01-10Draw Manager: Edit Mode: Curve: uniforms were not being settedGermano
2018-01-10Fix T53748: uniform `globalsBlock` was not being added was not being added ↵Germano
to the shaders of the curves handles
2018-01-09DRW: Make use of DRWInstanceData.Clément Foucault
This modify the selection code quite a bit but it's for the better. When using selection we use the same batching / instancing process but we draw each element at a time using a an offset to the first element we want to draw and by drawing only one element. This result much less memory allocation and better draw time.
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-21Implement duplicator viewport/render visibility optionsDalai Felinto
This allows a duplicator (as known as dupli parent) to be in a visible collection so its duplicated objects are visible, however while being invisible for the final render. An object that is a particle emitter is also considered a duplicator. Many thanks for the reviewers for the extense feedback. Reviewers: sergey, campbellbarton Differential Revision: https://developer.blender.org/D2966
2017-12-15Group collection viewport/render options and remove collection visibilityDalai Felinto
Users can change the group collection visibility in the outliner when looking at groups. Regular collections on the other hand don't have any special visibility control, if you need a collection to be invisible during render, either don't link it into the view layer used for F12, or disable it. This includes: * Updated unittests - update your lib/tests/layers folder. * Subversion bump - branches be aware of that. Note: Although we are using eval_ctx to determine the visibility of a group collection when rendering, the depsgraph is still using the same depsgraph for the viewport and the render engine, so at the moment the render visibility is ignored. Following next is a workaround for this separately to tag the groups before and after rendering to tackle that.
2017-12-14Draw Manager: Edit Curve Mode: Fix "Not freed memory blocks"Germano
`e_data.overlay_vert_sh` was not being freed when quitting blender.
2017-11-29Draw manager: Cleanup, namingSergey Sharybin
Similar to previous commit in Eevee.
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-14Cleanup: remove BLI_blenlib from ghash headerCampbell Barton
This causes source files to depend on ghash header for BLI_string/rect/listbase. Also quiet warnings.
2017-11-09Rename Scene macros back to their original _NEW less namesDalai Felinto
2017-11-09Cleanup: Use full name for scene_layer in drawSergey Sharybin
2017-11-06Merge branch 'master' into blender2.8Bastien Montagne
Conflicts: intern/cycles/device/device.cpp source/blender/blenkernel/intern/library.c source/blender/blenkernel/intern/material.c source/blender/editors/object/object_add.c source/blender/editors/object/object_relations.c source/blender/editors/space_outliner/outliner_draw.c source/blender/editors/space_outliner/outliner_edit.c source/blender/editors/space_view3d/drawobject.c source/blender/editors/util/ed_util.c source/blender/windowmanager/intern/wm_files_link.c
2017-10-30Draw Manager: re-enable edit-mesh text overlaymano-wii
2017-10-12Object Mode: Grid: Add a non-hard depth test.Clément Foucault
This adds a custom depth test that have the benefits to glitch less and be more visually pleasing. Downside is that it let the grid pass trough the objects a little. This effect is done in NDC space so that it counteract the logarithmic depth distribution imprecision (read as it's less visible near the camera but more present far away). This patch also includes some cleanups.
2017-10-07Cleanup: style, duplicate includesCampbell Barton
2017-10-03Object Mode : Fix probe paralax display.Clément Foucault
2017-10-01Compile fixes for MSVC:Andrea Weikert
* missing include for uint typedef * macro syntax error Reviewers: campbellbarton, fclem Reviewed By: fclem Differential Revision: https://developer.blender.org/D2863
2017-09-30Object Mode : Add probes data outlines and selectabilityClément Foucault
This required some small changes to the data display shaders so that they match the way the object mode renders them. Strangely enough, I had to remove the normal attribute from the display code because it was being not bound as soon as I created another rendering call in object mode. The problem may be deeper but I did not have time for this so I derive the normal from the sphere pos.
2017-09-27Object Mode Engine: Small cleanupClément Foucault