Ignore:
Timestamp:
Oct 8, 2012, 12:48:14 AM (8 years ago)
Author:
rez
Message:

neercs - adding mirror sides (left ok, right no yet)

File:
1 edited

Legend:

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

    r1978 r1986  
    2222    vec3 source = texture2D(texture, p).xyz;
    2323
    24     vec3 color = vec3(0.0,0.1,0.0);
     24    vec3 color = vec3(0.0);
     25    if(p.x < mirror.x) color = (texture2D(texture, vec2(mirror.x - (1.0 - mirror.x * mirror.w + p.x * mirror.w), p.y)).xyz) * (mirror.z / mirror.x * p.x);
     26    if(p.x > 1.0 - mirror.x) color = (texture2D(texture, vec2(mirror.x - (1.0 - mirror.x * mirror.w + p.x * mirror.w), p.y)).xyz) * (mirror.z / mirror.x * (1.0 - p.x));
    2527
    26     gl_FragColor = vec4(source+color, 1.0);
     28    gl_FragColor = vec4(source + color, 1.0);
    2729}
Note: See TracChangeset for help on using the changeset viewer.