ray-tracing-renderer
ray-tracing-renderer copied to clipboard
Why there is no output in display?
I have followed all your steps by using NPM. But there is no output, blank screen. But when I try normal renderer, there is output.
`const renderer = new RayTracingRenderer(); // const renderer = new THREE.WebGLRenderer( { antialias: true } ); renderer.setSize( window.innerWidth, window.innerHeight ); const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera(70, window.innerWidth / window.innerHeight, 0.1, 100); camera.position.z = 10; scene.add( camera );
const amLight = new THREE.AmbientLight("#ffffff");
scene.add( amLight );
const material = new THREE.MeshStandardMaterial();
material.map = new THREE.TextureLoader().load('https://m.media-amazon.com/images/I/8162wgFO8rL._AC_SS350_.jpg');
material.shadowCatcher = true;
const geometry = new THREE.BoxBufferGeometry();
const mesh = new THREE.Mesh(geometry, material);
scene.add( mesh );
// renderer.toneMapping = THREE.Uncharted2ToneMapping; // a low contrast operator
// renderer.toneMappingExposure = 2; // the higher the number, the brighter the scene
// renderer.toneMappingWhitePoint = 8;
this.renderer = renderer;
this.camera = camera;
this.scene = scene;
document.body.appendChild( renderer.domElement );
THREE.DefaultLoadingManager.onLoad = this.tick.bind(this);`
