config: allow clouds in front of terrain
This commit is contained in:
1 parent
0ddaa80643
commit
1e582c1f7f
2 files changed
+7
-1
No files matched your search
Vendored
+2
-1
@@ -1506,6 +1506,7 @@ var CLOUD_NEAR_FADE_START = (typeof CLOUD_NEAR_FADE_CFG.start === 'number') ? Ma
|
||||
var CLOUD_NEAR_FADE_END = Math.max(CLOUD_NEAR_FADE_START + 0.1, (typeof CLOUD_NEAR_FADE_CFG.end === 'number') ? CLOUD_NEAR_FADE_CFG.end : 2.5);
|
||||
var CLOUDS_ON = !(window.CONFIG && window.CONFIG.clouds && window.CONFIG.clouds.enabled === false);
|
||||
var CLOUDS_WAIT_FOR_TERRAIN = !(window.CONFIG && window.CONFIG.clouds && window.CONFIG.clouds.waitForTerrain === false);
|
||||
var CLOUD_TERRAIN_OCCLUSION = !(window.CONFIG && window.CONFIG.clouds && window.CONFIG.clouds.terrainOcclusion === false);
|
||||
function cloudsActive() {
|
||||
return CLOUDS_ON && (!CLOUDS_WAIT_FOR_TERRAIN || (elevTexture && terrainVbo));
|
||||
}
|
||||
@@ -8030,7 +8031,7 @@ window.clouds3dRender = function(target) {
|
||||
gl.activeTexture(gl.TEXTURE7);
|
||||
gl.bindTexture(gl.TEXTURE_2D, terrainDistTex || null);
|
||||
gl.uniform1i(s.uTerrainDistTex, 7);
|
||||
gl.uniform1f(s.uTerrainDistOk, (terrainDistOk && terrainDistTex) ? 1.0 : 0.0);
|
||||
gl.uniform1f(s.uTerrainDistOk, (terrainDistOk && terrainDistTex && CLOUD_TERRAIN_OCCLUSION) ? 1.0 : 0.0);
|
||||
gl.disable(gl.DEPTH_TEST);
|
||||
gl.depthMask(false);
|
||||
gl.enable(gl.BLEND);
|
||||
|
||||
Reference in new issue
Block a user