Page MenuHome

Cycles: Added Float2 attribute type.

Authored by Stefan Werner (swerner) on Feb 26 2019, 8:52 AM.



Float2 are now a new type for attributes in Cycles. Before, the choices
for attribute storage were float and float3, the latter padded to
float4. This meant that UV maps were inflated to twice the size

Diff Detail

rB Blender

Event Timeline

Stefan Werner (swerner) set the repository for this revision to rB Blender.
Stefan Werner (swerner) added a subscriber: Cycles.

This can save quite some memory. For example, the Agent 327 03_01_B shrinks its peak Mem from 10931MB to 10226MB, that is without this patch, Cycles is allocating >700MB of zeroes.

Nice memory reduction.

Some regression tests are failing, related to tangents and OSL. It's best to test (and commit this) in blender2.7 since only that version has fully working regression tests.

Brecht Van Lommel (brecht) requested changes to this revision.Feb 26 2019, 12:33 PM
This revision now requires changes to proceed.Feb 26 2019, 12:33 PM
  • Cycles: Added Float2 attribute type.
  • Cycles: Fixed OSL support of float2 attributes.
  • Cycles: Fixed Tangents with float2 attributes.
Harbormaster completed remote builds in B3050: Diff 14000.

Updated tangent space calculation and OSL attributes to use new float2 attributes.

Once this gets committed, we should notify the cycles-dev mailing list so that third party users of Cycles are aware of this change.

Whitespace fixes, move typedef.

This revision is now accepted and ready to land.Mar 5 2019, 1:55 PM
This revision was automatically updated to reflect the committed changes.