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

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

Issue 1092003: Fixed a lot of bugs with render surfaces and bitmaps. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 10 years, 9 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/bitmap.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 41482)
+++ samples/o3d-webgl-samples/shadow-map.html (working copy)
@@ -197,7 +197,7 @@
g_renderSurfaceSet.renderDepthStencilSurface = depthSurface;
g_renderSurfaceSet.parent = shadowPassRenderRoot;
-
+
// Create a render sub-graph for the shadow map generation.
g_shadowViewInfo = o3djs.rendergraph.createBasicView(
g_pack,
@@ -263,7 +263,6 @@
g_shadowSampler.addressModeU = g_o3d.Sampler.BORDER;
g_shadowSampler.addressModeV = g_o3d.Sampler.BORDER;
g_shadowSampler.borderColor = [1, 1, 1, 1];
-
}
@@ -587,12 +586,9 @@
// Convert texture coords to [0, 1] range.
projCoords /= projCoords.w;
- projCoords.x = 0.5 * projCoords.x + 0.5;
- projCoords.y = 0.5 * projCoords.y + 0.5;
- projCoords.z = 0.5 * projCoords.z + 0.5;
+ projCoords = 0.5 * projCoords + 0.5;
float depth = projCoords.z;
-
float light;
// If the rednered point is farther from the light than the distance encoded
« no previous file with comments | « no previous file | samples/o3d-webgl/bitmap.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698