diff --git a/components/calc/models.vue b/components/calc/models.vue
index 519e0a1..54dd81e 100644
--- a/components/calc/models.vue
+++ b/components/calc/models.vue
@@ -1,7 +1,10 @@
-
+
diff --git a/utils/gauss_material.ts b/utils/gauss_material.ts
new file mode 100644
index 0000000..be2110a
--- /dev/null
+++ b/utils/gauss_material.ts
@@ -0,0 +1,38 @@
+import { ShadowMaterial, type WebGLProgramParameters } from "three";
+
+const gaussMaterial = new ShadowMaterial()
+
+gaussMaterial.onBeforeCompile = (shader: WebGLProgramParameters) => {
+ // Изменяем фрагментный шейдер
+ console.log(shader.fragmentShader)
+ shader.fragmentShader = `
+ float gaussian(float x, float sigma) {
+ return (1.0 / (sqrt(2.0 * 3.14159265) * sigma)) * exp(-0.5 * (x * x) / (sigma * sigma));
+ }
+ ${shader.fragmentShader}`
+ .replace(
+ `#include `,
+ `#include
+ // Add Gaussian blur logic here
+ vec4 blurColor = vec4(0.0);
+ vec4 test = vec4(0.0);
+ float totalWeight = 0.0;
+ const int blurRadius = 1; // Adjust for more or less blur
+
+ for (int x = -blurRadius; x <= blurRadius; x++) {
+ for (int y = -blurRadius; y <= blurRadius; y++) {
+ // Используем gaussian для вычисления веса
+ float weight = gaussian(float(sqrt(float(x * x + y * y))), float(blurRadius));
+ // Получаем цвет текстуры с учетом смещения
+ blurColor += texture2D(pointShadowMap[0], gl_FragCoord.xy + vec2(float(x), float(y))) * weight;
+ totalWeight += weight;
+ }
+ }
+
+ blurColor /= totalWeight;
+ gl_FragColor = vec4(texture2D(pointShadowMap[0], vec2(-1.0,1.0)));
+
+ `);
+}
+
+export default gaussMaterial
\ No newline at end of file