INNER CODE UNIT · JavaScript

getAlignment

electronicarts/pbmpm · src/buffer_factory.js:280

function getAlignment(type)
{
    switch(type)
    {
        case f32:
        case u32:
            return 1;
        case vec2f:
        case vec2u:
            return 2;
        case vec3f:
            return 4;
        default:
        throw `Unsupported type [${type}]`;
    }
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…