I have a cylindrical camera setup with fog to hide the end of the tube. However, I am trying to make the skybox visible through the alpha map sides of the cylinder. The current issue is that the fog is blocking the visibility and I'm looking for a solution to fix this.
var POS_X = 0,
POS_Y = 0,
POS_Z = 0,
FOV = 60,
WIDTH = window.innerWidth,
HEIGHT = window.innerHeight,
NEAR = 1,
FAR = 120000, //Camera Far Distance
renderer = new THREE.WebGLRenderer({antialias:true}),
............
function addFog(){
scene.fog = new THREE.Fog(0x000000, 100, 40000);
}
............
function addSkybox(){
var materialArray = [],
imgArray = ["skybox_right.jpg", "skybox_left.jpg",
"skybox_front.jpg", "skybox_back.jpg",
"skybox_top.jpg", "skybox_bottom.jpg"];
for (var i = 0; i < 6; i++){
materialArray.push( new THREE.MeshBasicMaterial({
map: loader.load( imgArray[i] ),
side: THREE.BackSide
}));
}
var skyMat = new THREE.MeshFaceMaterial( materialArray ),
skyGeo = new THREE.BoxGeometry( 100000, 100000, 100000, 1, 1, 1),
sky = new THREE.Mesh(skyGeo, skyMat);
sky.name="skybox";
scene.add(sky);
}