diff options
author | luchen@google.com <luchen@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-09 19:52:40 +0000 |
---|---|---|
committer | luchen@google.com <luchen@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-09 19:52:40 +0000 |
commit | 1750a95d56338a475b83c929b0b7eed861199db5 (patch) | |
tree | a2f68cbd73e848a47aece62cb1b3ff8218b75442 /o3d/samples/o3d-webgl-samples/shadow-map.html | |
parent | 1f0f54f4442d001ef10f44781b9d2200ece3ad40 (diff) | |
download | chromium_src-1750a95d56338a475b83c929b0b7eed861199db5.zip chromium_src-1750a95d56338a475b83c929b0b7eed861199db5.tar.gz chromium_src-1750a95d56338a475b83c929b0b7eed861199db5.tar.bz2 |
Adding wireframe light indicator to shadow map demo.
Review URL: http://codereview.chromium.org/2718003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49304 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/samples/o3d-webgl-samples/shadow-map.html')
-rw-r--r-- | o3d/samples/o3d-webgl-samples/shadow-map.html | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/o3d/samples/o3d-webgl-samples/shadow-map.html b/o3d/samples/o3d-webgl-samples/shadow-map.html index bf1969a..7940410 100644 --- a/o3d/samples/o3d-webgl-samples/shadow-map.html +++ b/o3d/samples/o3d-webgl-samples/shadow-map.html @@ -244,10 +244,10 @@ function initMaterials() { var shadowVertexShader = document.getElementById('shadowVertexShader').text; var shadowPixelShader = document.getElementById('shadowPixelShader').text; - + g_shadowMaterial = g_pack.createObject('Material'); g_shadowMaterial.drawList = g_shadowViewInfo.performanceDrawList; - + var shadowEffect = g_pack.createObject('Effect'); shadowEffect.loadVertexShaderFromString(shadowVertexShader); shadowEffect.loadPixelShaderFromString(shadowPixelShader); @@ -382,10 +382,9 @@ function createShapes() { function createLightShape() { var inverseMatrix = g_math.matrix4.inverse(g_lightViewProjection); -/* // Scale and translate a cube of side length 2 to get a box // that extends from [-1, -1, 0] to [1, 1, 1]. - var shape = o3djs.debug.createLineCube( + var shape = o3djs.lineprimitives.createLineCube( g_pack, o3djs.material.createConstantMaterial(g_pack, g_colorViewInfo, @@ -393,12 +392,12 @@ function createLightShape() { 2, g_math.matrix4.compose( g_math.matrix4.translation([0, 0, 0.5]), - g_math.matrix4.scaling([1, 1, 0.5])));*/ + g_math.matrix4.scaling([1, 1, 0.5]))); g_lightFrustumTransform = g_pack.createObject('Transform'); g_lightFrustumTransform.localMatrix = inverseMatrix; g_lightFrustumTransform.parent = g_client.root; - //g_lightFrustumTransform.addShape(shape); + g_lightFrustumTransform.addShape(shape); } |