Files
spark/src/shaders.ts
T
Diego Marcos 3332f609a9 Initial commit
2025-05-24 00:14:53 -07:00

20 lines
483 B
TypeScript

import * as THREE from "three";
import splatDefines from "./shaders/splatDefines.glsl";
import splatFragment from "./shaders/splatFragment.glsl";
import splatVertex from "./shaders/splatVertex.glsl";
let shaders: Record<string, string> | null = null;
export function getShaders(): Record<string, string> {
if (!shaders) {
// @ts-ignore
THREE.ShaderChunk.splatDefines = splatDefines;
shaders = {
splatVertex,
splatFragment,
};
}
return shaders;
}