()
| 1032 | } |
| 1033 | |
| 1034 | function initSunraysFramebuffers () { |
| 1035 | let res = getResolution(config.SUNRAYS_RESOLUTION); |
| 1036 | |
| 1037 | const texType = ext.halfFloatTexType; |
| 1038 | const r = ext.formatR; |
| 1039 | const filtering = ext.supportLinearFiltering ? gl.LINEAR : gl.NEAREST; |
| 1040 | |
| 1041 | sunrays = createFBO(res.width, res.height, r.internalFormat, r.format, texType, filtering); |
| 1042 | sunraysTemp = createFBO(res.width, res.height, r.internalFormat, r.format, texType, filtering); |
| 1043 | } |
| 1044 | |
| 1045 | function createFBO (w, h, internalFormat, format, type, param) { |
| 1046 | gl.activeTexture(gl.TEXTURE0); |
no test coverage detected