Changeset 2191 for trunk/tutorial/04_texture.lolfx
 Timestamp:
 Jan 1, 2013, 8:11:43 PM (8 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/tutorial/04_texture.lolfx
r2190 r2191 32 32 float width = 800.0; 33 33 float height = 600.0; 34 float line_width = 1.8; 35 float dot_size = 2.0; 36 vec4 delta = vec4(1.0 / 128, 0.0, 37 2.0 / 128, 0.0); 34 float texture_width = 512.0; 35 float line_width = 1.2; 36 float dot_size = 1.0; 37 vec4 delta = vec4(1.0 / 512, 0.0, 38 2.0 / 512, 0.0); 38 39 39 40 vec2 p = pass_Position.xy; 40 vec2 tc = vec2(floor(p.x * 128.0) / 128.0, p.y);41 float t = p.x * 128.0  floor(p.x * 128.0);41 vec2 tc = vec2(floor(p.x * 512.0) / 512.0, p.y); 42 float t = p.x * 512.0  floor(p.x * 512.0); 42 43 vec4 c; 43 44 c[0] = texture2D(u_Texture, tc  delta.xy).x; … … 46 47 c[3] = texture2D(u_Texture, tc + delta.zw).x; 47 48 49 /* Find the 4 closest points in screen space */ 48 50 vec2 p0 = vec2((tc.x  delta.x) * width, c[0] * height); 49 51 vec2 p1 = vec2((tc.x ) * width, c[1] * height);
Note: See TracChangeset
for help on using the changeset viewer.