Class PipelineBuildingSSAO

Source
Expand description

PipelineBuildingSSAO is a rendering pipeline for drawing 3D buildings with SSAO (Screen Space Ambient Occlusion). It uses WebGPU to render the buildings in two passes: one for normal and color maps, and another for SSAO computation.

Constructors§

Source§

new PipelineBuildingSSAO(renderer: Renderer): PipelineBuildingSSAO

Constructor for PipelineBuildingSSAO

Properties§

Source§

protected _cameraBindGroup: GPUBindGroup

Camera bind group

Source§

protected _cameraBindGroupLayout: GPUBindGroupLayout

Camera bind group layout

Source§

protected _cMapTexture: GPUTexture

Color map texture

Source§

protected _colorBuffer: GPUBuffer

Color uniform buffer

Source§

protected _colorsSharedBuffer: GPURenderPassColorAttachment

Shared color buffer for the first pass.

Source§

protected _depthBufferPass01: GPURenderPassDepthStencilAttachment

Depth buffer for the first pass.

Source§

protected _fragModule01: GPUShaderModule

Fragment shader module for the first pass.

Source§

protected _fragModule02: GPUShaderModule

Fragment shader module for the second pass.

Source§

protected _highlightColorBuffer: GPUBuffer

Highlight color uniform buffer

Source§

protected _highlightedBuffer: GPUBuffer

Highlighted buffer for vertex data.

Source§

protected _indicesBuffer: GPUBuffer

Indices buffer for vertex data.

Source§

protected _mviewBuffer: GPUBuffer

ModelView matrix uniform buffer

Source§

protected _normalBuffer: GPUBuffer

Normal buffer for vertex data.

Source§

protected _normalsSharedBuffer: GPURenderPassColorAttachment

Shared normal buffer for the first pass.

Source§

protected _opacity: GPUBuffer

Opacity uniform buffer

Source§

protected _pipeline01: GPURenderPipeline

Render pipeline for the first pass.

Source§

protected _pipeline02: GPURenderPipeline

Render pipeline for the second pass.

Source§

protected _positionBuffer: GPUBuffer

Position buffer for vertex data.

Source§

protected _projcBuffer: GPUBuffer

Projection matrix uniform buffer

Source§

protected _renderer: Renderer

Renderer reference

Source§

protected _renderInfoBindGroup: GPUBindGroup

Render information bind group

Source§

protected _renderInfoBindGroupLayout: GPUBindGroupLayout

Render information bind group layout

Source§

protected _skippedBuffer: GPUBuffer

Highlighted buffer for vertex data.

Source§

protected _texturesPass02BindGroup: GPUBindGroup

Bind group for colors.

Source§

protected _texturesPass02BindGroupLayout: GPUBindGroupLayout

Bind group layout for textures in the second pass.

Source§

protected _thematicBuffer: GPUBuffer

Thematic buffer for vertex data.

Source§

protected _useColorMap: GPUBuffer

Use color map uniform buffer

Source§

protected _useHighlight: GPUBuffer

Use highlight uniform buffer

Source§

protected _vertModule01: GPUShaderModule

Vertex shader module for the first pass.

Source§

protected _vertModule02: GPUShaderModule

Vertex shader module for the second pass.

Methods§

Source§

build(mesh: Triangles3DLayer): 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§

createDepthBufferPass01(): void

Creates the depth buffer for the first pass.

Source§

createPipeline01(): void

Creates the first render pipeline for the SSAO pass.

Source§

createPipeline02(): void

Creates the second render pipeline for the SSAO pass.

Source§

createShaders(): void

Creates the vertex and fragment shaders for the pipeline.

Source§

createSharedTextures(): void

Creates the shared textures for the pipeline.

Source§

createTexturesBindGroupPass02(): void

Source§

createVertexBuffers(mesh: Triangles3DLayer): void

Creates the vertex buffers for the mesh data.

Source§

pass01(camera: Camera): void

Renders the first pass of the SSAO pipeline.

Source§

pass02(): void

Renders the second pass of the SSAO pipeline.

Source§

renderPass(camera: Camera): void

Creates the shaders for the 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§

updateVertexBuffers(mesh: Triangles3DLayer): void

Updates the vertex buffers with the provided mesh data.