Skip to content

Commit

Permalink
Merge branch 'transport-function-color-transparency'
Browse files Browse the repository at this point in the history
  • Loading branch information
Torsten Crass committed Sep 16, 2023
2 parents d2a7133 + 8accab4 commit 439fe40
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions addons/godot-xr-tools/materials/teleport.gdshader
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ void vertex() {
// offset our Z so we're projecting from our origin point
VERTEX.z -= 0.5;
VERTEX.z *= length;

// now use that to create our arch
float t = VERTEX.z * scale_t;
float t2 = t * t;

// translate to our world vector
VERTEX = (MODEL_MATRIX * vec4(VERTEX, 1.0)).xyz;
VERTEX = (MODEL_MATRIX * vec4(VERTEX, 1.0)).xyz;

// and now create our arch
VERTEX += down * t2;

// and apply our view matrix
VERTEX = (VIEW_MATRIX * vec4(VERTEX, 1.0)).xyz;
}
Expand All @@ -31,7 +31,7 @@ void fragment() {
float offset = (TIME * 2.0);
vec4 col = texture(arrow_texture, vec2(UV.x, (UV.y * length * 4.0) + offset )).rgba;
ALBEDO = col.rgb * mix_color.rgb;

// need to fix up our image and add an alpha channel
ALPHA = col.a;
ALPHA = min(col.a, mix_color.a);
}

0 comments on commit 439fe40

Please sign in to comment.