Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/shaders/glsl/model_common.fs
Show First 20 Lines • Show All 150 Lines • ▼ Show 20 Lines | #else | ||||
specCol = specularColor; | specCol = specularColor; | ||||
specPow = specularPower; | specPow = specularPower; | ||||
#endif | #endif | ||||
specular.rgb = sunColor * specCol * pow(max(0.0, dot(normalize(normal), v_half)), specPow); | specular.rgb = sunColor * specCol * pow(max(0.0, dot(normalize(normal), v_half)), specPow); | ||||
#endif | #endif | ||||
#if (USE_INSTANCING || USE_GPU_SKINNING) && USE_AO | #if (USE_INSTANCING || USE_GPU_SKINNING) && USE_AO | ||||
float ao = texture2D(aoTex, v_tex2).r; | float ao = texture2D(aoTex, v_tex2).r; | ||||
ao = mix(1.0, ao * 2.0, effectSettings.w); | |||||
#else | #else | ||||
float ao = 1.0; | float ao = 1.0; | ||||
#endif | #endif | ||||
vec3 ambientColor = texdiffuse * ambient * ao; | vec3 ambientColor = texdiffuse * ambient * ao; | ||||
vec3 color = (texdiffuse * sundiffuse + specular.rgb) * getShadow() + ambientColor; | vec3 color = (texdiffuse * sundiffuse + specular.rgb) * getShadow() + ambientColor; | ||||
#if USE_SPECULAR_MAP && USE_SELF_LIGHT | #if USE_SPECULAR_MAP && USE_SELF_LIGHT | ||||
Show All 13 Lines |
Wildfire Games · Phabricator