-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9a44132
commit afe6c32
Showing
14 changed files
with
256 additions
and
119 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
...aggregation-layers/src/common/aggregator/gpu-aggregator/aggregation-transform-uniforms.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import {NumberArray3, NumberArray4} from '@math.gl/core'; | ||
import {ShaderModule} from '@luma.gl/shadertools'; | ||
import {Texture} from '@luma.gl/core'; | ||
|
||
const uniformBlock = /* glsl */ `\ | ||
uniform aggregatorTransformUniforms { | ||
ivec4 binIdRange; | ||
bvec3 isCount; | ||
bvec3 isMean; | ||
float naN; | ||
} aggregatorTransform; | ||
`; | ||
|
||
export type AggregatorTransformProps = { | ||
binIdRange: NumberArray4; | ||
isCount: NumberArray3; | ||
isMean: NumberArray3; | ||
naN: number; | ||
bins: Texture; | ||
}; | ||
|
||
export const aggregatorTransformUniforms = { | ||
name: 'aggregatorTransform', | ||
vs: uniformBlock, | ||
uniformTypes: { | ||
binIdRange: 'vec4<i32>', | ||
isCount: 'vec3<f32>', | ||
isMean: 'vec3<f32>', | ||
naN: 'f32' | ||
} | ||
} as const satisfies ShaderModule<AggregatorTransformProps>; |
23 changes: 23 additions & 0 deletions
23
modules/aggregation-layers/src/common/aggregator/gpu-aggregator/bin-sorter-uniforms.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import {NumberArray2, NumberArray4} from '@math.gl/core'; | ||
import {ShaderModule} from '@luma.gl/shadertools'; | ||
|
||
const uniformBlock = /* glsl */ `\ | ||
uniform binSorterUniforms { | ||
ivec4 binIdRange; | ||
ivec2 targetSize; | ||
} binSorter; | ||
`; | ||
|
||
export type BinSorterProps = { | ||
binIdRange: NumberArray4; | ||
targetSize: NumberArray2; | ||
}; | ||
|
||
export const binSorterUniforms = { | ||
name: 'binSorter', | ||
vs: uniformBlock, | ||
uniformTypes: { | ||
binIdRange: 'vec4<i32>', | ||
targetSize: 'vec2<i32>' | ||
} | ||
} as const satisfies ShaderModule<BinSorterProps>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
modules/aggregation-layers/src/contour-layer/bin-options-uniforms.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import type {ShaderModule} from '@luma.gl/shadertools'; | ||
|
||
const uniformBlock = /* glsl */ `\ | ||
uniform binOptionsUniforms { | ||
vec2 cellOriginCommon; | ||
vec2 cellSizeCommon; | ||
} binOptions; | ||
`; | ||
|
||
export type BinOptions = { | ||
cellOriginCommon: [number, number]; | ||
cellSizeCommon: [number, number]; | ||
}; | ||
|
||
export const binOptionsUniforms = { | ||
name: 'binOptions', | ||
vs: uniformBlock, | ||
uniformTypes: { | ||
cellOriginCommon: 'vec2<f32>', | ||
cellSizeCommon: 'vec2<f32>' | ||
} | ||
} as const satisfies ShaderModule<BinOptions>; |
Oops, something went wrong.