Permalink
Browse files

Fixed precision problem pointed out by djkurtz at chromium.org where

it was necessary to use a lower precision constant in the skybox setup
to avoid problems on mediump ES 2.0 devices.

Fixed problems in dynamic-cubemap-lower-res.html.
  • Loading branch information...
1 parent 611d52d commit 729707c94e296a1b1c6dfe642033320e1299466c Kenneth Russell committed Oct 19, 2013
Showing with 9 additions and 7 deletions.
  1. +7 −6 dynamic-cubemap/dynamic-cubemap-lower-res.html
  2. +2 −1 dynamic-cubemap/dynamic-cubemap.html
@@ -33,14 +33,13 @@
<head>
<meta charset="utf-8">
<title>WebGL Dynamic Cubemap</title>
-<style>
-</style>
<link type="text/css" href="../jquery-ui-1.8.2.custom/css/ui-lightness/jquery-ui-1.8.2.custom.css" rel="stylesheet" />
<link type="text/css" href="../shared/base.css" rel="stylesheet" />
<script type="text/javascript" src="../jquery-ui-1.8.2.custom/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="../jquery-ui-1.8.2.custom/js/jquery-ui-1.8.2.custom.min.js"></script>
<script type="text/javascript" src="../khronos/webgl-debug.js"></script>
<script type="text/javascript" src="../tdl/base.js"></script>
+<script type="text/javascript" src="../shared/utils.js"></script>
<script type="text/javascript">
tdl.require('tdl.webgl');
tdl.require('tdl.buffers');
@@ -143,7 +142,7 @@
[1, 0, 0, 0,
0, 0, 1, 0,
0,-1, 0, 0,
- 0, 0, 0.9999, 1]);
+ 0, 0, 0.999, 1]);
return new tdl.models.Model(program, arrays, textures);
}
@@ -468,7 +467,7 @@
}
$(function(){
- tdl.fullscreen.setup("fullscreen", "body");
+ setupFullscreen("fullscreen", "body");
main();
});
@@ -478,8 +477,10 @@
<body>
<div id="info"><a href="http://threedlibrary.googlecode.com" target="_blank">tdl.js</a> - dynamic cubemap</div>
<div id="fpsContainer">
- <div id="fullscreen"></div>
- <div class="fps">fps: <span id="fps"></div>
+ <div class="fpsInner">
+ <div id="fullscreen"></div>
+ <div class="fps">fps: <span id="fps"></span></div>
+ </div>
</div>
<div id="viewContainer">
<canvas id="canvas" width="256" height="256" style="width: 100%; height: 100%;"></canvas>
@@ -46,6 +46,7 @@
tdl.require('tdl.fast');
tdl.require('tdl.framebuffers');
tdl.require('tdl.fps');
+tdl.require('tdl.fullscreen');
tdl.require('tdl.log');
tdl.require('tdl.math');
tdl.require('tdl.models');
@@ -141,7 +142,7 @@
[1, 0, 0, 0,
0, 0, 1, 0,
0,-1, 0, 0,
- 0, 0, 0.9999, 1]);
+ 0, 0, 0.999, 1]);
return new tdl.models.Model(program, arrays, textures);
}

0 comments on commit 729707c

Please sign in to comment.