| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 Copyright 2009, Google Inc. | 2 Copyright 2009, Google Inc. |
| 3 All rights reserved. | 3 All rights reserved. |
| 4 | 4 |
| 5 Redistribution and use in source and binary forms, with or without | 5 Redistribution and use in source and binary forms, with or without |
| 6 modification, are permitted provided that the following conditions are | 6 modification, are permitted provided that the following conditions are |
| 7 met: | 7 met: |
| 8 | 8 |
| 9 * Redistributions of source code must retain the above copyright | 9 * Redistributions of source code must retain the above copyright |
| 10 notice, this list of conditions and the following disclaimer. | 10 notice, this list of conditions and the following disclaimer. |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 // borderColor = Float4(0, 0, 0, 0) | 178 // borderColor = Float4(0, 0, 0, 0) |
| 179 // maxAnisotropy = 1 | 179 // maxAnisotropy = 1 |
| 180 | 180 |
| 181 // Rotates quad and uses anisotropic filtering. | 181 // Rotates quad and uses anisotropic filtering. |
| 182 transforms[1].rotateZ(-Math.PI / 2.5); | 182 transforms[1].rotateZ(-Math.PI / 2.5); |
| 183 samplers[1].addressModeU = g_o3d.Sampler.WRAP; | 183 samplers[1].addressModeU = g_o3d.Sampler.WRAP; |
| 184 samplers[1].addressModeV = g_o3d.Sampler.WRAP; | 184 samplers[1].addressModeV = g_o3d.Sampler.WRAP; |
| 185 samplers[1].minFilter = g_o3d.Sampler.ANISOTROPIC; | 185 samplers[1].minFilter = g_o3d.Sampler.ANISOTROPIC; |
| 186 samplers[1].maxAnisotropy = 4; | 186 samplers[1].maxAnisotropy = 4; |
| 187 | 187 |
| 188 // Uses BORDER addressing mode with a red border. | 188 // Note: BORDER addressing is not supported in WebGL. |
| 189 samplers[2].addressModeU = g_o3d.Sampler.BORDER; | 189 //samplers[2].addressModeU = g_o3d.Sampler.BORDER; |
| 190 samplers[2].addressModeV = g_o3d.Sampler.BORDER; | 190 //samplers[2].addressModeV = g_o3d.Sampler.BORDER; |
| 191 samplers[2].borderColor = [1, 0, 0, 1]; | 191 //samplers[2].borderColor = [1, 0, 0, 1]; |
| 192 | 192 |
| 193 // Uses POINT sampling for minification. | 193 // Uses POINT sampling for minification. |
| 194 samplers[3].addressModeU = g_o3d.Sampler.WRAP; | 194 samplers[3].addressModeU = g_o3d.Sampler.WRAP; |
| 195 samplers[3].addressModeV = g_o3d.Sampler.WRAP; | 195 samplers[3].addressModeV = g_o3d.Sampler.WRAP; |
| 196 samplers[3].minFilter = g_o3d.Sampler.POINT; | 196 samplers[3].minFilter = g_o3d.Sampler.POINT; |
| 197 | 197 |
| 198 // Rotates quad and uses default (linear) filtering. | 198 // Rotates quad and uses default (linear) filtering. |
| 199 // Compare results to quad #1. | 199 // Compare results to quad #1. |
| 200 transforms[4].rotateZ(-Math.PI / 2.5); | 200 transforms[4].rotateZ(-Math.PI / 2.5); |
| 201 samplers[4].addressModeU = g_o3d.Sampler.WRAP; | 201 samplers[4].addressModeU = g_o3d.Sampler.WRAP; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 | 263 |
| 264 /* Given the texture coordinates, our pixel shader grabs the corresponding | 264 /* Given the texture coordinates, our pixel shader grabs the corresponding |
| 265 * color from the texture. | 265 * color from the texture. |
| 266 */ | 266 */ |
| 267 void main() { | 267 void main() { |
| 268 gl_FragColor = texture2D(texSampler, texCoord); | 268 gl_FragColor = texture2D(texSampler, texCoord); |
| 269 } | 269 } |
| 270 </textarea> | 270 </textarea> |
| 271 </body> | 271 </body> |
| 272 </html> | 272 </html> |
| OLD | NEW |