Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Issue 1703014: Added culling sample. (Closed)

Created:
10 years, 8 months ago by petersont
Modified:
9 years, 7 months ago
CC:
o3d-review_googlegroups.com
Visibility:
Public.

Description

Patch Set 1 #

Total comments: 2

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+779 lines, -83 lines) Patch
A samples/o3d-webgl-samples/culling.html View 1 1 chunk +320 lines, -0 lines 0 comments Download
M samples/o3d-webgl/bitmap.js View 1 1 chunk +1 line, -0 lines 0 comments Download
M samples/o3d-webgl/bounding_box.js View 1 6 chunks +172 lines, -9 lines 0 comments Download
M samples/o3d-webgl/client.js View 1 12 chunks +84 lines, -31 lines 0 comments Download
M samples/o3d-webgl/draw_list.js View 1 3 chunks +5 lines, -1 line 0 comments Download
M samples/o3d-webgl/element.js View 1 3 chunks +3 lines, -3 lines 0 comments Download
M samples/o3d-webgl/field.js View 1 2 chunks +16 lines, -8 lines 0 comments Download
M samples/o3d-webgl/pack.js View 1 1 chunk +1 line, -0 lines 0 comments Download
M samples/o3d-webgl/param.js View 10 chunks +27 lines, -21 lines 0 comments Download
M samples/o3d-webgl/primitive.js View 1 3 chunks +39 lines, -1 line 0 comments Download
M samples/o3d-webgl/ray_intersection_info.js View 1 1 chunk +6 lines, -0 lines 0 comments Download
M samples/o3d-webgl/shape.js View 1 1 chunk +28 lines, -3 lines 0 comments Download
M samples/o3d-webgl/transform.js View 1 4 chunks +72 lines, -4 lines 0 comments Download
M samples/o3djs/webgl.js View 2 chunks +5 lines, -2 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
petersont
So, this doesn't get the exact same results that the plugin does, but it culls ...
10 years, 8 months ago (2010-04-27 22:37:12 UTC) #1
greggman
10 years, 7 months ago (2010-04-29 03:49:01 UTC) #2
A few random comments otherwise LGTM

http://codereview.chromium.org/1703014/diff/1/7
File samples/o3d-webgl/bounding_box.js (right):

http://codereview.chromium.org/1703014/diff/1/7#newcode268
samples/o3d-webgl/bounding_box.js:268: var worldViewProjection = [[], [], [],
[]];
It doesn't seem like you want to do world * view * projection here because it
assumes that's what makes up the correct matrix for the user's use case which
may not be world * view * projection.

http://codereview.chromium.org/1703014/diff/1/12
File samples/o3d-webgl/shape.js (right):

http://codereview.chromium.org/1703014/diff/1/12#newcode133
samples/o3d-webgl/shape.js:133: if (!element.boundingBox.inFrustum_(world, view,
projection)) {
You'd probably gain some performance if you computed the worldViewProjection
here and saved it at line 142.  Otherwise you're doing a 2 matrix multiplies
twice for each draw element. Once here for culling and again for drawing.

Powered by Google App Engine
This is Rietveld 408576698