├── src
├── webxr.d.ts
├── dummy.ts
├── nodes
│ ├── common
│ │ └── UITag.ts
│ ├── PlexusScene
│ │ └── constants.ts
│ ├── ParticlesRingScene
│ │ └── constants.ts
│ ├── TrailsScene
│ │ ├── Trails
│ │ │ └── constants.ts
│ │ └── TrailsScene.ts
│ ├── FluidScene
│ │ ├── constants.ts
│ │ └── shaders
│ │ │ ├── fluidClampToGrid.ts
│ │ │ ├── fluidFrameFrag.ts
│ │ │ ├── fluidUvToPos.ts
│ │ │ ├── defFluidSampleNearest3D.ts
│ │ │ ├── defFluidSampleLinear3D.ts
│ │ │ └── fluidAdvectionFrag.ts
│ ├── MetaballScene
│ │ ├── MetaballParticles
│ │ │ ├── constants.ts
│ │ │ └── shaders
│ │ │ │ └── metaballParticlesRenderFrag.ts
│ │ └── defMetaballMap.ts
│ ├── CameraStack
│ │ ├── deferredConstants.ts
│ │ ├── DoF
│ │ │ └── shaders
│ │ │ │ ├── dofCalcCoC.ts
│ │ │ │ ├── dofTileGatherFrag.ts
│ │ │ │ ├── dofPresortFrag.ts
│ │ │ │ └── dofPostFrag.ts
│ │ └── mainCameraStackResources.ts
│ ├── PostStack
│ │ ├── Vectorscope
│ │ │ └── shaders
│ │ │ │ ├── vectorscopeFrag.ts
│ │ │ │ └── vectorscopeVert.ts
│ │ ├── Bloom
│ │ │ └── shaders
│ │ │ │ └── bloomUpFrag.ts
│ │ └── CharRenderer
│ │ │ └── shaders
│ │ │ └── charRendererFrag.ts
│ ├── SevenSegScene
│ │ ├── vec3UniformSphere.ts
│ │ ├── quatRandom.ts
│ │ └── shaders
│ │ │ ├── sevenSegWireFrag.ts
│ │ │ └── sevenSegFrag.ts
│ ├── HistogramScatter
│ │ └── shaders
│ │ │ ├── histogramGatherFrag.ts
│ │ │ ├── histogramGatherVert.ts
│ │ │ └── histogramPlotVert.ts
│ ├── utils
│ │ ├── createShaderRenderTarget.ts
│ │ ├── createCubemapUniformsLambda.ts
│ │ ├── createRaymarchCameraUniformsLambda.ts
│ │ ├── CanvasTexture.ts
│ │ └── ShaderRenderTarget.ts
│ ├── LoadingScreen
│ │ └── shaders
│ │ │ ├── ditherFrag.ts
│ │ │ └── noiseFrag.ts
│ ├── SpongeScene
│ │ └── Sponge
│ │ │ └── Sponge.ts
│ ├── Mixer
│ │ └── shaders
│ │ │ └── mixerFrag.ts
│ ├── MoonScene
│ │ └── shaders
│ │ │ └── moonTexModFrag.ts
│ ├── IBLLUTCalc
│ │ └── IBLLUTCalc.ts
│ ├── OBSVRLogoBScene
│ │ ├── shaders
│ │ │ └── obsvrLogoBFrag.ts
│ │ └── OBSVRLogoBScene.ts
│ ├── NoisePlaneScene
│ │ ├── shaders
│ │ │ └── noisePlaneFrag.ts
│ │ └── NoisePlaneScene.ts
│ ├── PillarGridScene
│ │ └── PillarGrid
│ │ │ └── shaders
│ │ │ └── pillarGridFrameFrag.ts
│ ├── Lights
│ │ └── shaders
│ │ │ └── shadowBlurFrag.ts
│ ├── WormTunnelScene
│ │ └── WormTunnel
│ │ │ └── WormTunnel.ts
│ ├── KansokushaScene
│ │ ├── assets
│ │ │ └── kansokusha.svg
│ │ └── shaders
│ │ │ └── kansokushaFrag.ts
│ ├── WireCubeScene
│ │ └── WireCubeScene.ts
│ ├── CubemapNode
│ │ └── shaders
│ │ │ └── cubemapMergeFrag.ts
│ ├── LineRings3DScene
│ │ └── LineRings3DScene.ts
│ ├── LineRhombusesScene
│ │ └── LineRhombusesScene.ts
│ ├── LineTriTunnelScene
│ │ └── LineTriTunnelScene.ts
│ ├── LineWaveScene
│ │ └── LineWaveScene.ts
│ ├── LineRingsScene
│ │ └── LineRingsScene.ts
│ └── Dust
│ │ └── shaders
│ │ └── dustRenderFrag.ts
├── vite-env.d.ts
├── utils
│ ├── Observer.ts
│ ├── sleep.ts
│ ├── genToken.ts
│ ├── arraySetIntersects.ts
│ ├── createDebounce.ts
│ ├── downloadBlob.ts
│ ├── arraySetIntersection.ts
│ ├── poll.ts
│ ├── injectCodeToShader.ts
│ ├── createPromiseSVGImage.ts
│ ├── vdc.ts
│ ├── MapOfSet.ts
│ ├── applyMixins.ts
│ ├── Cache.ts
│ ├── Memo.ts
│ ├── getYugoppText.ts
│ ├── vec3AzimuthAltitude.ts
│ ├── constants.ts
│ └── RandomTexture.ts
├── globals
│ ├── automaton-fxs
│ │ └── fxDefinitions.ts
│ ├── music.ts
│ ├── glslMusicEditor.ts
│ ├── canvasRenderTarget.ts
│ ├── gui
│ │ └── NullMeasureHandler.ts
│ ├── mixerTarget.ts
│ ├── moonTexGen.ts
│ ├── zeroTexture.ts
│ ├── cameraStackTargets.ts
│ ├── audio.ts
│ ├── randomTexture.ts
│ ├── dummyRenderTarget.ts
│ ├── ibllutCalc.ts
│ ├── canvas.ts
│ ├── globalObservers.ts
│ ├── postTarget.ts
│ ├── quadGeometry.ts
│ ├── preparationTasks.ts
│ ├── audioReverb.ts
│ ├── audioAnalyzer.ts
│ ├── quad3DGeometry.ts
│ └── swapShadowMap.ts
├── worklet.d.ts
├── tweakpane-plugin-profiler.d.ts
├── gl
│ ├── GLBlitFilter.ts
│ ├── GLTextureMagFilterType.ts
│ ├── GLCullFaceType.ts
│ ├── GLIndexType.ts
│ ├── GLTextureWrapType.ts
│ ├── GLBlitMask.ts
│ ├── glDrawBuffersByNumber.ts
│ ├── GLDrawMode.ts
│ ├── glClear.ts
│ ├── glVertexArrayBindIndexbuffer.ts
│ ├── GLTextureMinFilterType.ts
│ ├── glCreateTexture.ts
│ ├── GLBufferUsage.ts
│ ├── glTextureWrap.ts
│ ├── glCreateIndexbuffer.ts
│ ├── glCreateVertexbuffer.ts
│ ├── glWaitGPUCommandsCompleteAsync.ts
│ ├── glVertexArrayBindVertexbuffer.ts
│ ├── glTextureFilter.ts
│ ├── glSetTextureFromBitmap.ts
│ └── GLBlendFactor.ts
├── music
│ ├── GLSLMusicEditorRange.ts
│ ├── MusicEngine.ts
│ ├── withinGLSLMusicEditorRange.ts
│ ├── shaderchunks.ts
│ ├── constants.ts
│ ├── utils
│ │ ├── findMatchingCloseBracket.ts
│ │ └── findNearestChar.ts
│ ├── BufferReaderProcessor.js
│ └── BufferReaderNode.ts
├── shaders
│ ├── modules
│ │ ├── bayerMatrix4.ts
│ │ ├── cis.ts
│ │ ├── maxOfVec2.ts
│ │ ├── maxOfVec3.ts
│ │ ├── minOfVec3.ts
│ │ ├── defineFs.ts
│ │ ├── glslGaussian.ts
│ │ ├── maxOfVec4.ts
│ │ ├── isValidUv.ts
│ │ ├── vKelemen.ts
│ │ ├── bayerPattern4.ts
│ │ ├── fresnelSchlick.ts
│ │ ├── glslSaturate.ts
│ │ ├── taylorInvSqrt.ts
│ │ ├── mod289.ts
│ │ ├── calcL.ts
│ │ ├── sRGBEOTF.ts
│ │ ├── sRGBOETF.ts
│ │ ├── randomSphere.ts
│ │ ├── isectMin.ts
│ │ ├── pcg2df.ts
│ │ ├── pcg3df.ts
│ │ ├── pcg4df.ts
│ │ ├── randomHemisphere.ts
│ │ ├── rotate2D.ts
│ │ ├── invCalcDepth.ts
│ │ ├── minkowski2d.ts
│ │ ├── minkowski3d.ts
│ │ ├── phongSpecular.ts
│ │ ├── glslTri.ts
│ │ ├── tonemapACESNarkowicz.ts
│ │ ├── isectPlane.ts
│ │ ├── boxMuller.ts
│ │ ├── sdcapsule.ts
│ │ ├── vNeubelt.ts
│ │ ├── sdbox2.ts
│ │ ├── calcAlbedoF0.ts
│ │ ├── sdtorus.ts
│ │ ├── dGGX.ts
│ │ ├── orthBas.ts
│ │ ├── glslGradient.ts
│ │ ├── equimapUV.ts
│ │ ├── sortVec3Components.ts
│ │ ├── defDoSomethingUsingSamplerArray.ts
│ │ ├── glslLofi.ts
│ │ ├── uniformSphere.ts
│ │ ├── sdbox.ts
│ │ ├── setupRoRd.ts
│ │ ├── glslLofir.ts
│ │ ├── smax.ts
│ │ ├── smin.ts
│ │ ├── triplanarMapping.ts
│ │ ├── upsampleTap9.ts
│ │ ├── calcShadowDepth.ts
│ │ ├── cubemapUVMip.ts
│ │ ├── dCharlie.ts
│ │ ├── foldSortXYZ.ts
│ │ ├── sampleLambert.ts
│ │ ├── sdsellipse2.ts
│ │ ├── isectInBox.ts
│ │ ├── downsampleTap13.ts
│ │ ├── calcNormal.ts
│ │ ├── normalTransform.ts
│ │ ├── isectSphere.ts
│ │ ├── vGGX.ts
│ │ ├── glslLinearstep.ts
│ │ ├── isectBox.ts
│ │ ├── sampleGGX.ts
│ │ ├── glslSmootherstep.ts
│ │ ├── brdfSheen.ts
│ │ ├── tonemapACESHill.ts
│ │ ├── pcg2d.ts
│ │ ├── cyclicNoise.ts
│ │ ├── glslDefRandom.ts
│ │ ├── brdfClearcoat.ts
│ │ ├── pcg3d.ts
│ │ ├── voronoi3d.ts
│ │ ├── perlin2d.ts
│ │ ├── voronoi2d.ts
│ │ ├── turboColormap.ts
│ │ ├── forEachLights.ts
│ │ ├── pcg4d.ts
│ │ ├── calcSS.ts
│ │ └── liftGammaGain.ts
│ └── common
│ │ ├── colorFrag.ts
│ │ ├── uvFrag.ts
│ │ ├── depthFrag.ts
│ │ ├── dryFrag.ts
│ │ ├── textureFrag.ts
│ │ ├── quadVert.ts
│ │ ├── deferredUvFrag.ts
│ │ ├── deferredWhiteUnlitFrag.ts
│ │ ├── deferredColorFrag.ts
│ │ └── deferredTextureFrag.ts
├── config.ts
├── automaton.json.d.ts
├── heck
│ ├── utils
│ │ └── ancestorsToPath.ts
│ ├── RenderTarget.ts
│ ├── components
│ │ ├── LogTransform.ts
│ │ ├── Lambda.ts
│ │ └── SceneNode.ts
│ ├── CanvasRenderTarget.ts
│ ├── BufferMipmapTextureRenderTarget.ts
│ └── Dog.ts
├── textures
│ ├── shaders
│ │ ├── cellFrag.ts
│ │ └── perlinFBMFrag.ts
│ ├── cellTextureTarget.ts
│ └── perlinFBMTextureTarget.ts
├── webgl-memory.d.ts
└── geometries
│ └── genWireCube.ts
├── .env
├── .env.prod
├── index.html
├── .eslintignore
├── memo.md
├── .gitignore
├── tsconfig.json
├── terserMinifyOptions.ts
├── vite-plugins
├── vite-automaton-minifier-plugin.ts
└── vite-worklet-minifier-plugin.ts
├── package.json
└── vite.config.ts
/src/webxr.d.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.env:
--------------------------------------------------------------------------------
1 | NODE_ENV=development
2 | DEV=true
3 |
--------------------------------------------------------------------------------
/src/dummy.ts:
--------------------------------------------------------------------------------
1 | export default undefined;
2 |
--------------------------------------------------------------------------------
/.env.prod:
--------------------------------------------------------------------------------
1 | NODE_ENV=production
2 | DEV=false
3 |
--------------------------------------------------------------------------------
/src/nodes/common/UITag.ts:
--------------------------------------------------------------------------------
1 | export const UITag = Symbol();
2 |
--------------------------------------------------------------------------------
/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/utils/Observer.ts:
--------------------------------------------------------------------------------
1 | export type Observer = ( arg: T ) => void;
2 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | /dist/**
2 | /node_modules/**
3 | **/*.js
4 | vite.config.ts
5 | tests
6 |
--------------------------------------------------------------------------------
/src/globals/automaton-fxs/fxDefinitions.ts:
--------------------------------------------------------------------------------
1 | const fxDefinitions = {};
2 |
3 | export { fxDefinitions };
4 |
--------------------------------------------------------------------------------
/src/worklet.d.ts:
--------------------------------------------------------------------------------
1 | declare module '*?worklet' {
2 | const src: string;
3 | export default src;
4 | }
5 |
--------------------------------------------------------------------------------
/src/tweakpane-plugin-profiler.d.ts:
--------------------------------------------------------------------------------
1 | declare module '@0b5vr/tweakpane-plugin-profiler' {
2 | export class plugin {}
3 | }
4 |
--------------------------------------------------------------------------------
/src/globals/music.ts:
--------------------------------------------------------------------------------
1 | import { Music } from '../music/Music';
2 |
3 | const music: Music = new Music();
4 |
5 | export { music };
6 |
--------------------------------------------------------------------------------
/src/globals/glslMusicEditor.ts:
--------------------------------------------------------------------------------
1 | import { GLSLMusicEditor } from '../music/GLSLMusicEditor';
2 |
3 | export const glslMusicEditor = new GLSLMusicEditor();
4 |
--------------------------------------------------------------------------------
/src/gl/GLBlitFilter.ts:
--------------------------------------------------------------------------------
1 | import { GL_LINEAR, GL_NEAREST } from './constants';
2 |
3 | export type GLBlitFilter =
4 | | typeof GL_NEAREST
5 | | typeof GL_LINEAR;
6 |
--------------------------------------------------------------------------------
/src/globals/canvasRenderTarget.ts:
--------------------------------------------------------------------------------
1 | import { CanvasRenderTarget } from '../heck/CanvasRenderTarget';
2 |
3 | export const canvasRenderTarget = new CanvasRenderTarget();
4 |
--------------------------------------------------------------------------------
/src/globals/gui/NullMeasureHandler.ts:
--------------------------------------------------------------------------------
1 | export class NullMeasureHandler {
2 | public measure( fn: () => void ): number {
3 | fn();
4 | return 0.0;
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/music/GLSLMusicEditorRange.ts:
--------------------------------------------------------------------------------
1 | export type GLSLMusicEditorRange = [
2 | startLine: number,
3 | startRow: number,
4 | endLine: number,
5 | endRow: number,
6 | ];
7 |
--------------------------------------------------------------------------------
/src/utils/sleep.ts:
--------------------------------------------------------------------------------
1 | export function sleep( ms: number ): Promise {
2 | return new Promise( ( resolve ) => {
3 | setTimeout( () => resolve(), ms );
4 | } );
5 | }
6 |
--------------------------------------------------------------------------------
/src/gl/GLTextureMagFilterType.ts:
--------------------------------------------------------------------------------
1 | import { GL_LINEAR, GL_NEAREST } from './constants';
2 |
3 | export type GLTextureMagFilterType =
4 | | typeof GL_NEAREST
5 | | typeof GL_LINEAR;
6 |
--------------------------------------------------------------------------------
/src/globals/mixerTarget.ts:
--------------------------------------------------------------------------------
1 | import { BufferTextureRenderTarget } from '../heck/BufferTextureRenderTarget';
2 |
3 | export const mixerTarget = new BufferTextureRenderTarget( 4, 4 );
4 |
--------------------------------------------------------------------------------
/src/nodes/PlexusScene/constants.ts:
--------------------------------------------------------------------------------
1 | export const PLEXUS_PARTICLES_CBRT = 16;
2 | export const PLEXUS_PARTICLES
3 | = PLEXUS_PARTICLES_CBRT * PLEXUS_PARTICLES_CBRT * PLEXUS_PARTICLES_CBRT;
4 |
--------------------------------------------------------------------------------
/src/globals/moonTexGen.ts:
--------------------------------------------------------------------------------
1 | import { MoonTexGen } from '../nodes/MoonScene/MoonTexGen';
2 |
3 | export const moonTexGen = new MoonTexGen();
4 |
5 | export const moonTexture = moonTexGen.texture;
6 |
--------------------------------------------------------------------------------
/src/globals/zeroTexture.ts:
--------------------------------------------------------------------------------
1 | import { glCreateTexture } from '../gl/glCreateTexture';
2 |
3 | export const zeroTexture = glCreateTexture(
4 | 1,
5 | 1,
6 | new Uint8Array( [ 0, 0, 0, 0 ] ),
7 | );
8 |
--------------------------------------------------------------------------------
/src/shaders/modules/bayerMatrix4.ts:
--------------------------------------------------------------------------------
1 | import { mat4 } from '../shaderBuilder';
2 |
3 | export const bayerMatrix4 = mat4(
4 | 0, 8, 2, 10,
5 | 12, 4, 14, 6,
6 | 3, 11, 1, 9,
7 | 15, 7, 13, 5,
8 | );
9 |
--------------------------------------------------------------------------------
/src/config.ts:
--------------------------------------------------------------------------------
1 | export const
2 | AO_ITER = 16,
3 | IBLLUT_ITER = 400,
4 | IBLLUT_SIZE = 256,
5 | NEAR = 0.1,
6 | FAR = 30.0,
7 | RANDOM_TEXTURE_SIZE = 64,
8 | STATIC_RANDOM_TEXTURE_SIZE = 2048;
9 |
--------------------------------------------------------------------------------
/src/nodes/ParticlesRingScene/constants.ts:
--------------------------------------------------------------------------------
1 | export const PARTICLES_COUNT_SQRT = 256;
2 | export const PARTICLES_COUNT = PARTICLES_COUNT_SQRT * PARTICLES_COUNT_SQRT;
3 | export const PARTICLES_SPAWN_LENGTH = 4.0;
4 |
--------------------------------------------------------------------------------
/src/utils/genToken.ts:
--------------------------------------------------------------------------------
1 | export const genToken = ( tokenIndex: number ): string => (
2 | ( tokenIndex > 25 ? genToken( ~~( tokenIndex / 26 - 1 ) ) : '' ) + String.fromCharCode( ( tokenIndex % 26 ) + 97 )
3 | );
4 |
--------------------------------------------------------------------------------
/src/gl/GLCullFaceType.ts:
--------------------------------------------------------------------------------
1 | import { GL_BACK, GL_FRONT, GL_FRONT_AND_BACK } from './constants';
2 |
3 | export type GLCullFaceType =
4 | | typeof GL_BACK
5 | | typeof GL_FRONT
6 | | typeof GL_FRONT_AND_BACK;
7 |
--------------------------------------------------------------------------------
/src/nodes/TrailsScene/Trails/constants.ts:
--------------------------------------------------------------------------------
1 | export const TRAILS_COUNT = 1024;
2 | export const TRAILS_LENGTH = 64;
3 | export const REC_TRAILS_LENGTH = 1.0 / TRAILS_LENGTH;
4 | export const TRAILS_SPAWN_LENGTH = 2.0;
5 |
--------------------------------------------------------------------------------
/src/nodes/FluidScene/constants.ts:
--------------------------------------------------------------------------------
1 | export const GRID_RESO_SQRT = 10;
2 | export const GRID_RESO = GRID_RESO_SQRT * GRID_RESO_SQRT;
3 | export const BUFFER_RESO = GRID_RESO * GRID_RESO_SQRT;
4 | export const CURL = 8.0;
5 |
--------------------------------------------------------------------------------
/src/automaton.json.d.ts:
--------------------------------------------------------------------------------
1 | import type { SerializedAutomatonWithGUI } from '@0b5vr/automaton-with-gui';
2 |
3 | declare module './automaton.json' {
4 | const data: SerializedAutomatonWithGUI;
5 | export default data;
6 | }
7 |
--------------------------------------------------------------------------------
/src/utils/arraySetIntersects.ts:
--------------------------------------------------------------------------------
1 | import { arraySetHas } from '@0b5vr/experimental';
2 |
3 | export function arraySetIntersects( a: Array, b: Array ): boolean {
4 | return a.some( ( v ) => arraySetHas( b, v ) );
5 | }
6 |
--------------------------------------------------------------------------------
/memo.md:
--------------------------------------------------------------------------------
1 | ### SVG
2 |
3 | - Remove translation props from curves, usually can be done by applying union
4 | - `svgo -p 0 image.svg`
5 | - `