This commit is contained in:
Crispy 2024-08-10 15:40:07 +02:00
parent 6d3ec4a19b
commit 35ebc03b6f
3 changed files with 9 additions and 18 deletions

View file

@ -1007,7 +1007,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
type: 3
objectId: dfb56a47-2b0b-4814-a4b0-950b5054b182
randomNum: 67679218
randomNum: 27659988
unityVersion: 2021.3.41f1
cckVersion: 3.10:132
--- !u!114 &649783671

View file

@ -57,7 +57,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints:
- _MaxSteps: 128
- _MaxSteps: 400
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
@ -66,7 +66,7 @@ Material:
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _MaxDist: 128
- _MaxDist: 1123.1
- _MaxSteps: 128
- _Metallic: 0
- _Mode: 0

View file

@ -1,12 +1,6 @@
Shader "CrispyPin/Loops"
{
Properties
{
[Header(Raymarcher Properties)]
_MaxSteps ("Max steps", Integer) = 128
_MaxDist ("Max distance", Float) = 128
_SurfDist ("Surface distance threshold", Range(.0001, .05)) = .001
}
Properties{}
SubShader
{
Tags { "RenderType"="Opaque" }
@ -19,15 +13,12 @@ Shader "CrispyPin/Loops"
#pragma vertex vert
#pragma fragment frag
int _MaxSteps;
float _MaxDist;
float _SurfDist;
#define MAX_STEPS _MaxSteps
#define MAX_DIST _MaxDist
#define SURF_DIST _SurfDist
#define MAX_STEPS 128
#define MAX_DIST 128
#define SURF_DIST 0.01
#define SCENE_FN main
#define SCENE_SCALE 0.04
#define SCENE_SCALE 0.045
#define DISCARD_ON_MISS
#include "lib/libgarbage.cginc"
@ -42,7 +33,7 @@ Shader "CrispyPin/Loops"
}
SurfacePoint Loop(float3 p, Material m = DEFAULT_MAT) {
return qSub(mBox(p, float3(2,4,6), m), mBox(p, float3(4,2,4)));
return qSub(mBox(p, float3(2, 4, 6), m), mBox(p, float3(3, 2, 4)));
}
Material lCol(float t) {