export function getTerrainHeight(
    localX: number,
    localZ: number,
    worldXBase: number,
    worldZBase: number,
    scale: number,
    hillScale: number,
    hillHeight: number,
    detailScale: number,
    detailHeight: number,
    noise2D: (x: number, y: number) => number
) {
    const worldX = (worldXBase + localX) * 0.1;
    const worldZ = (worldZBase + localZ) * 0.1;

    const noiseHill =
        noise2D(worldX * hillScale, worldZ * hillScale) * hillHeight;
    const noiseDetail =
        noise2D(worldX * detailScale, worldZ * detailScale) * detailHeight;

    return (noiseHill + noiseDetail) * scale;
}

export interface Shader {
	uniforms: { [key: string]: { value: unknown } };
	vertexShader: string;
	fragmentShader: string;
}
