diff options
Diffstat (limited to 'o3d')
-rw-r--r-- | o3d/samples/o3d-webgl-samples/shadow-map.html | 8 | ||||
-rw-r--r-- | o3d/samples/o3d-webgl-samples/texturesamplers.html | 8 | ||||
-rw-r--r-- | o3d/samples/o3d-webgl/sampler.js | 5 |
3 files changed, 11 insertions, 10 deletions
diff --git a/o3d/samples/o3d-webgl-samples/shadow-map.html b/o3d/samples/o3d-webgl-samples/shadow-map.html index 7940410..97defe2 100644 --- a/o3d/samples/o3d-webgl-samples/shadow-map.html +++ b/o3d/samples/o3d-webgl-samples/shadow-map.html @@ -260,9 +260,11 @@ function initMaterials() { g_shadowSampler.minFilter = g_o3d.Sampler.POINT; g_shadowSampler.magFilter = g_o3d.Sampler.POINT; g_shadowSampler.mipFilter = g_o3d.Sampler.POINT; - g_shadowSampler.addressModeU = g_o3d.Sampler.BORDER; - g_shadowSampler.addressModeV = g_o3d.Sampler.BORDER; - g_shadowSampler.borderColor = [1, 1, 1, 1]; + // Note: The o3d-plugin used BORDER as address mode, but that is not available + // in WebGL so use WRAP instead. + g_shadowSampler.addressModeU = g_o3d.Sampler.WRAP; + g_shadowSampler.addressModeV = g_o3d.Sampler.WRAP; + //g_shadowSampler.borderColor = [1, 1, 1, 1]; } diff --git a/o3d/samples/o3d-webgl-samples/texturesamplers.html b/o3d/samples/o3d-webgl-samples/texturesamplers.html index 13fec25..bbf810e 100644 --- a/o3d/samples/o3d-webgl-samples/texturesamplers.html +++ b/o3d/samples/o3d-webgl-samples/texturesamplers.html @@ -185,10 +185,10 @@ function initStep2(clientElements) { samplers[1].minFilter = g_o3d.Sampler.ANISOTROPIC; samplers[1].maxAnisotropy = 4; - // Uses BORDER addressing mode with a red border. - samplers[2].addressModeU = g_o3d.Sampler.BORDER; - samplers[2].addressModeV = g_o3d.Sampler.BORDER; - samplers[2].borderColor = [1, 0, 0, 1]; + // Note: BORDER addressing is not supported in WebGL. + //samplers[2].addressModeU = g_o3d.Sampler.BORDER; + //samplers[2].addressModeV = g_o3d.Sampler.BORDER; + //samplers[2].borderColor = [1, 0, 0, 1]; // Uses POINT sampling for minification. samplers[3].addressModeU = g_o3d.Sampler.WRAP; diff --git a/o3d/samples/o3d-webgl/sampler.js b/o3d/samples/o3d-webgl/sampler.js index 4e651a9..e4d6513 100644 --- a/o3d/samples/o3d-webgl/sampler.js +++ b/o3d/samples/o3d-webgl/sampler.js @@ -180,10 +180,9 @@ o3d.Sampler.prototype.convertAddressMode_ = function(o3d_mode) { gl_mode = this.gl.CLAMP_TO_EDGE; break; case o3d.Sampler.BORDER: - gl_mode = this.gl.CLAMP_TO_BORDER; - break; + // This is not supported in WebGL. default: - this.gl.client.error_callback("Unknown Address mode"); + this.gl.client.error_callback("Unknown/Unavailable Address mode"); break; } return gl_mode; |