Merge pull request #88633 from dsnopek/opengl-android-fog-fix
Fix OpenGL on Android after adding optional depth fog
This commit is contained in:
commit
16d61427ca
|
@ -1268,7 +1268,7 @@ vec4 fog_process(vec3 vertex) {
|
||||||
float fog_z = smoothstep(scene_data.fog_depth_begin, scene_data.fog_depth_end, length(vertex));
|
float fog_z = smoothstep(scene_data.fog_depth_begin, scene_data.fog_depth_end, length(vertex));
|
||||||
fog_amount = pow(fog_z, scene_data.fog_depth_curve) * scene_data.fog_density;
|
fog_amount = pow(fog_z, scene_data.fog_depth_curve) * scene_data.fog_density;
|
||||||
#else
|
#else
|
||||||
fog_amount = 1 - exp(min(0.0, -length(vertex) * scene_data.fog_density));
|
fog_amount = 1.0 - exp(min(0.0, -length(vertex) * scene_data.fog_density));
|
||||||
#endif // USE_DEPTH_FOG
|
#endif // USE_DEPTH_FOG
|
||||||
|
|
||||||
if (abs(scene_data.fog_height_density) >= 0.0001) {
|
if (abs(scene_data.fog_height_density) >= 0.0001) {
|
||||||
|
|
Loading…
Reference in New Issue