()
| 1010 | } |
| 1011 | |
| 1012 | function initBloomFramebuffers () { |
| 1013 | let res = getResolution(config.BLOOM_RESOLUTION); |
| 1014 | |
| 1015 | const texType = ext.halfFloatTexType; |
| 1016 | const rgba = ext.formatRGBA; |
| 1017 | const filtering = ext.supportLinearFiltering ? gl.LINEAR : gl.NEAREST; |
| 1018 | |
| 1019 | bloom = createFBO(res.width, res.height, rgba.internalFormat, rgba.format, texType, filtering); |
| 1020 | |
| 1021 | bloomFramebuffers.length = 0; |
| 1022 | for (let i = 0; i < config.BLOOM_ITERATIONS; i++) |
| 1023 | { |
| 1024 | let width = res.width >> (i + 1); |
| 1025 | let height = res.height >> (i + 1); |
| 1026 | |
| 1027 | if (width < 2 || height < 2) break; |
| 1028 | |
| 1029 | let fbo = createFBO(width, height, rgba.internalFormat, rgba.format, texType, filtering); |
| 1030 | bloomFramebuffers.push(fbo); |
| 1031 | } |
| 1032 | } |
| 1033 | |
| 1034 | function initSunraysFramebuffers () { |
| 1035 | let res = getResolution(config.SUNRAYS_RESOLUTION); |
no test coverage detected