()
| 272 | }; |
| 273 | |
| 274 | function toggleRenderMode() { |
| 275 | |
| 276 | const mode = Number(params["render mode"]); |
| 277 | |
| 278 | if(mode === RenderMode.DEPTH) { |
| 279 | |
| 280 | textureEffect.setTextureSwizzleRGBA(ColorChannel.ALPHA); |
| 281 | |
| 282 | } else if(mode === RenderMode.NORMALS) { |
| 283 | |
| 284 | textureEffect.setTextureSwizzleRGBA( |
| 285 | ColorChannel.RED, |
| 286 | ColorChannel.GREEN, |
| 287 | ColorChannel.BLUE, |
| 288 | ColorChannel.ALPHA |
| 289 | ); |
| 290 | |
| 291 | } |
| 292 | |
| 293 | textureEffect.blendMode.setBlendFunction((mode !== RenderMode.DEFAULT) ? |
| 294 | BlendFunction.NORMAL : BlendFunction.SKIP); |
| 295 | |
| 296 | effectPass.encodeOutput = (mode === RenderMode.DEFAULT); |
| 297 | |
| 298 | } |
| 299 | |
| 300 | if(capabilities.isWebGL2) { |
| 301 |
nothing calls this directly
no test coverage detected