Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/shaders/glsl/terrain_common.fs
Show First 20 Lines • Show All 235 Lines • ▼ Show 20 Lines | #if USE_SPECULAR_MAP && USE_SELF_LIGHT | ||||
color = mix(texdiffuse, color, specular.a); | color = mix(texdiffuse, color, specular.a); | ||||
#endif | #endif | ||||
#if USE_FOG | #if USE_FOG | ||||
color = get_fog(color); | color = get_fog(color); | ||||
#endif | #endif | ||||
float los = texture2D(losTex, v_los).a; | float los = texture2D(losTex, v_los).a; | ||||
los = los < 0.03 ? 0.0 : los; | float oloss = los; | ||||
los += texture2D(losTex, v_los-vec2(0.01, 0.00)).a; | |||||
los += texture2D(losTex, v_los+vec2(0.01, 0.00)).a; | |||||
los += texture2D(losTex, v_los-vec2(0.00, 0.01)).a; | |||||
los += texture2D(losTex, v_los+vec2(0.00, 0.01)).a; | |||||
los = los < 0.03 ? 0.0 : los/5.0 * oloss; | |||||
color *= los; | color *= los; | ||||
#if DECAL | #if DECAL | ||||
color *= shadingColor; | color *= shadingColor; | ||||
#endif | #endif | ||||
gl_FragColor.rgb = color; | gl_FragColor.rgb = color; | ||||
#if USE_GRASS | #if USE_GRASS | ||||
gl_FragColor.a = tex.a; | gl_FragColor.a = tex.a; | ||||
#endif | #endif | ||||
} | } |
Wildfire Games · Phabricator