mirror of
https://github.com/storytold/spark.git
synced 2026-10-18 00:22:59 +00:00
Initial commit
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user