MCPcopy
hub / github.com/PavelDoGreat/WebGL-Fluid-Simulation / applySunrays

Function applySunrays

script.js:1396–1406  ·  view source on GitHub ↗
(source, mask, destination)

Source from the content-addressed store, hash-verified

1394}
1395
1396function applySunrays (source, mask, destination) {
1397 gl.disable(gl.BLEND);
1398 sunraysMaskProgram.bind();
1399 gl.uniform1i(sunraysMaskProgram.uniforms.uTexture, source.attach(0));
1400 blit(mask);
1401
1402 sunraysProgram.bind();
1403 gl.uniform1f(sunraysProgram.uniforms.weight, config.SUNRAYS_WEIGHT);
1404 gl.uniform1i(sunraysProgram.uniforms.uTexture, mask.attach(0));
1405 blit(destination);
1406}
1407
1408function blur (target, temp, iterations) {
1409 blurProgram.bind();

Callers 1

renderFunction · 0.85

Calls 1

bindMethod · 0.45

Tested by

no test coverage detected