computeTileAreaAndDistance #2266
-
const size = tileBounds.getSize(tmpVectors3[1]);
in computeTileAreaAndDistance i find that the objectSize devided by projectedPoint.w,the size of it is in ndc space? and the arae is real in screen space? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
It has been a while since I looked at this. The objectSize value is in NDC space, so the area is a percentage of a cube 2 x 2, i.e. 4 units square, because the NDC space goes from -1,-1 to 1,1. (95% sure). The distance is in NDC space, at least because it is clamped between -1 and 1 and divided by w. |
Beta Was this translation helpful? Give feedback.
-
but tileBounds is in world space |
Beta Was this translation helpful? Give feedback.
It has been a while since I looked at this.
The objectSize value is in NDC space, so the area is a percentage of a cube 2 x 2, i.e. 4 units square, because the NDC space goes from -1,-1 to 1,1. (95% sure).
The distance is in NDC space, at least because it is clamped between -1 and 1 and divided by w.