FaceRasterizer¶
Under Construction
This documentation is auto-generated, and is a work in progress. Please see the source code at https://github.com/phetsims/alpenglow/blob/main/js/webgpu/FaceRasterizer.ts for the most up-to-date information.
Overview¶
Class FaceRasterizer¶
Constructor¶
new FaceRasterizer( providedOptions : FaceRasterizerOptions )¶
Instance Methods¶
getCanvasContext( canvas : HTMLCanvasElement, colorSpace : 'srgb' | 'display-p3' ) : GPUCanvasContext¶
runRenderProgram( program : RenderProgram, providedRunOptions : StrictOmit<FaceRasterizerRunOptions, 'renderableFaces'>, rasterizeOptions? : RasterizationOptions ) : Promise<void>¶
run( providedOptions : FaceRasterizerRunOptions ) : Promise<void>¶
dispose()¶
Type FaceRasterizerExecutionInfo¶
- config: TwoPassConfig
- numTiles: number
- numBins: number
- initialRenderableFaces: TwoPassInitialRenderableFace[]
- initialEdges: LinearEdge[]
- renderProgramInstructions: number[]
- textureBlit: [ GPUTextureView, GPUTextureView ] | null
Type FaceRasterizerOptions¶
TODO: doc
@author Jonathan Olson <jonathan.olson@colorado.edu>
- deviceContext: DeviceContext
- supportsGridFiltering?: boolean
- supportsBilinear?: boolean
- supportsMitchellNetravali?: boolean
- maxRenderableFaces?: number
TODO: add limits support for everything nested - maxInitialEdges?: number
- maxRenderProgramInstructions?: number
- maxCoarseRenderableFaces?: number
- maxCoarseEdges?: number
- maxFineFaces?: number
- maxFineEdges?: number
- maxBins?: number
Type FaceRasterizerRunOptions¶
- renderableFaces: RenderableFace[]
TODO: ideally run with no tile size (large!) - canvasContext: GPUCanvasContext
- rasterWidth: number
- rasterHeight: number
- colorSpace?: "srgb" | "display-p3"
- filterType?: PolygonFilterType
- filterScale?: number
Source Code¶
See the source for FaceRasterizer.ts in the alpenglow repository.