Skip to content
Snippets Groups Projects
Commit 8de33886 authored by Brian Peiris's avatar Brian Peiris
Browse files

minor shader optimization for avatar hands

parent af37c973
No related branches found
No related tags found
No related merge requests found
...@@ -9,13 +9,15 @@ if (hubs_HighlightInteractorOne || hubs_HighlightInteractorTwo) { ...@@ -9,13 +9,15 @@ if (hubs_HighlightInteractorOne || hubs_HighlightInteractorTwo) {
dist2 = distance(hubs_WorldPosition, hubs_InteractorTwoPos); dist2 = distance(hubs_WorldPosition, hubs_InteractorTwoPos);
} }
float size = hubs_SweepParams.t - hubs_SweepParams.s; if (hubs_EnableSweepingEffect) {
float line = mod(hubs_Time / 3000.0 * size, size * 2.0) + hubs_SweepParams.s - size / 2.0; float size = hubs_SweepParams.t - hubs_SweepParams.s;
float line = mod(hubs_Time / 3000.0 * size, size * 2.0) + hubs_SweepParams.s - size / 2.0;
float ratio = 0.0;
if (hubs_EnableSweepingEffect && hubs_WorldPosition.y < line) { float ratio = 0.0;
// Highlight with an sweeping gradient if (hubs_WorldPosition.y < line) {
ratio = max(0.0, 1.0 - (line - hubs_WorldPosition.y) / size * 3.0); // Highlight with an sweeping gradient
ratio = max(0.0, 1.0 - (line - hubs_WorldPosition.y) / size * 3.0);
}
} }
float pulse = sin(hubs_Time / 1000.0) + 1.0; float pulse = sin(hubs_Time / 1000.0) + 1.0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment