Skip to content

Commit

Permalink
Remove scene.glsl parts that hang linking on Adreno
Browse files Browse the repository at this point in the history
  • Loading branch information
endragor committed Dec 16, 2017
1 parent a5db25b commit 02b12c9
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions drivers/gles3/shaders/scene.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -470,16 +470,16 @@ VERTEX_SHADER_CODE
diffuse_light_interp=vec4(0.0);
specular_light_interp=vec4(0.0);

#ifdef USE_FORWARD_LIGHTING
// #ifdef USE_FORWARD_LIGHTING

for(int i=0;i<omni_light_count;i++) {
light_process_omni(omni_light_indices[i],vertex_interp,-normalize( vertex_interp ),normal_interp,roughness,diffuse_light_interp.rgb,specular_light_interp.rgb);
}
// for(int i=0;i<omni_light_count;i++) {
// light_process_omni(omni_light_indices[i],vertex_interp,-normalize( vertex_interp ),normal_interp,roughness,diffuse_light_interp.rgb,specular_light_interp.rgb);
// }

for(int i=0;i<spot_light_count;i++) {
light_process_spot(spot_light_indices[i],vertex_interp,-normalize( vertex_interp ),normal_interp,roughness,diffuse_light_interp.rgb,specular_light_interp.rgb);
}
#endif
// for(int i=0;i<spot_light_count;i++) {
// light_process_spot(spot_light_indices[i],vertex_interp,-normalize( vertex_interp ),normal_interp,roughness,diffuse_light_interp.rgb,specular_light_interp.rgb);
// }
// #endif

#ifdef USE_LIGHT_DIRECTIONAL

Expand Down Expand Up @@ -2089,22 +2089,22 @@ FRAGMENT_SHADER_CODE

//apply fog

if (fog_depth_enabled) {
// if (fog_depth_enabled) {

float fog_z = smoothstep(fog_depth_begin,z_far,length(vertex));
// float fog_z = smoothstep(fog_depth_begin,z_far,length(vertex));

fog_amount = pow(fog_z,fog_depth_curve);
if (fog_transmit_enabled) {
vec3 total_light = emission + ambient_light + specular_light + diffuse_light;
float transmit = pow(fog_z,fog_transmit_curve);
fog_color = mix(max(total_light,fog_color),fog_color,transmit);
}
}
// fog_amount = pow(fog_z,fog_depth_curve);
// if (fog_transmit_enabled) {
// vec3 total_light = emission + ambient_light + specular_light + diffuse_light;
// float transmit = pow(fog_z,fog_transmit_curve);
// fog_color = mix(max(total_light,fog_color),fog_color,transmit);
// }
// }

if (fog_height_enabled) {
float y = (camera_matrix * vec4(vertex,1.0)).y;
fog_amount = max(fog_amount,pow(smoothstep(fog_height_min,fog_height_max,y),fog_height_curve));
}
// if (fog_height_enabled) {
// float y = (camera_matrix * vec4(vertex,1.0)).y;
// fog_amount = max(fog_amount,pow(smoothstep(fog_height_min,fog_height_max,y),fog_height_curve));
// }

float rev_amount = 1.0 - fog_amount;

Expand Down

0 comments on commit 02b12c9

Please sign in to comment.