From 6fe98b333d351ee25f70bc8c0616d628883be412 Mon Sep 17 00:00:00 2001 From: CrispyPin Date: Sat, 29 Jul 2023 22:27:16 +0200 Subject: [PATCH] flesh cube changes idk --- Assets/test/FleshCube.shader | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/Assets/test/FleshCube.shader b/Assets/test/FleshCube.shader index 65c2f1c..b000374 100644 --- a/Assets/test/FleshCube.shader +++ b/Assets/test/FleshCube.shader @@ -26,7 +26,7 @@ // #define USE_WORLD_SPACE #define DYNAMIC_QUALITY #define USE_REFLECTIONS - #define CONSTRAIN_TO_MESH + // #define CONSTRAIN_TO_MESH #define MAX_REFLECTIONS 1 #include "RayMarchLib.cginc" @@ -58,11 +58,12 @@ o = sdfAdd(p, o, sdfSphere(p, 6 + bias*3, mRed), 5); // o = sdfInter(p, o, sdfSphere(p, 50, mat(0.04, 0.005, 0.035)), 1.1); - sdfData gyroid = o; - o = sdfAdd(p, - sdfInter(p, gyroid, sdfBox(p, 30, mRed)), - sdfSub(p, gyroid, sdfBox(p, 30, mRed)) - ); + o = sdfInter(p, o, sdfBox(p, 20, mRed)); + // sdfData gyroid = o; + // o = sdfAdd(p, + // sdfInter(p, gyroid, sdfBox(p, 30, mRed)), + // sdfSub(p, gyroid, sdfBox(p, 30, mRed)) + // ); // o = p, o, sdfBox(p, 20, mRed)); //sdfData bobby = sdfSphere(p, 51, col(0.5, 0.25, 0.001)); //bobby = sdfAdd(p, bobby, sdfSphere(p, 50.5, col(.5,.01,.01))); @@ -81,17 +82,18 @@ if (ray.bMissed) { // discard; - return fogCol; + // return fogCol; + return 0; } fixed4 col = 0; col += ray.mat.col * lightSun(ray.vNorm, vSunDir, col(5, 2, 0.1)); col += ray.mat.col * lightSky(ray.vNorm, 1); - col *= lightAO(ray.vHit, ray.vNorm, 0.05); + // col *= lightAO(ray.vHit, ray.vNorm, 0.05); - col = pow(col, 0.7); - col = lightFog(col, fogCol, ray.dist, 0.5, 16); + // col = pow(col, 0.7); + // col = lightFog(col, fogCol, ray.dist, 0.5, 16); return col; } ENDCG