1 |
with (other) |
2 |
{ |
3 |
surface_set_target(reflection_surf) |
4 |
draw_clear_alpha(c_black, 0) |
5 |
shader_set(sh_reflection) |
6 |
var sprite_uvs = sprite_get_uvs(obj_pl.sprite_index, obj_pl.image_index) |
7 |
shader_uvs = shader_get_uniform(sh_reflection, "spriteUVs") |
8 |
shader_set_uniform_f(shader_uvs, sprite_uvs[0], sprite_uvs[1], sprite_uvs[2], sprite_uvs[3]) |
9 |
var alpha_uniform = shader_get_uniform(sh_reflection, "Alpha") |
10 |
shader_set_uniform_f(alpha_uniform, 0.08) |
11 |
with (obj_pl) |
12 |
{ |
13 |
draw_set_blend_mode_ext(2, 6) |
14 |
draw_sprite_ext(sprite_index, -1, (x - (obj_sans_lake.x - other.sprite_x_offset)), (y + sprite_height * 2 - sprite_yoffset * 2 - (obj_sans_lake.y - other.sprite_y_offset)), 1, -1, 0, c_white, 1) |
15 |
draw_set_blend_mode(0) |
16 |
} |
17 |
shader_reset() |
18 |
draw_set_blend_mode(3) |
19 |
draw_sprite_ext(spr_lake_water_mask, 0, sprite_x_offset, sprite_y_offset, 1, 1, 0, c_white, 1) |
20 |
draw_set_blend_mode(0) |
21 |
surface_reset_target() |
22 |
draw_surface(reflection_surf, (obj_sans_lake.x - sprite_x_offset), (obj_sans_lake.y - sprite_y_offset)) |
23 |
} |