Age | Commit message (Collapse) | Author |
|
|
|
Added option to display object's diffuse color multiplied by sculpting
mask. This option could be found in Options panel of toolshelf when in
sculpting mode.
Thanks to Nicholas and Brecht for reviewing the patch!
|
|
* This is another fix for r51118. Was drawing flat-shaded GPU buffers
with VBOs even when VBOs were disabled in the preferences.
|
|
Was a mistake in a code cleanup commit, r51118.
Fixes bug [#32919] Sculting performance regression in svn_51118
projects.blender.org/tracker/?func=detail&aid=32919&group_id=9&atid=498
|
|
Separate vertex copies are now made for flat-shading, such that the
normal is correctly flat-shaded. The element index buffer is not
created in this case.
|
|
* De-duplicate GPU code to check if VBO should be used.
* Add a flag to indicate if the buffer should be drawn smooth or not,
rather than checking each time the node is drawn.
|
|
enables glColorMaterial. Make sure to call gpu_colors_disable even if we don't have a mask layer, to match gpu_colors_enable above
|
|
is a multi-res modifier).
|
|
This changes are not stable enough and trying fix it could backfire in some
other regressions which isn't wanted so much close to the release.
This means objects will have gray color as diffuse which becomes darker in
masked areas for 2.64.
Proper fix is aimed for 2.65.
This commit reverts 50827 and 50898.
|
|
Scaled mask multiplier to 0.25..1.0 instead of 0.0..1.0.
|
|
It was missing since sculpting mask implementation.
Now object's color would be multiplied by sculpt mask value.
For VBOs it's done by storing final color in VertexBufferFormat and
mimic behavior of setMaterial callback for getting current diffuse
color.
For non-VBOs diffuse color is getting from current OpenGL context.
|
|
|
|
Crash was caused by incorrect restoring OpenGL context due to some
weird bit operations used to indicate whether stuff like color arrays
is initialized resulting in some unpredictable results on different
platforms and drivers.
|
|
|
|
|
|
(bevel and array among them) and VBO are enabled.
|
|
|
|
|
|
This is the last commit of the sculpt masking merge. Documentation:
http://wiki.blender.org/index.php/User:Nicholasbishop/PaintMasks
Thanks to Brecht for reviewing!
* For VBO, add color to the VertexBufferFormat structure as three
unsigned bytes. Since mask elements are scalar the three color
components are identical to eachother, but the fixed-function OpenGL
pipeline requires colors to be either three or four components.
* For the same reason, multires VBO drawing now copies into the
VertexBufferFormat format as well.
* Regression: material colors will not show up correctly now, masks
colors are overriding. Not sure how to fix this nicely (would be
much easier to fix if drawing with vertex shaders.)
* Also, masks will only draw PBVH drawing, so only 'solid' drawing
will work correctly with masks.
|
|
|
|
* Changes to DerivedMesh interface: DMGridData has been removed,
getGridData() now returns an array of CCGElem pointers. Also added
getGridKey() to initialize a CCGKey (implemented only by
CCGDerivedMesh.)
* PBVH: added BLI_pbvh_get_grid_key().
* A lot of code is affected, but mainly is just replacing
DMGridData.co, DMGridData.no, and sizeof(DMGridData) with the
CCG_*_elem functions, removing the reliance on grid elements of
exactly six floats.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
else if's
|
|
this layer is now also used for various preview tasks in Object mode.
“Cleanup” commit, no functional changes.
|
|
The VBO index type can be either ushort or uint depending on the grid
size. The comparison was checking how many quads are in the array, but
this was incorrect; the size of the index elements should depend on
the maximum value they reference, i.e. the maximum coord/normal
element.
|
|
Forgot to use return value of function creating the index buffer.
|
|
Also changed show-in-border key to SHIFT+H as suggested by Daniel
Salazar.
|
|
|
|
All multires grids have exactly the same ordering, so rather than
allocate a new index buffer for each PBVH node, just allocate one that
can be reused for every grid.
This requires more draw calls (one per grid rather than one per PBVH
node), but less graphics memory.
|
|
also remove large, duplicate comments from sunsky.h
|
|
There are still fairly bewildering set of callbacks being tossed
around, but it's at least a little less verbose now.
|
|
Previously, the shading and material was set once per PBVHNode when
drawing. This is still the case, but PBVHNodes are now built to
contain only one material and shading mode.
This is done with an extra partitioning step; once the number of
primitives in the node falls below the PBVH leaf limit, it's
primitives are checked for matching materials. If more than one
material or shading mode is present in the node, it is split and
partitioned (partitioned by material rather than 3D location.)
Given a sufficiently 'annoying' input, like a dense mesh with
thousands of materials randomly scattered across it, this could
greatly increase PBVH build time (since nodes might end up containing
a single primitive), but in general this shouldn't come up.
In order to support materials for grids, the CCGDM is building another
grid array (of DMFaceMat structs). This could be used to replace
CCGDM.faceFlag for some small memory savings (TODO).
|
|
This function pointer isn't called anymore, so removing it and the
cddm/ccgdm/gpu code associated with it.
|
|
When set to solid-shading, GPU_update_grid_buffers was calling
normal_quad_v3 to output into a mapped buffer, but normal_quad_v3
reads as well as writes.
This fix actually makes a huge performance difference with my drivers
(Gallium/Radeon).
|
|
|
|
|
|
At the point where GPU_build_mesh_buffers is called, the
face_vert_indices map has already been built; it contains the same
data in an easier-to-access format.
|
|
non-multires meshes.
As with multires, this change calculates face normals rather than
using vertex normals when the node is flat-shaded.
Flat-shading with VBO on non-multires meshes is still wrong, but
fixing that would require larger changes to our vertex buffers.
|
|
Building the mesh buffers already gets the PBVH_UpdateDrawBuffers flag
set, so this was double-updating the vertex buffer.
|
|
Example here, original on left, fixed normals on right:
http://www.pasteall.org/pic/show.php?id=26925
|
|
|
|
|
|
|
|
seems like it might be fixing the recent CDDM_copy corruption/leak bug
|