cvr-props/Assets/raymarched/lib/libgarbage_example.shader

44 lines
711 B
Text

Shader "CrispyPin/LibGarbageExample"
{
Properties
{
[Header(Raymarcher Properties)]
_MaxSteps ("Max steps", Int) = 256
_MaxDist ("Max distance", Float) = 256
_SurfDist ("Surface distance threshold", Range(0.00001, 0.05)) = 0.001
}
SubShader
{
Tags { "RenderType"="Opaque" }
Cull Off
LOD 100
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "libgarbage.cginc"
// #define MAIN_FN(PASS) float3 main##PASS ()\
#define MAIN_FN(PASS) SOME_MAGIC(PASS,\
{\
return float3(1,0,0);\
}\
)
// #include "libgarbage_end.cginc"
// #define DO_MAGIC(p) MAIN_FN(p)
DO_MAGIC
// {return 0;}
// MAIN_FN(1) {return 0;}
ENDCG
}
}
}