diff options
Diffstat (limited to 'drivers/gles2/shaders/scene.glsl')
-rw-r--r-- | drivers/gles2/shaders/scene.glsl | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/drivers/gles2/shaders/scene.glsl b/drivers/gles2/shaders/scene.glsl index b720c71cec..d658ccd5cd 100644 --- a/drivers/gles2/shaders/scene.glsl +++ b/drivers/gles2/shaders/scene.glsl @@ -194,7 +194,6 @@ void light_compute( vec3 light_color, vec3 attenuation, float roughness) { - //this makes lights behave closer to linear, but then addition of lights looks bad //better left disabled @@ -249,7 +248,6 @@ void light_compute( diffuse_interp += light_color * diffuse_brdf_NL * attenuation; if (roughness > 0.0) { - // D float specular_brdf_NL = 0.0; @@ -325,7 +323,6 @@ uniform mediump float fog_height_curve; #endif //fog void main() { - highp vec4 vertex = vertex_attrib; mat4 world_matrix = world_transform; @@ -394,7 +391,6 @@ void main() { #else // look up transform from the "pose texture" { - for (int i = 0; i < 4; i++) { ivec2 tex_ofs = ivec2(int(bone_ids[i]) * 3, 0); @@ -512,7 +508,6 @@ VERTEX_SHADER_CODE float normalized_distance = light_length / light_range; if (normalized_distance < 1.0) { - float omni_attenuation = pow(1.0 - normalized_distance, light_attenuation); vec3 attenuation = vec3(omni_attenuation); @@ -532,7 +527,6 @@ VERTEX_SHADER_CODE float normalized_distance = light_length / light_range; if (normalized_distance < 1.0) { - float spot_attenuation = pow(1.0 - normalized_distance, light_attenuation); vec3 spot_dir = light_direction; @@ -541,7 +535,6 @@ VERTEX_SHADER_CODE float angle = dot(-normalize(light_rel_vec), spot_dir); if (angle > spot_cutoff) { - float scos = max(angle, spot_cutoff); float spot_rim = max(0.0001, (1.0 - scos) / (1.0 - spot_cutoff)); @@ -645,7 +638,6 @@ VERTEX_SHADER_CODE #ifdef FOG_DEPTH_ENABLED { - float fog_z = smoothstep(fog_depth_begin, fog_max_distance, length(vertex)); fog_amount = pow(fog_z, fog_depth_curve) * fog_color_base.a; @@ -1157,7 +1149,6 @@ void light_compute( inout vec3 diffuse_light, inout vec3 specular_light, inout float alpha) { - //this makes lights behave closer to linear, but then addition of lights looks bad //better left disabled @@ -1381,7 +1372,6 @@ LIGHT_SHADER_CODE #define SAMPLE_SHADOW_TEXEL_PROJ(p_shadow, p_pos) step(p_pos.z, SHADOW_DEPTH(texture2DProj(p_shadow, p_pos))) float sample_shadow(highp sampler2D shadow, highp vec4 spos) { - #ifdef SHADOW_MODE_PCF_13 spos.xyz /= spos.w; @@ -1458,7 +1448,6 @@ uniform mediump float fog_height_curve; #endif //fog void main() { - #ifdef RENDER_DEPTH_DUAL_PARABOLOID if (dp_clip > 0.0) @@ -1653,7 +1642,6 @@ FRAGMENT_SHADER_CODE // environment BRDF approximation { - #if defined(DIFFUSE_TOON) //simplify for toon, as specular_light *= specular * metallic * albedo * 2.0; @@ -1732,7 +1720,6 @@ FRAGMENT_SHADER_CODE float normalized_distance = light_length / light_range; if (normalized_distance < 1.0) { - float omni_attenuation = pow(1.0 - normalized_distance, light_attenuation); light_att = vec3(omni_attenuation); @@ -1829,7 +1816,6 @@ FRAGMENT_SHADER_CODE } } else { if (depth_z < light_split_offsets.z) { - shadow_att = shadow3; #if defined(LIGHT_USE_PSSM_BLEND) @@ -1838,7 +1824,6 @@ FRAGMENT_SHADER_CODE #endif } else { - shadow_att = shadow4; pssm_fade = smoothstep(light_split_offsets.z, light_split_offsets.w, depth_z); @@ -1881,7 +1866,6 @@ FRAGMENT_SHADER_CODE pssm_blend = smoothstep(0.0, light_split_offsets.x, depth_z); #endif } else { - shadow_att = shadow2; pssm_fade = smoothstep(light_split_offsets.x, light_split_offsets.y, depth_z); #ifdef LIGHT_USE_PSSM_BLEND @@ -1945,7 +1929,6 @@ FRAGMENT_SHADER_CODE } } else { if (depth_z < light_split_offsets.z) { - pssm_coord = shadow_coord3; #if defined(LIGHT_USE_PSSM_BLEND) @@ -1954,7 +1937,6 @@ FRAGMENT_SHADER_CODE #endif } else { - pssm_coord = shadow_coord4; pssm_fade = smoothstep(light_split_offsets.z, light_split_offsets.w, depth_z); @@ -1968,7 +1950,6 @@ FRAGMENT_SHADER_CODE #ifdef LIGHT_USE_PSSM2 if (depth_z < light_split_offsets.x) { - pssm_coord = shadow_coord; #ifdef LIGHT_USE_PSSM_BLEND @@ -1976,7 +1957,6 @@ FRAGMENT_SHADER_CODE pssm_blend = smoothstep(0.0, light_split_offsets.x, depth_z); #endif } else { - pssm_coord = shadow_coord2; pssm_fade = smoothstep(light_split_offsets.x, light_split_offsets.y, depth_z); #ifdef LIGHT_USE_PSSM_BLEND @@ -2165,7 +2145,6 @@ FRAGMENT_SHADER_CODE #ifdef FOG_DEPTH_ENABLED { - float fog_z = smoothstep(fog_depth_begin, fog_max_distance, length(vertex)); fog_amount = pow(fog_z, fog_depth_curve) * fog_color_base.a; |