Forráskód Böngészése

Merge pull request #13730 from takahirox/FixCinematicCamera

Fix cinematic camera example
Mr.doob 7 éve
szülő
commit
46cf3f984b
1 módosított fájl, 3 hozzáadás és 1 törlés
  1. 3 1
      examples/js/cameras/CinematicCamera.js

+ 3 - 1
examples/js/cameras/CinematicCamera.js

@@ -18,6 +18,7 @@ THREE.CinematicCamera = function( fov, aspect, near, far ) {
 	};
 
 	this.material_depth = new THREE.MeshDepthMaterial();
+	this.material_depth.depthPacking = THREE.RGBADepthPacking;
 
 	// In case of cinematicCamera, having a default lens set is important
 	this.setLens();
@@ -151,7 +152,8 @@ THREE.CinematicCamera.prototype.initPostProcessing = function () {
 			fragmentShader: bokeh_shader.fragmentShader,
 			defines: {
 				RINGS: this.shaderSettings.rings,
-				SAMPLES: this.shaderSettings.samples
+				SAMPLES: this.shaderSettings.samples,
+				DEPTH_PACKING: 1
 			}
 		} );