-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Create reference implementation for BENTLEY_materials_point_style #13093
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6c71ebc
0432ac5
7b2920c
ada5813
200d086
24025b5
9ebb71b
e3e4ab0
c62fed7
81bfcf3
f93f622
a01e317
0f9f332
bc84e06
551b898
65195bd
80f1717
ce05472
6916fd0
a7ecafa
9d1cb0c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,222 @@ | ||
| { | ||
| "asset": { | ||
| "version": "2.0" | ||
| }, | ||
| "extensionsUsed": [ | ||
| "BENTLEY_materials_point_style" | ||
| ], | ||
| "accessors": [ | ||
| { | ||
| "bufferView": 0, | ||
| "byteOffset": 0, | ||
| "componentType": 5126, | ||
| "count": 4, | ||
| "type": "VEC3", | ||
| "max": [ | ||
| 5.0, | ||
| 5.0, | ||
| 5.0 | ||
| ], | ||
| "min": [ | ||
| -5.0, | ||
| -5.0, | ||
| -5.0 | ||
| ] | ||
| }, | ||
| { | ||
| "bufferView": 1, | ||
| "byteOffset": 0, | ||
| "componentType": 5123, | ||
| "count": 1, | ||
| "type": "SCALAR", | ||
| "max": [ | ||
| 0 | ||
| ], | ||
| "min": [ | ||
| 0 | ||
| ] | ||
| }, | ||
| { | ||
| "bufferView": 1, | ||
| "byteOffset": 4, | ||
| "componentType": 5123, | ||
| "count": 1, | ||
| "type": "SCALAR", | ||
| "max": [ | ||
| 1 | ||
| ], | ||
| "min": [ | ||
| 1 | ||
| ] | ||
| }, | ||
| { | ||
| "bufferView": 1, | ||
| "byteOffset": 8, | ||
| "componentType": 5123, | ||
| "count": 1, | ||
| "type": "SCALAR", | ||
| "max": [ | ||
| 2 | ||
| ], | ||
| "min": [ | ||
| 2 | ||
| ] | ||
| }, | ||
| { | ||
| "bufferView": 1, | ||
| "byteOffset": 12, | ||
| "componentType": 5123, | ||
| "count": 1, | ||
| "type": "SCALAR", | ||
| "max": [ | ||
| 3 | ||
| ], | ||
| "min": [ | ||
| 3 | ||
| ] | ||
| } | ||
| ], | ||
| "buffers": [ | ||
| { | ||
| "byteLength": 64, | ||
| "uri": "data:application/octet-stream;base64,AACgwAAAoMAAAKDAAACgQAAAoMAAAKDAAAAAAAAAoEAAAKDAAAAAAAAAAAAAAKBAAAAAAAEAAAACAAAAAwAAAA==" | ||
| } | ||
| ], | ||
| "bufferViews": [ | ||
| { | ||
| "buffer": 0, | ||
| "byteOffset": 0, | ||
| "byteLength": 48, | ||
| "target": 34962 | ||
| }, | ||
| { | ||
| "buffer": 0, | ||
| "byteOffset": 48, | ||
| "byteLength": 16, | ||
| "target": 34963 | ||
| } | ||
| ], | ||
| "materials": [ | ||
| { | ||
| "name": "Red", | ||
| "pbrMetallicRoughness": { | ||
| "baseColorFactor": [ | ||
| 1.0, | ||
| 0.0, | ||
| 0.0, | ||
| 1.0 | ||
| ], | ||
| "metallicFactor": 0.0 | ||
| }, | ||
| "extensions": { | ||
| "BENTLEY_materials_point_style": { | ||
| "diameter": 5.0 | ||
| } | ||
| } | ||
| }, | ||
| { | ||
| "name": "Green", | ||
| "pbrMetallicRoughness": { | ||
| "baseColorFactor": [ | ||
| 0.0, | ||
| 1.0, | ||
| 0.0, | ||
| 1.0 | ||
| ], | ||
| "metallicFactor": 0.0 | ||
| }, | ||
| "extensions": { | ||
| "BENTLEY_materials_point_style": { | ||
| "diameter": 8.0 | ||
| } | ||
| } | ||
| }, | ||
| { | ||
| "name": "Blue", | ||
| "pbrMetallicRoughness": { | ||
| "baseColorFactor": [ | ||
| 0.0, | ||
| 0.0, | ||
| 1.0, | ||
| 1.0 | ||
| ], | ||
| "metallicFactor": 0.0 | ||
| }, | ||
| "extensions": { | ||
| "BENTLEY_materials_point_style": { | ||
| "diameter": 14.0 | ||
| } | ||
| } | ||
| }, | ||
| { | ||
| "name": "Yellow", | ||
| "pbrMetallicRoughness": { | ||
| "baseColorFactor": [ | ||
| 1.0, | ||
| 1.0, | ||
| 0.0, | ||
| 1.0 | ||
| ], | ||
| "metallicFactor": 0.0 | ||
| }, | ||
| "extensions": { | ||
| "BENTLEY_materials_point_style": { | ||
| "diameter": 10.0 | ||
| } | ||
| } | ||
| } | ||
| ], | ||
| "meshes": [ | ||
| { | ||
| "name": "PointCloud", | ||
| "primitives": [ | ||
| { | ||
| "mode": 0, | ||
| "material": 0, | ||
| "indices": 1, | ||
| "attributes": { | ||
| "POSITION": 0 | ||
| } | ||
| }, | ||
| { | ||
| "mode": 0, | ||
| "material": 1, | ||
| "indices": 2, | ||
| "attributes": { | ||
| "POSITION": 0 | ||
| } | ||
| }, | ||
| { | ||
| "mode": 0, | ||
| "material": 2, | ||
| "indices": 3, | ||
| "attributes": { | ||
| "POSITION": 0 | ||
| } | ||
| }, | ||
| { | ||
| "mode": 0, | ||
| "material": 3, | ||
| "indices": 4, | ||
| "attributes": { | ||
| "POSITION": 0 | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| ], | ||
| "nodes": [ | ||
| { | ||
| "name": "PointCloudNode", | ||
| "mesh": 0 | ||
| } | ||
| ], | ||
| "scenes": [ | ||
| { | ||
| "nodes": [ | ||
| 0 | ||
| ] | ||
| } | ||
| ], | ||
| "scene": 0 | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,6 +29,14 @@ SelectedFeature selectedFeature; | |
|
|
||
| void main() | ||
| { | ||
| #ifdef PRIMITIVE_TYPE_POINTS | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This part turned the default shape of points from squared to circles (see https://sandcastle.cesium.com/?id=3d-tiles-point-cloud-shading )
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @javagl! CC #13217, which @markschlosseratbentley is going to take a look at.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (My fault for missing this during review) |
||
| // Render points as circles | ||
| float distanceToCenter = length(gl_PointCoord - vec2(0.5)); | ||
| if (distanceToCenter > 0.5) { | ||
| discard; | ||
| } | ||
| #endif | ||
|
|
||
| #ifdef HAS_POINT_CLOUD_SHOW_STYLE | ||
| if (v_pointCloudShow == 0.0) | ||
| { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| <style> | ||
| @import url(../templates/bucket.css); | ||
| </style> | ||
| <div id="cesiumContainer" class="fullSize"></div> | ||
| <div id="loadingOverlay"><h1>Loading...</h1></div> | ||
| <div id="toolbar"></div> |
Uh oh!
There was an error while loading. Please reload this page.