Renaming rainPass shaders, and updating TODO.

This commit is contained in:
Rezmason
2021-10-22 00:48:49 -07:00
parent d285697640
commit 7569246b5b
5 changed files with 16 additions and 28 deletions

View File

@@ -1,37 +1,31 @@
TODO:
Improve forkability
Should the OPERATOR and PARADISE specific config values still exist?
Rename compute.frag to rain.compute
Rename bloom tex to blur tex
And rename bloom pass to blur pass
Document every variable, method, and section of the main function in compute.frag
Document every variable, method, and section of the main function in rainPass.compute
Maybe rewrite it? Make the time based stuff easier to read?
Write a document (and include images) that explains the underlying principle of the rain pass
Create interactive controls?
Is the pipeline stuff just too bizarre?
Resurrection
Modified glyph order?
Post processing
Radial hue shift
Blue in top center
Yellow in bottom corners
Blurring towards the edges, like a tilt-shift effect
Maybe adjust the bloom pass's sampling based on distance to center
Upward glyphs?
New glyphs?
Good luck with that, champ
Audio
Synthesize raindrop sound
Use WebAudio to mess with it
Idea: Build a UI
Changes some uniforms
Effect selection would swap out the desired effect pass, somehow
The color palette stuff would be hard
Experiment with varying the colors in the palette pass
@@ -44,9 +38,3 @@ Experiment with varying the colors in the palette pass
Deja vu effect: flashing rows
Make them flash all the time
Then use a thunder-like pattern to show and hide the flash
Sounds
Raindrop sound
Deja vu sound
ripple sound
And some kind of ambient sound that they play over

View File

@@ -59,7 +59,7 @@ export default (regl, config) => {
wrapT: "clamp",
type: "half float",
});
const computeFrag = loadText("shaders/compute.frag");
const rainPassCompute = loadText("shaders/rainPass.Compute");
const computeUniforms = {
...commonUniforms,
...extractEntries(config, [
@@ -100,8 +100,8 @@ export default (regl, config) => {
// We render the code into an FBO using MSDFs: https://github.com/Chlumsky/msdfgen
const msdf = loadImage(regl, config.glyphTexURL);
const renderVert = loadText("shaders/rain.vert");
const renderFrag = loadText("shaders/rain.frag");
const rainPassVert = loadText("shaders/rainPass.vert");
const rainPassFrag = loadText("shaders/rainPass.frag");
const output = makePassFBO(regl, config.useHalfFloat);
const renderUniforms = {
...commonUniforms,
@@ -166,13 +166,13 @@ export default (regl, config) => {
primary: output,
},
() => {
compute({ frag: computeFrag.text() });
compute({ frag: rainPassCompute.text() });
regl.clear({
depth: 1,
color: [0, 0, 0, 1],
framebuffer: output,
});
render({ camera, transform, screenSize, vert: renderVert.text(), frag: renderFrag.text() });
render({ camera, transform, screenSize, vert: rainPassVert.text(), frag: rainPassFrag.text() });
},
(w, h) => {
output.resize(w, h);
@@ -180,6 +180,6 @@ export default (regl, config) => {
glMatrix.mat4.perspective(camera, (Math.PI / 180) * 90, aspectRatio, 0.0001, 1000);
[screenSize[0], screenSize[1]] = aspectRatio > 1 ? [1, aspectRatio] : [1 / aspectRatio, 1];
},
[msdf.loaded, computeFrag.loaded, renderVert.loaded, renderFrag.loaded]
[msdf.loaded, rainPassCompute.loaded, rainPassVert.loaded, rainPassFrag.loaded]
);
};