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.
This commit is contained in:
2017-05-15 16:12:51 +02:00
parent ae9da3786a
commit e053fade99
8 changed files with 86 additions and 54 deletions

View File

@@ -658,6 +658,14 @@ MINLINE void invert_v2(float r[2])
r[1] = 1.0f / r[1];
}
MINLINE void invert_v3(float r[3])
{
BLI_assert(!ELEM(0.0f, r[0], r[1], r[2]));
r[0] = 1.0f / r[0];
r[1] = 1.0f / r[1];
r[2] = 1.0f / r[2];
}
MINLINE void abs_v2(float r[2])
{
r[0] = fabsf(r[0]);