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

Issue 155401: Shadow Map Sample (Closed)

Created:
11 years, 5 months ago by petersont
Modified:
9 years, 7 months ago
Reviewers:
gman1, vangelis, apatrick
CC:
o3d-review_googlegroups.com
Visibility:
Public.

Description

Added a new sample which implements basic shadow mapping. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=21000

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 18

Patch Set 3 : '' #

Total comments: 12

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Total comments: 6

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Patch Set 11 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+655 lines, -5 lines) Patch
M DEPS View 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M core/cross/gl/renderer_gl.cc View 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download
M samples/MANIFEST View 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M samples/o3djs/debug.js View 3 4 5 6 7 8 9 10 3 chunks +20 lines, -4 lines 0 comments Download
A samples/shadow-map.html View 1 2 3 4 5 6 7 8 1 chunk +627 lines, -0 lines 0 comments Download
M tests/selenium/sample_list.txt View 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
petersont
11 years, 5 months ago (2009-07-11 00:29:40 UTC) #1
apatrick
You need to add it to the MANIFEST file. You could add it to the ...
11 years, 5 months ago (2009-07-11 00:54:20 UTC) #2
gman
this is awesome!!! Just a few comments. http://codereview.chromium.org/155401/diff/1002/1003 File samples/shadow-map.html (right): http://codereview.chromium.org/155401/diff/1002/1003#newcode157 Line 157: g_shadowViewInfo ...
11 years, 5 months ago (2009-07-11 02:52:26 UTC) #3
vangelis
Thanks for shaping this sample up. It looks good! I agree with Al's comment that ...
11 years, 5 months ago (2009-07-13 17:08:15 UTC) #4
gman
http://codereview.chromium.org/155401/diff/1002/1003 File samples/shadow-map.html (right): http://codereview.chromium.org/155401/diff/1002/1003#newcode344 Line 344: function createFrustumVertices(matrix) { On 2009/07/13 17:08:15, vangelis wrote: ...
11 years, 5 months ago (2009-07-13 17:18:28 UTC) #5
petersont
http://codereview.chromium.org/155401/diff/1002/1003 File samples/shadow-map.html (right): http://codereview.chromium.org/155401/diff/1002/1003#newcode5 Line 5: Author: Vangelis Kokkevis (vangelis@google.com) On 2009/07/11 00:54:20, apatrick ...
11 years, 5 months ago (2009-07-13 18:57:27 UTC) #6
vangelis
Really like the shader explanations. Short and to the point! I have a couple more ...
11 years, 5 months ago (2009-07-13 19:29:03 UTC) #7
petersont
Improved comments, added to the test list, please have another look. http://codereview.chromium.org/155401/diff/1009/4 File samples/shadow-map.html (right): ...
11 years, 5 months ago (2009-07-16 22:23:57 UTC) #8
vangelis
11 years, 5 months ago (2009-07-16 22:59:47 UTC) #9
LGTM.  Don't forget to bump up the version for o3d-assets in the DEPS file to
include the reference screenshot.

http://codereview.chromium.org/155401/diff/21/1021
File core/cross/gl/renderer_gl.cc (right):

http://codereview.chromium.org/155401/diff/21/1021#newcode1571
Line 1571: // Note: glReadPixels caputres the alpha component of the frame
buffer as well
typo: captures

http://codereview.chromium.org/155401/diff/21/1021#newcode1572
Line 1572: // as the color components, the graphics pipeline usually ignores the
alpha
graphics pipeline usually -> browser

http://codereview.chromium.org/155401/diff/21/1018
File samples/shadow-map.html (right):

http://codereview.chromium.org/155401/diff/21/1018#newcode36
Line 36: The technique works by rendering the scene in two passes.  The first
pass renders the geometry in the scene with a shader that colors each pixel a
shade of gray representing how far the rendered point is from the light source. 
That image, the shadow map, is rendered to a texture, and then the second
(visible) render pass samples it to determine which points in the scene are in
shaodow.
80 char limit

http://codereview.chromium.org/155401/diff/21/1018#newcode154
Line 154: * point if view, arranges for the view from the light to be rendered
to a
if -> of

http://codereview.chromium.org/155401/diff/21/1018#newcode223
Line 223: * And loads effects for materials in the scene.  Other materials are
created
And -> and

http://codereview.chromium.org/155401/diff/21/1018#newcode369
Line 369: g_math.matrix4.compose(
worthwhile to add a comment here saying that you are essentially creating a box
with that extends from [-1, -1, 0] to [1, 1, 1]

Powered by Google App Engine
This is Rietveld 408576698