-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add color interpolation for highlighted landmarks
- Loading branch information
Showing
6 changed files
with
58 additions
and
56 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,13 @@ | ||
#version 330 core | ||
|
||
in float fIndex; | ||
in vec3 fColor; | ||
|
||
uniform int uUseCommonColor; | ||
uniform vec3 uCommonColor; | ||
|
||
out vec4 color; | ||
|
||
float random(float index) | ||
{ | ||
vec2 seedVector = vec2(index, 133); | ||
|
||
return mod(fract(sin(dot(seedVector.xy, vec2(12.9898, 78.233))) * 43758.5453123), 1.0); | ||
} | ||
|
||
void main() | ||
{ | ||
if (uUseCommonColor == 1) { | ||
color = vec4(uCommonColor, 1); | ||
} else { | ||
color = vec4(random(fIndex), random(fIndex + 7), random(fIndex + 19), 1.0); | ||
} | ||
color = vec4(fColor, 1.0); | ||
} |
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