-
Notifications
You must be signed in to change notification settings - Fork 303
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature(point): option to link OrientedImageMaterial to PointsMaterial.
- Loading branch information
Showing
6 changed files
with
94 additions
and
40 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,30 @@ | ||
precision highp float; | ||
precision highp int; | ||
|
||
#include <itowns/precision_qualifier> | ||
#include <logdepthbuf_pars_fragment> | ||
#if defined(USE_TEXTURES_PROJECTIVE) | ||
#include <itowns/projective_texturing_pars_fragment> | ||
#endif | ||
|
||
varying vec4 vColor; | ||
|
||
uniform bool pickingMode; | ||
void main() { | ||
#include <logdepthbuf_fragment> | ||
// circular point rendering | ||
if(length(gl_PointCoord - 0.5) > 0.5){ | ||
discard; | ||
} | ||
|
||
#if defined(USE_TEXTURES_PROJECTIVE) | ||
vec4 color = vColor; | ||
if (!pickingMode) { | ||
#pragma unroll_loop | ||
for (int i = 0; i < ORIENTED_IMAGES_COUNT; i++) { | ||
color = projectiveTextureColor(projectiveTextureCoords[ ORIENTED_IMAGES_COUNT - 1 - i ], projectiveTextureDistortion[ ORIENTED_IMAGES_COUNT - 1 - i ], projectiveTexture[ ORIENTED_IMAGES_COUNT - 1 - i ], mask[ORIENTED_IMAGES_COUNT - 1 - i], color); | ||
} | ||
gl_FragColor = vec4(color.rgb, color.a * opacity); | ||
} else { | ||
gl_FragColor = color; | ||
} | ||
#else | ||
gl_FragColor = vColor; | ||
|
||
#include <logdepthbuf_fragment> | ||
#endif | ||
} |
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