11import { Texture , Uniform } from "three" ;
2- import { orthographicDepthToViewZ , viewZToOrthographicDepth } from "../utils/functions/camera.js" ;
32import { FullscreenMaterial } from "./FullscreenMaterial.js" ;
43
54import fragmentShader from "./shaders/circle-of-confusion.frag" ;
@@ -43,7 +42,7 @@ export class CircleOfConfusionMaterial extends FullscreenMaterial {
4342 }
4443
4544 /**
46- * The focus distance. Range: [0.0, 1.0] .
45+ * The focus distance in world units .
4746 */
4847
4948 get focusDistance ( ) : number {
@@ -59,23 +58,7 @@ export class CircleOfConfusionMaterial extends FullscreenMaterial {
5958 }
6059
6160 /**
62- * The focus distance in world units.
63- */
64-
65- get worldFocusDistance ( ) : number {
66-
67- return - orthographicDepthToViewZ ( this . focusDistance , this . near , this . far ) ;
68-
69- }
70-
71- set worldFocusDistance ( value : number ) {
72-
73- this . focusDistance = viewZToOrthographicDepth ( - value , this . near , this . far ) ;
74-
75- }
76-
77- /**
78- * The focus range. Range: [0.0, 1.0].
61+ * The focus range in world units.
7962 */
8063
8164 get focusRange ( ) : number {
@@ -90,20 +73,4 @@ export class CircleOfConfusionMaterial extends FullscreenMaterial {
9073
9174 }
9275
93- /**
94- * The focus range in world units.
95- */
96-
97- get worldFocusRange ( ) : number {
98-
99- return - orthographicDepthToViewZ ( this . focusRange , this . near , this . far ) ;
100-
101- }
102-
103- set worldFocusRange ( value : number ) {
104-
105- this . focusRange = viewZToOrthographicDepth ( - value , this . near , this . far ) ;
106-
107- }
108-
10976}
0 commit comments