wire fadeout
[fishladder.git] / fishladder_resources.h
index d1f2210fe8b08d0362a676427627a3372507e7af..b486ec6c93d5ea49a40376242db15e69fc2bff8f 100644 (file)
@@ -419,6 +419,7 @@ SHADER_DEFINE( shader_tile_main,
        "uniform float uForeground;"
        "uniform vec2 uMousePos;"
        "uniform vec4 uColour;"
+   "uniform vec3 uShadowing;"
        ""
        "in vec4 aTexCoords;"
        "in vec2 aWorldCoords;"
@@ -426,15 +427,15 @@ SHADER_DEFINE( shader_tile_main,
        "void main()"
        "{"
                //"vec3 shadowing_colour = vec3( 0.93, 0.88536, 0.8184 ) * 0.97;"
-               "vec3 shadowing_colour = vec3( 0.8, 0.8, 0.8 );"
+               //"vec3 shadowing_colour = vec3( 0.8, 0.8, 0.8 );"
 
                "vec4 glyph = texture( uTexGlyphs, aTexCoords.xy );"
                "vec4 wood = texture( uTexWood, aTexCoords.zw );"
                "vec4 wood_secondary = texture( uTexWood, aTexCoords.zw + 0.25 );"
-               "vec3 wood_comp = mix( wood_secondary.rgb * shadowing_colour, wood.rgb, clamp( glyph.b * 2.0 - 1.0, 0.0, 1.0 ) );"
+               "vec3 wood_comp = mix( wood_secondary.rgb * uShadowing, wood.rgb, clamp( glyph.b*2.0-1.0, 0.0, 1.0 ) );"
                
                //"vec3 shadows = mix( vec3( 0.85, 0.7344, 0.561 ), vec3(1.0,1.0,1.0), glyph.r );"
-               "vec3 shadows = mix( shadowing_colour, vec3(1.0,1.0,1.0), glyph.r );"
+               "vec3 shadows = mix( uShadowing, vec3(1.0,1.0,1.0), glyph.r );"
                
                "vec4 output_regular = vec4( wood_comp * shadows, mix( glyph.a, glyph.b, uForeground ) );"
                
@@ -444,7 +445,8 @@ SHADER_DEFINE( shader_tile_main,
                "FragColor = mix( output_regular, output_ghost, uGhost ) * uColour;"
        "}"
        ,
-       UNIFORMS({ "uPv", "uOffset", "uTexGlyphs", "uTexWood", "uSubTransform", "uGhost", "uMousePos", "uColour", "uForeground", "uVisibility" })
+       UNIFORMS({ "uPv", "uOffset", "uTexGlyphs", "uTexWood", "uSubTransform", "uGhost", "uMousePos", 
+         "uColour", "uForeground", "uVisibility", "uShadowing" })
 )
 
 SHADER_DEFINE( shader_background,