You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To save memory, let's add this to the primitive's geometry pipeline. Read the paper to see what the best tradeoffs are for us, but this could be as simple as patching our vertex shaders with hemioct_to_float32x3 from Listing 6 and adding float32x3_to_hemioct in Listing 6 to our geometry pipeline as early as possible to minimize memory copies (do not move this into individual geometries though).
Let's do two stages:
Add [options.compressNormals=true] or whatever flag to the Primitive constructor to compress normal, binormal, and tangent (when they are present). Patch the vertex shader.
Since normal attributes will be vec2 now, when present pack normal and st into a vec4. Pack binormal and tangent into a vec4. Patch the vertex shader.
The text was updated successfully, but these errors were encountered:
There's a new JCGT paper: A Survey of Efficient Representations
for Independent Unit Vectors. This is an excellent survey of space/time/quality tradeoffs for compressed normals.
To save memory, let's add this to the primitive's geometry pipeline. Read the paper to see what the best tradeoffs are for us, but this could be as simple as patching our vertex shaders with
hemioct_to_float32x3
from Listing 6 and addingfloat32x3_to_hemioct
in Listing 6 to our geometry pipeline as early as possible to minimize memory copies (do not move this into individual geometries though).Let's do two stages:
[options.compressNormals=true]
or whatever flag to thePrimitive
constructor to compressnormal
,binormal
, andtangent
(when they are present). Patch the vertex shader.vec2
now, when present packnormal
andst
into avec4
. Packbinormal
andtangent
into avec4
. Patch the vertex shader.The text was updated successfully, but these errors were encountered: