10c887762a
DwM: no need to calculate face normal
2017-06-29 15:52:08 +10:00
abd9d50faa
Cleanup: quiet negative shift warning
2017-06-29 15:34:50 +10:00
f6bb3262f1
DwM: add CD_AUTO_FROM_NAME for mesh conversion
2017-06-29 15:23:47 +10:00
4a061a87e6
DwM: mesh data now only creates data thats used
...
Read from the GPUMaterial to find custom-data layers used for drawing.
This resolves problem where having UV's would always calculate tangents
causing noticeable slow down compared to 2.7x.
2017-06-28 13:44:28 +10:00
fc3d0da2fd
DWM: Fix own error checking wrong layer type
...
Would calculate all tangents for every UV layer.
2017-06-28 11:39:05 +10:00
df70e3de63
DWM: separate tangents from UV conversion
...
Prepare for different number of UV/Tangent layers.
2017-06-28 09:55:40 +10:00
bafb904807
Fix T51559: Update draw cache when changing flat/smooth shading
...
This also renames some flags/variables to be more generic for updating
purposes. The call used here was previously only used for updating
paint data, but as it was reused here, flags and variables were renamed
to accomodate more clearly to the new usages.
2017-06-26 14:52:59 +02:00
b4d053efc7
Gawain API naming refactor
...
Use consistent prefix for gawain API names as well as
some abbreviations to avoid over-long names, see: D2678
2017-06-19 20:18:04 +10:00
f8ea2c92db
Suppress assert for meshes with no faces
2017-06-02 16:42:39 +10:00
a5783d08f9
Resolve assert in weight paint mode w/ no weights
2017-06-01 13:37:18 +10:00
390648b984
DwM: Show wire only mesh objects
2017-06-01 02:26:24 +10:00
214c42157a
Only calc split normals when auto-smooth is enabled
...
This matches cycles & derived-mesh
2017-05-25 02:31:39 +10:00
154ff1afde
Fix/Workaround T51561: Disable split normals
2017-05-25 01:40:15 +10:00
707340edd7
Cleanup: minor de-duplicate from last commit
2017-05-24 22:54:19 +10:00
429f6bee28
Fix T51561: Normal maps fail w/ quad + eevee
...
Generalize derived-mesh tangent calculation so
it can be used by Batch cache creation too.
2017-05-24 22:39:50 +10:00
3c92e6b8f0
Cleanup: bmesh var naming
2017-05-24 13:33:48 +10:00
c9d890585b
DwM: avoid indirect edit-mesh conversion
...
Storing edit-mesh data as indices for passing
only to get back edit-mesh data.
This also complicated checks for real edges in tessellation tris.
Simpler to pass data directly.
2017-05-24 13:27:11 +10:00
b2dc54ffe5
Stupid mistake in material access optimization
2017-05-23 21:52:18 +10:00
96f7b08aec
DwM: optimize material access
...
- Split BMesh/Mesh loops.
- Loop over faces instead of tris.
- Add out-of-bounds check for material index (rare but can happen).
2017-05-23 18:26:16 +10:00
611779ca96
Cleanup: use more generic naming
...
Can be used by any user that needs faces split by materials.
2017-05-23 17:48:05 +10:00
f21c235c6f
DwM: texture paint support & mask mode
...
Uses workaround so material slots are used when neither blender-internal
or cycles are enabled.
2017-05-23 17:40:48 +10:00
9efd3a3f63
Cleanup: move custom-data layers into a struct
...
Changed because the values co-exist with active layers
(Mesh.mloopuv, Mesh.mloopcol).
2017-05-22 17:25:31 +10:00
02cc4d8cec
Cleanup: line length
2017-05-22 16:25:27 +10:00
e98652b64f
Cleanup: minor edits
2017-05-22 16:21:44 +10:00
68d8618538
Gawain: promote 10_10_10 to first-class vertex format
...
This format is part of OpenGL 3.3, and one of the reasons for choosing 3.3 over 3.2.
Instead of checking #if USE_10_10_10 just use it wherever needed.
2017-05-21 15:59:34 -04:00
07dd208209
Cleanup: warnings
2017-05-21 09:39:31 +10:00
242a044bd1
GPUMaterial: Add support for tangent node.
2017-05-18 16:05:03 +02:00
c75cde31db
Re-use vertex position VBO in weight-paint mode
2017-05-18 14:53:43 +10:00
Dalai Felinto
60cd996c0a
Silence warnings in Mac (based on buildbot build report)
2017-05-17 18:13:10 +02:00
c104b7b0b3
DWM: reuse position VBO for vpaint select overlay
2017-05-17 19:21:16 +10:00
a769c4a3a0
Fix weight-painting out of facemask mode w/ hidden faces
...
Own error in recent commit
2017-05-17 19:08:09 +10:00
fabd55a5e9
DWM: hide hidden verts in weight-paint mode
2017-05-17 18:09:40 +10:00
e74177d3b1
Correct own error in copying vertex color to VBO's
2017-05-17 17:14:10 +10:00
3926e3ef68
DWM: correct unselected face overlay
2017-05-17 16:41:21 +10:00
741a4cfc0b
DWM: Initial support vert & weight hidden faces
2017-05-17 16:01:18 +10:00
5bfeaf6cc1
Cleanup: group VBO attributes in a struct
...
Some names are a bit arbitrary,
this makes it clear which names are VBO attributes.
2017-05-17 12:36:02 +10:00
3d6361aa9c
Cleanup: clarify select terminology
...
In mesh cache we have select: color, id, bool.
Current naming didn't make this clear.
2017-05-17 11:47:31 +10:00
89483c73fd
DWM: write mesh data to the VBO directly
...
Was using intermediate functions to store each data type.
This is still done in some places (for more involved access).
For basic data: coords, normals, colors..etc this is unnecessarily indirect.
2017-05-17 11:34:42 +10:00
a8aebc8dd1
Fix memory leak with mesh cache (w/ select invalidate)
2017-05-16 14:55:29 +10:00
d05d73ae75
Fix memory leak with mesh cache (missed last commit)
2017-05-16 13:06:23 +10:00
5a90542d3d
Fix memory leak with mesh cache
2017-05-16 11:45:23 +10:00
77d0aec3d1
Mesh Batch Cache: Use compressed format.
...
We don't compress UV by default because that would mean restricting them to [0, 1]
Leaving all other code for later settings switch.
2017-05-15 17:55:36 +02:00
e053fade99
Mesh Batch Cache: get rid of the ORCO VBO data, and reconstruct it in shader.
...
With only one MADD instruction we recover the orco data and reduce both the storage and the fetching cost of an attrib layer.
2017-05-15 16:14:18 +02:00
38125d0499
Mesh Batch Cache: Define Compressed format for shading data.
...
Deactivated by default.
All shading attribs can be packed to take less VRAM at the cost of precision (not noticable in this case).
UVs can be packed into I16 but that limits their positions into the [-1, +1] range.
This could be a setting option in the future.
2017-05-15 16:14:17 +02:00
f83a244749
Mesh Batch Cache: Optimization, make use of gawain attrib aliases.
2017-05-15 16:14:17 +02:00
5a377521aa
Mesh Batch Cache: Split Edit Mesh mode Vertex Buffers for faster update.
2017-05-15 16:14:17 +02:00
f7ce1be694
DWM: share positions & normals in shading VBO.
2017-05-09 10:56:22 +10:00
e35e23c72c
Cleanup: rename layer-names -> layer-uuid
...
These names are created from a hash,
don't confuse with actual layer names.
2017-05-09 10:38:52 +10:00
faba1e7d6e
DWM: Tangent support for editmesh
2017-05-09 10:26:36 +10:00
0dd766b043
DWM: Share VBO positions & normals for mesh cache
...
Select, weight & color cache included redundant position and normals.
Use multiple VBO's per batch for more efficient storage.
2017-05-08 17:39:41 +10:00