Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_reflection_shader_snowdin_04_Draw_0

(view raw script w/o annotations or w/e)
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 - (__view_get((0 << 0), 0))), (y + sprite_height * 2 - sprite_yoffset * 2 - (__view_get((1 << 0), 0))), 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_snowdin_04_reflection_mask, 0, (-(__view_get((0 << 0), 0))), (-(__view_get((1 << 0), 0))), 4, 4, 0, c_white, 1)
20
    draw_set_blend_mode(0)
21
    surface_reset_target()
22
    draw_surface(reflection_surf, __view_get((0 << 0), 0), __view_get((1 << 0), 0))
23
}