import { BackSide, NoBlending } from '../constants.js';
import { Scene } from '../scenes/Scene.js';
import { Mesh } from '../objects/Mesh.js';
import { BoxBufferGeometry } from '../geometries/BoxGeometry.js';
import { ShaderMaterial } from '../materials/ShaderMaterial.js';
import { cloneUniforms } from './shaders/UniformsUtils.js';
import { WebGLRenderTarget } from './WebGLRenderTarget.js';
import { CubeCamera } from '../cameras/CubeCamera.js';
/**
* @author alteredq / http://alteredqualia.com
* @author WestLangley / http://github.com/WestLangley
*/
function WebGLCubeRenderTarget( size, options, dummy ) {
if ( Number.isInteger( options ) ) {
console.warn( 'THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )' );
options = dummy;
}
WebGLRenderTarget.call( this, size, size, options );
}
WebGLCubeRenderTarget.prototype = Object.create( WebGLRenderTarget.prototype );
WebGLCubeRenderTarget.prototype.constructor = WebGLCubeRenderTarget;
WebGLCubeRenderTarget.prototype.isWebGLCubeRenderTarget = true;
WebGLCubeRenderTarget.prototype.fromEquirectangularTexture = function ( renderer, texture ) {
this.texture.type = texture.type;
this.texture.format = texture.format;
this.texture.encoding = texture.encoding;
var scene = new Scene();
var shader = {
uniforms: {
tEquirect: { value: null },
},
vertexShader: [
"varying vec3 vWorldDirection;",
"vec3 transformDirection( in vec3 dir, in mat4 matrix ) {",
" return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );",
"}",
"void main() {",
" vWorldDirection = transformDirection( position, modelMatrix );",
" #include