Changeset 1472


Ignore:
Timestamp:
Jun 14, 2012, 2:31:07 PM (8 years ago)
Author:
sam
Message:

neercs: fix mismatched signed/unsigned operations.

File:
1 edited

Legend:

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

    r1469 r1472  
    2121void main()
    2222{
    23     float u = float((in_Char >> 17) & 0xfu) / 32.0 + 0.0;
     23    float u = float((in_Char >> 17u) & 0xfu) / 32.0 + 0.0;
    2424// bits
    2525// 1: 0 // 2: 0 // 4: 0 // 8: 0
     
    3131// 20: bit 3
    3232//float u = float(in_Char & 2097152u) / 2097152.0 / 32.0;
    33     float v = float((in_Char >> 21) & 0xfu) / 32.0 + 0.5;
     33    float v = float((in_Char >> 21u) & 0xfu) / 32.0 + 0.5;
    3434    //float v = float(2) / 32.0 + 0.5;
    3535    //float ch = in_Char * 255.0;
     
    7575    float t = texture2D(in_Texture, c).x;
    7676    gl_FragColor = mix(pass_Background, pass_Foreground, t);
     77gl_FragColor = vec4(1.0, 1.0, 0.0, 1.0);
    7778}
    7879
Note: See TracChangeset for help on using the changeset viewer.