-
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
ef46a9a
commit 1f1b155
Showing
10 changed files
with
154 additions
and
77 deletions.
There are no files selected for viewing
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
33 changes: 33 additions & 0 deletions
33
modules/aggregation-layers/src/grid-layer/grid-layer-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,33 @@ | ||
import {Texture} from '@luma.gl/core'; | ||
import type {ShaderModule} from '@luma.gl/shadertools'; | ||
|
||
const uniformBlock = /* glsl */ `\ | ||
uniform gridUniforms { | ||
vec2 colorDomain; | ||
vec2 elevationDomain; | ||
vec2 elevationRange; | ||
vec2 originCommon; | ||
vec2 sizeCommon; | ||
} grid; | ||
`; | ||
|
||
export type GridProps = { | ||
colorDomain: [number, number]; | ||
colorRange: Texture; | ||
elevationDomain: [number, number]; | ||
elevationRange: [number, number]; | ||
originCommon: [number, number]; | ||
sizeCommon: [number, number]; | ||
}; | ||
|
||
export const gridUniforms = { | ||
name: 'grid', | ||
vs: uniformBlock, | ||
uniformTypes: { | ||
colorDomain: 'vec2<f32>', | ||
elevationDomain: 'vec2<f32>', | ||
elevationRange: 'vec2<f32>', | ||
originCommon: 'vec2<f32>', | ||
sizeCommon: 'vec2<f32>' | ||
} | ||
} as const satisfies ShaderModule<GridProps>; |
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
30 changes: 30 additions & 0 deletions
30
modules/aggregation-layers/src/hexagon-layer/hexagon-layer-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,30 @@ | ||
import {Texture} from '@luma.gl/core'; | ||
import type {ShaderModule} from '@luma.gl/shadertools'; | ||
|
||
const uniformBlock = /* glsl */ `\ | ||
uniform hexagonUniforms { | ||
vec2 colorDomain; | ||
vec2 elevationDomain; | ||
vec2 elevationRange; | ||
vec2 originCommon; | ||
} hexagon; | ||
`; | ||
|
||
export type HexagonProps = { | ||
colorDomain: [number, number]; | ||
colorRange: Texture; | ||
elevationDomain: [number, number]; | ||
elevationRange: [number, number]; | ||
originCommon: [number, number]; | ||
}; | ||
|
||
export const hexagonUniforms = { | ||
name: 'hexagon', | ||
vs: uniformBlock, | ||
uniformTypes: { | ||
colorDomain: 'vec2<f32>', | ||
elevationDomain: 'vec2<f32>', | ||
elevationRange: 'vec2<f32>', | ||
originCommon: 'vec2<f32>' | ||
} | ||
} as const satisfies ShaderModule<HexagonProps>; |
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
27 changes: 27 additions & 0 deletions
27
modules/aggregation-layers/src/screen-grid-layer/screen-grid-layer-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,27 @@ | ||
import {Texture} from '@luma.gl/core'; | ||
import type {ShaderModule} from '@luma.gl/shadertools'; | ||
|
||
const uniformBlock = /* glsl */ `\ | ||
uniform screenGridUniforms { | ||
vec2 cellSizeClipspace; | ||
vec2 gridSizeClipspace; | ||
vec2 colorDomain; | ||
} screenGrid; | ||
`; | ||
|
||
export type ScreenGridProps = { | ||
cellSizeClipspace: [number, number]; | ||
gridSizeClipspace: [number, number]; | ||
colorDomain: [number, number]; | ||
colorRange: Texture; | ||
}; | ||
|
||
export const screenGridUniforms = { | ||
name: 'screenGrid', | ||
vs: uniformBlock, | ||
uniformTypes: { | ||
cellSizeClipspace: 'vec2<f32>', | ||
gridSizeClipspace: 'vec2<f32>', | ||
colorDomain: 'vec2<f32>' | ||
} | ||
} as const satisfies ShaderModule<ScreenGridProps>; |
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
Oops, something went wrong.