flesh cube changes idk

This commit is contained in:
Crispy 2023-07-29 22:27:16 +02:00
parent 3408d9ff8e
commit 6fe98b333d

View file

@ -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