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
6f1a8739a0
DWM: Fix face center's not working w/ hidden faces
2017-05-08 16:16:28 +10:00
d8bf5c1378
Cleanup: use struct for custom-data offsets
2017-05-08 13:00:44 +10:00
0927748624
Vertex color access for edit-mode
...
Currently not used, adding since legacy drawing can display this.
2017-05-08 13:00:43 +10:00
5221093512
Cleanup: naming
2017-05-06 22:23:59 +10:00
d9949c351d
Pass selection to weight paint vert overlay instead of colors
2017-05-05 18:23:27 +02:00
872d8993dd
Clean up weight/vertex painting code
...
Now passing selection state instead of colors for the wire/face mask
overlay thing. Also added masking indication on the faces in vertex
paint.
2017-05-05 15:53:37 +02:00
ef746be982
Cleanup: include the type of data in function name
...
Was confusing, some functions return vert or triangle data
but naming wasn't very clear.
2017-05-05 06:42:53 +10:00
4bd2429f35
Use mesh draw cache for back-buffer selection
...
Vertex/weight paint now work with core profile, resolves T51380.
2017-05-05 05:17:31 +10:00
9869436b89
Cleanup: use doxy categories
2017-05-05 05:07:52 +10:00
c6800dd65b
Missed last commit
2017-05-05 05:06:57 +10:00
83d43a0e0b
Cleanup: de-duplicate mesh data calculation
2017-05-05 04:56:28 +10:00
3103b819aa
Vertex paint with draw manager
...
Reviewers: fclem
Subscribers: campbellbarton, dfelinto
Differential Revision: https://developer.blender.org/D2658
2017-05-04 20:05:59 +02:00
6ea45da05c
Cleanup: rename ct -> len
...
Also use 'defgroup' instead of 'index' for passing weight arg.
2017-05-04 23:37:03 +10:00
8c2b98ffa5
Cleanup: line length
2017-05-04 03:35:01 +10:00
d96171ab53
Correct struct type (harmless)
2017-05-04 03:17:05 +10:00
20f95de6ba
Weight painting with draw manager
...
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-03 18:57:35 +02:00
19f86a3d5f
Mesh Batch Cache: Add support for uv/vcol/tangent data layers.
...
This is a bad implementation waiting for some improvement that are :
- Gawain support for multiple names. -> will remove duplication of attribute alloc
- Glsl safe name string escaping. -> will remove any risk of hash colision.
Old glsl drawing was relying on attribute being choosen by DerivedMesh at drawing time.
For this reason, we declare all possible attrib "name" for each data layer inside the batches.
In the glsl code, we declare required data by type and name.
Then Gawain only bind vbos if names correspond.
This is way cleaner as we do not need to access the CD itself when drawing.
One other problem is that the hash maybe 11 caracters long and rapidly overload gawain's attrib name buffer.
2017-05-01 18:11:21 +02:00
041a50291b
Eevee: Make default shaders works.
...
- Added New Batch cache routine to get the split mesh for each material. (optimization needed)
- Did some shader modifications to create default_frag and support a somwhat correct fresnel for lamps (to finish)
2017-04-25 18:47:20 +02:00
bfa888cef2
Cleanup: move draw-cache creation from BKE to DRW
...
Creating draw-cache should only ever be used by the draw-manager.
2017-04-21 22:06:06 +10:00