GPUDepthStencilState constructor

GPUDepthStencilState({
  1. required GPUTextureFormat format,
  2. bool? depthWriteEnabled,
  3. GPUCompareFunction? depthCompare,
  4. GPUStencilFaceState? stencilFront,
  5. GPUStencilFaceState? stencilBack,
  6. int? stencilReadMask,
  7. int? stencilWriteMask,
  8. int? depthBias,
  9. double? depthBiasSlopeScale,
  10. double? depthBiasClamp,
})

Implementation

factory GPUDepthStencilState(
        {required GPUTextureFormat format,
        bool? depthWriteEnabled,
        GPUCompareFunction? depthCompare,
        GPUStencilFaceState? stencilFront,
        GPUStencilFaceState? stencilBack,
        int? stencilReadMask,
        int? stencilWriteMask,
        int? depthBias,
        double? depthBiasSlopeScale,
        double? depthBiasClamp}) =>
    GPUDepthStencilState._(
        format: format.value,
        depthWriteEnabled: depthWriteEnabled ?? false,
        depthCompare: depthCompare?.value ?? GPUCompareFunction.always.value,
        stencilFront: stencilFront ?? undefined,
        stencilBack: stencilBack ?? undefined,
        stencilReadMask: stencilReadMask ?? 0xFFFFFFFF,
        stencilWriteMask: stencilWriteMask ?? 0xFFFFFFFF,
        depthBias: depthBias ?? 0,
        depthBiasSlopeScale: depthBiasSlopeScale ?? 0,
        depthBiasClamp: depthBiasClamp ?? 0);