Ignore:
Timestamp:
Nov 19, 2012, 1:45:41 AM (7 years ago)
Author:
sam
Message:

neercs: added a better check for forkpty(), and moved the GL_POINTS
size and texture logic to the vertex shader.

File:
1 edited

Legend:

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

    r1976 r2090  
    1616varying vec2 pass_UV;
    1717
    18 uniform mat4 in_Transform;
     18uniform float u_PointSize;
     19uniform mat4 u_Transform;
    1920
    2021void main()
     
    5758
    5859    // This only works with glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
    59     //gl_PointSize = 40;
     60    gl_PointSize = u_PointSize;
    6061
    61     gl_Position = in_Transform * vec4(in_Position, 0.0, 1.0);
     62    gl_Position = u_Transform * vec4(in_Position, 0.0, 1.0);
    6263}
    6364
     
    7071varying vec2 pass_UV;
    7172
    72 uniform sampler2D in_Texture;
     73uniform sampler2D u_Texture;
    7374
    7475void main(void)
    7576{
    7677    vec2 c = gl_PointCoord * (1.0 / 32.0) + pass_UV;
    77     float t = texture2D(in_Texture, c).x;
     78    float t = texture2D(u_Texture, c).x;
    7879    gl_FragColor = mix(pass_Background, pass_Foreground, t);
    7980}
Note: See TracChangeset for help on using the changeset viewer.