Skip to main content

@novorender/api / PointrateProfiler

Class: PointrateProfiler

Defined in: @novorender/src/core3d/benchmark/pointrate.ts:15

A basic GPU point rate profiler.

Constructors​

Constructor​

new PointrateProfiler(benchmark, shaders): PointrateProfiler;

Defined in: @novorender/src/core3d/benchmark/pointrate.ts:23

Parameters​

ParameterTypeDescription
benchmarkBenchmarkThe benchmark context to use.
shaders{ fillrate: { fragmentShader: string; vertexShader: string; }; pointrate: { fragmentShader: string; vertexShader: string; }; }The shader imports.
shaders.fillrate{ fragmentShader: string; vertexShader: string; }-
shaders.fillrate.fragmentShaderstring-
shaders.fillrate.vertexShaderstring-
shaders.pointrate{ fragmentShader: string; vertexShader: string; }-
shaders.pointrate.fragmentShaderstring-
shaders.pointrate.vertexShaderstring-

Returns​

PointrateProfiler

Methods​

measure()​

measure(): Promise<number>;

Defined in: @novorender/src/core3d/benchmark/pointrate.ts:41

Measure fill rate by rendering a series of noisy, semi-transparent point primitives.

Returns​

Promise<number>

Primitive/point rate estimate in primitives/second.

Remarks​

This test is quite inaccurate and does not match close to the nominal primitive/triangle rate of a GPU, particularly on tile based mobile GPUs. Points are being used instead of triangles since they more closely reflect the maximum theoretical primitive rate of most GPUs. The result should only serve as a rough estimate.

Properties​

benchmark​

readonly benchmark: Benchmark;

Defined in: @novorender/src/core3d/benchmark/pointrate.ts:25

The benchmark context.


program​

readonly program: WebGLProgram;

Defined in: @novorender/src/core3d/benchmark/pointrate.ts:16


uniforms​

readonly uniforms: object;

Defined in: @novorender/src/core3d/benchmark/pointrate.ts:17

Index Signature​

[k: string]: null | WebGLUniformLocation