Page MenuHome

Remove normalization from original coordinate attribute (CD_ORCO)
Confirmed, NormalPublicTO DO

Description

From T95776:

The internal CD_ORCO attribute is normalized to 0..1 which is not really helpful, not even as default texture coordinates. It would be good to do some refactoring so these are stored unnormalized and then applying any additional texture space scaling for rendering only.

Event Timeline

Hans Goudey (HooglyBoogly) changed the task status from Needs Triage to Confirmed.Feb 21 2022, 7:30 PM
Hans Goudey (HooglyBoogly) created this task.

I have a set of patches to do this an more refactoring of CD_ORCO, from a while ago. However it is incomplete, in particular for this normalization it's not obvious how to ensure the auto texture space is computed matching CD_ORCO, which you get automatically when it's baked into them. Probably computing it at the same time as CD_ORCO is added is fine?

This whole thing is already a bit broken as CD_ORCO is often not computed in the 3D viewport and only for rendering, since the depsgraph does not take into account the 3D viewport shading mode.

Patchset that applies on latest master here, in case anyone wants to take over: P2807