Class PipelineTriangleRaster

Source
Expand description

PipelineTriangleRaster is a rendering pipeline for drawing rasterized triangles. It uses WebGPU to render triangles based on the provided mesh data.

Constructors§

Source§

new PipelineTriangleRaster(renderer: Renderer): PipelineTriangleRaster

Constructor for PipelineTriangleFlat

Properties§

§protected _cameraBindGroup: GPUBindGroup

Camera bind group

§protected _cameraBindGroupLayout: GPUBindGroupLayout

Camera bind group layout

§protected _cMapTexture: GPUTexture

Color map texture

§protected _colorBuffer: GPUBuffer

Color uniform buffer

§protected _fragModule: GPUShaderModule

Fragment shader module.

§protected _highlightColorBuffer: GPUBuffer

Highlight color uniform buffer

§protected _indicesBuffer: GPUBuffer

Buffer for primitive indices.

§protected _mviewBuffer: GPUBuffer

ModelView matrix uniform buffer

§protected _opacity: GPUBuffer

Opacity uniform buffer

§protected _pipeline: GPURenderPipeline

Render pipeline for drawing triangles.

§protected _positionBuffer: GPUBuffer

Position buffer for vertex data.

§protected _projcBuffer: GPUBuffer

Projection matrix uniform buffer

§protected _rasterBindGroup: GPUBindGroup

Raster bind group

§protected _rasterBindGroupLayout: GPUBindGroupLayout

Raster bind group layout

§protected _rasterBuffer: GPUTexture

Raster uniform buffer

§protected _renderer: Renderer

Renderer reference

§protected _renderInfoBindGroup: GPUBindGroup

Render information bind group

§protected _renderInfoBindGroupLayout: GPUBindGroupLayout

Render information bind group layout

§protected _texCoordBuffer: GPUBuffer

Buffer for primitive indices.

§protected _useColorMap: GPUBuffer

Use color map uniform buffer

§protected _useHighlight: GPUBuffer

Use highlight uniform buffer

§protected _vertModule: GPUShaderModule

Vertex shader module.

Methods§

Source§

build(mesh: RasterLayer): void

Builds the pipeline with the provided mesh data.

Source§

createCameraUniformBindGroup(): void

Creates the camera uniform bind group.

Source§

createColorUniformBindGroup(): void

Creates the color uniform bind group.

Source§

createPipeline(): void

Creates the render pipeline for drawing triangles.

Source§

createRasterUniformBindGroup(raster: RasterLayer): void

Creates the raster uniform bind group.

Source§

createShaders(): void

Creates the vertex and fragment shaders for the pipeline.

Source§

createVertexBuffers(raster: RasterLayer): void

Creates the vertex buffers for the pipeline.

Source§

renderPass(camera: Camera): void

Renders the triangle flat pipeline.

Source§

updateCameraUniforms(camera: Camera): void

Updates the camera uniform buffers with the current camera state.

Source§

updateColorUniforms(layer: Layer): void

Updates the color uniform buffers with the current layer state.

Source§

updateRasterUniforms(raster: RasterLayer): void

Updates the raster uniform buffer with the provided raster data.

Source§

updateVertexBuffers(mesh: RasterLayer): void

Updates the vertex buffers with the provided mesh data.