transparent static method

int transparent({
  1. required int phase,
  2. required int depth,
  3. required int pipeline,
  4. required int material,
  5. required int mesh,
})

A key for a transparent draw, back to front: pass depth with far small and near large (maxDepth - nearFirstBucket).

Implementation

static int transparent({
  required int phase,
  required int depth,
  required int pipeline,
  required int material,
  required int mesh,
}) {
  _check(phase, maxPhase, 'phase');
  _check(depth, maxDepth, 'depth');
  _check(pipeline, maxPipeline, 'pipeline');
  _check(material, maxMaterial, 'material');
  _check(mesh, maxMesh, 'mesh');
  return phase * _p48 +
      depth * _p40 +
      pipeline * _p28 +
      material * _p12 +
      mesh;
}