Ignore:
Timestamp:
Oct 23, 2012, 1:10:22 AM (8 years ago)
Author:
rez
Message:

neercs: added a protection glass above the monitor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/neercs/video/mirror.lolfx

    r2017 r2039  
    2323
    2424    vec3 c = vec3(0.0);
    25     if(p.x < mirror.x) c += (texture2D(texture, vec2(mirror.x + (mirror.x - p.x) * mirror.w, p.y * (0.8 + 2.0 * p.x) + 0.1 - 1.0 * p.x)).xyz) * (mirror.z / mirror.x * p.x);
    26     if(p.x > 1.0 - mirror.x) c += (texture2D(texture, vec2(- mirror.x - (mirror.x + p.x) * mirror.w, p.y * (0.8 + 2.0 * (1.0 - p.x)) + 0.1 - 1.0 * (1.0 - p.x))).xyz) * (mirror.z / mirror.x * (1.0 - p.x));
    27     if(p.y < mirror.y) c += (texture2D(texture, vec2(p.x * (0.8 + 2.0 * p.y) + 0.1 - 1.0 * p.y, mirror.y + (mirror.y - p.y) * mirror.w)).xyz) * (mirror.z / mirror.y * p.y);
    28     if(p.y > 1.0 - mirror.y) c += (texture2D(texture, vec2(p.x * (0.8 + 2.0 * (1.0 - p.y)) + 0.1 - 1.0 * (1.0 - p.y), - mirror.y - (mirror.y + p.y) * mirror.w)).xyz) * (mirror.z / mirror.y * (1.0 - p.y));
     25    if(p.x < mirror.x) c += texture2D(texture, vec2(mirror.x + (mirror.x - p.x) * mirror.w, p.y * (0.8 + 2.0 * p.x) + 0.1 - 1.0 * p.x)).xyz * (mirror.z / mirror.x * p.x);
     26    if(p.x > 1.0 - mirror.x) c += texture2D(texture, vec2(- mirror.x - (mirror.x + p.x) * mirror.w, p.y * (0.8 + 2.0 * (1.0 - p.x)) + 0.1 - 1.0 * (1.0 - p.x))).xyz * (mirror.z / mirror.x * (1.0 - p.x));
     27    if(p.y < mirror.y) c += texture2D(texture, vec2(p.x * (0.8 + 2.0 * p.y) + 0.1 - 1.0 * p.y, mirror.y + (mirror.y - p.y) * mirror.w)).xyz * (mirror.z / mirror.y * p.y);
     28    if(p.y > 1.0 - mirror.y) c += texture2D(texture, vec2(p.x * (0.8 + 2.0 * (1.0 - p.y)) + 0.1 - 1.0 * (1.0 - p.y), - mirror.y - (mirror.y + p.y) * mirror.w)).xyz * (mirror.z / mirror.y * (1.0 - p.y));
    2929
    3030    gl_FragColor = vec4(s + c, 1.0);
Note: See TracChangeset for help on using the changeset viewer.