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

Unified Diff: samples/o3d-webgl-samples/shadow-map.html

Issue 2718003: Adding wireframe to the shadow map demo. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | samples/o3d-webgl/effect.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/o3d-webgl-samples/shadow-map.html
===================================================================
--- samples/o3d-webgl-samples/shadow-map.html (revision 49133)
+++ samples/o3d-webgl-samples/shadow-map.html (working copy)
@@ -244,10 +244,10 @@
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 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 @@
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);
}
« no previous file with comments | « no previous file | samples/o3d-webgl/effect.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698