import { Expr, GpuShaderDefinition } from './contract'; /** * The single import point for shader definitions. A shader and its framework * component template import EVERYTHING they need from here (`@coreroot/gpu/porters`) — the * shader contract, the prop transforms, and the prop→GPU registration bridge — so * no shader ever reaches into individual gpu/ modules. * * - Shader definition files: `GpuShaderDefinition`, `GpuFragment`, `GpuUvRemap`, the KitExpr * types, `GpuPropField`, … (the contract). * - Framework component templates: `createGpuUniformsMap` (builds the registration input), * `GpuUniformsMap` / `GpuUniformInput` (its shape). * - Either, when authoring/adjusting props: `gpuTransformFor`, `transformColorGpu`, * `transformPositionGpu`, the scalar transforms, `colorStopsTransform`. * * (gpu/index.ts owns the renderer surface + the registration input types; this facade gives * shaders one place to import from.) */ export * from './contract'; export * from './transforms'; export { createGpuUniformsMap, type BridgeShaderDefinition } from './uniformBridge'; export type { GpuUniformsMap, GpuUniformInput } from './index'; export { expr, floatE, call, vec4, mixExpr, arrayExpr, asLocal, ZERO, WHITE0 } from './composer'; export { createGuardedCompute, type ComputeStep, type KitComputePipeline } from './compute'; export { createStateBuffer, createPingPongPair, createPingPong, type PingPongPair, type PingPong } from './compute'; export { createFeedbackTrailSim, type FeedbackTrailSim, type FeedbackTrailSimOptions } from './scaffolds/feedbackSim'; export { createLateBoundChildInput, type LateBoundChildInput } from './scaffolds/lateBoundChild'; export { debugWarn, debugError } from './support'; export { uvRemapShader, lerpToIdentity, selectMap, type UvMap, type UvMapResult, type UvMapped, type UvMapSource, type UvRemapHookParams, type UvRemapEdgeSource, type UvRemapShaderOptions, } from './scaffolds/uvRemapShader'; export { defineSdfShapeShader, type SdfShapeShaderSpec, type SdfShapeBounds } from './scaffolds/sdfShape'; export { definePointwiseFilter, isFilterIdentity, type PointwiseFilterConfig, type FilterBody, type FilterIdentity, type FilterParams, } from './scaffolds/pointwiseFilter'; export { defineRttFilter, type RttFilterConfig, type RttFilterParams } from './scaffolds/rttFilter'; export { createAgentSystem, readAgentFrame, makeCpuValueGetter, resolveDeviceTier, resolveRenderRes, clampAgentCount, energyCoverageAlpha, integrateSemiImplicitEuler, worldSplatWindow, texelSplatWindow, SplatWindow, SIZE_REF_RES, FIXED_POINT_GAINS, R2_ALPHA, R3_ALPHA, type AgentSystem, type AgentSystemConfig, type AgentPipelineSpec, type AgentThreads, type AgentFrame, type AgentFrameParams, type DeviceTier, } from './scaffolds/agentSystem'; export { buildStableFluidsKernels, buildFluidOutputKernel, createStableFluidsPasses, createFluidKernelPass, buildVelocityImpulseKernel, buildBrushSplatKernel, buildEmitterSplatKernel, buildNoiseFieldInitKernel, buildTrigTurbulenceKernel, buildNoiseRestoreKernel, makeShapeMaskSet, neighbourIndex, type StableFluidsOptions, type StableFluidsKernels, type StableFluidsPasses, type FluidSolverLayout, type FluidOutputLayout, type FluidSolveParams, type FluidDyeParams, type FluidStorageTexture, type FluidBoundary, type FluidDyeMode, } from './scaffolds/fluids'; export { buildSpectralHeightField, makeWaveEquationKernel, makeHeightFieldMarchKernel, createHeightFieldParamsUniform, createWaveStateBuffers, createKernelPass, waveEquationLayout, heightFieldMarchLayout, WAVE_GRID, WAVE_HALFEXTENT, CURSOR_WAVE_BOUND, WAVE_DECAY, WAVE_SETTLE_MS, MARCH_FAR, HEIGHT_SLAB_PAD, HEIGHT_FIELD_STATE_FORMAT, type HeightFieldMarchOptions, type HeightFieldParamsInput, type HeightFieldParamsUniform, } from './scaffolds/heightField'; export { createGridKernelPass, buildGrayScottStep, buildScatterSeedKernel, buildPairPublishKernel, buildOddEvenSortSet, makeAspectBrushWeight, buildFeedbackTrailStep, frameDiffMask, hueRotateTurns, buildMacroblockAdvectKernel, buildBlockQuantizeGraph, makeJpegBlockRgb, flowDirectionColor, type GridKernel, type GrayScottOptions, type ReactionDriveOptions, type OddEvenSortOptions, type FeedbackTrailOptions, type MacroblockAdvectOptions, type BlockQuantizeOptions, } from './scaffolds/gridKernels'; export { gaussianBrushSq, gaussianBrushShiftedSq, gaussianBrushRaw, gaussianBrushShifted, gaussianBrushFnSq, gaussianBrushFn, gaussianBrushShiftedSqFn, gaussianBrushShiftedFn, type GaussianBrushOptions, } from './scaffolds/simShared'; export { legacySinHash11 } from './scaffolds/shared'; /** * The invisible ROOT node's definition — the shared passthrough every runtime entry point * (framework engines, js `createShader`, `presetRenderer`) registers as the tree root. * * `shaderRendererGPU.registerNode` requires EVERY node — the root included — to carry a * component definition (the composer reads declarative flags off it), so the root cannot be * a lone fragment fn. This exports the whole definition; a caller registers it as * `registerNode(rootId, rootPassthrough.fragment, null, null, {}, rootPassthrough)`. The fragment * composites its children and returns transparent black when it has none. */ export declare const rootPassthrough: GpuShaderDefinition; /** * Per-node animated time. Returns an `Expr` reading this node's CPU-accumulated `_animTime` * field. * * The accumulation itself is the RENDERER's job, not the builder's: declare * `animatedTime: {speed: ''}` on the shader definition and the renderer registers * `_animTime` on the node struct and advances it every frame by `deltaTime * .value` * (speed=0 pauses, no rewind — see `GpuShaderDefinition.animatedTime` and `gpu/index.ts`). This * helper only wires the READ into the builder's Expr tree, so a port writes: * * ```ts * // definition: animatedTime: {speed: 'speed'} * const t = animatedTime(params) // → uni.$.uniforms.n_x._animTime * const body = call(myBody, 'my', [t, …]) * ``` * * @param params the `fragment` / `uvRemap` builder params (needs `props` + `uniforms`). * @param seedName optional seed prop — its uniform is ADDED to the field on the GPU; * the seed stays an ordinary uniform, so it is not part of the `animatedTime` * declaration. * @param fieldName the animated-time field to read (default `_animTime`, the primary clock). * Pass `_animTime_` to read an EXTRA clock declared via * `extraAnimatedTimes: {: ''}` (FlowField's evolution clock). */ export declare function animatedTime(params: { props: Expr; uniforms: Record; }, seedName?: string, fieldName?: string): Expr; //# sourceMappingURL=porters.d.ts.map