Changeset 2458


Ignore:
Timestamp:
Feb 20, 2013, 12:51:38 PM (6 years ago)
Author:
sam
Message:

gpu: fix GLSL ES syntax errors in various shaders.

Location:
trunk/src/easymesh
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/easymesh/shinydebugUV.lolfx

    r2408 r2458  
    5454    if (mode == 0.0)
    5555    {
    56         gl_FragColor = vec4(mod(pass_TexCoord.x, 1.0f),
     56        gl_FragColor = vec4(mod(pass_TexCoord.x, 1.0),
    5757                            0.1,
    5858                            mod(pass_TexCoord.y, 1.0), 1.0);
     
    6060    else
    6161    {
    62         float col = ((mod(mode, 2.0) == 1)?(mod(pass_TexCoord.x, 1.0)):(mod(pass_TexCoord.y, 1.0)));
    63         if (mode == 1 || mode == 2)
     62        float col = ((mod(mode, 2.0) == 1.0)?(mod(pass_TexCoord.x, 1.0)):(mod(pass_TexCoord.y, 1.0)));
     63        if (mode == 1.0 || mode == 2.0)
    6464        {
    6565            if (col > 1.0/3.0) gl_FragColor.r = 0.0;
     
    6969            gl_FragColor.b = min(max(col, 2.0/3.0) - 2.0/3.0, 1.0/3.0);
    7070        }
    71         else if (mode == 3 || mode == 4)
     71        else if (mode == 3.0 || mode == 4.0)
    7272        {
    7373            if (col > 0.5) gl_FragColor.r = 0.0;
     
    7676            gl_FragColor.b = 0.1;
    7777        }
    78         else if (mode == 5 || mode == 6)
     78        else if (mode == 5.0 || mode == 6.0)
    7979        {
    8080            gl_FragColor.r = col;
  • trunk/src/easymesh/shinydebugnormal.lolfx

    r2370 r2458  
    4848{
    4949    vec3 real_color = vec3(0.0, 0.0, 0.0);
    50     real_color += abs(pass_TNormal.x) * ((pass_TNormal.x < .0f)?(vec3(0.0, 1.0, 1.0)):(vec3(1.0, 0.0, 0.0)));
    51     real_color += abs(pass_TNormal.y) * ((pass_TNormal.y < .0f)?(vec3(1.0, 0.0, 1.0)):(vec3(0.0, 1.0, 0.0)));
    52     real_color += abs(pass_TNormal.z) * ((pass_TNormal.z < .0f)?(vec3(1.0, 1.0, 0.0)):(vec3(0.0, 0.0, 1.0)));
     50    real_color += abs(pass_TNormal.x) * ((pass_TNormal.x < 0.0)?(vec3(0.0, 1.0, 1.0)):(vec3(1.0, 0.0, 0.0)));
     51    real_color += abs(pass_TNormal.y) * ((pass_TNormal.y < 0.0)?(vec3(1.0, 0.0, 1.0)):(vec3(0.0, 1.0, 0.0)));
     52    real_color += abs(pass_TNormal.z) * ((pass_TNormal.z < 0.0)?(vec3(1.0, 1.0, 0.0)):(vec3(0.0, 0.0, 1.0)));
    5353    gl_FragColor = vec4(real_color, pass_Color.w);
    5454}
Note: See TracChangeset for help on using the changeset viewer.