cvr-props/Assets/raymarched/Interactive/raymarch_origin.shader

57 lines
938 B
Text
Raw Normal View History

2023-07-22 23:48:05 +02:00
Shader "CrispyPin/RaymarchOrigin"
2023-06-10 18:52:39 +02:00
{
Properties
{
[Header(Raymarcher Properties)]
_MaxSteps ("Max steps", Int) = 256
_MaxDist ("Max distance", Float) = 100
_SurfDist ("Surface distance threshold", Range(0.00001, 0.05)) = 0.001
}
SubShader
{
Tags { "RenderType"="Opaque" }
Cull Off
LOD 100
2023-06-17 21:13:30 +02:00
Pass
{
// TODO: does this even do anything? its supposed to be on by default
ZWrite On
CGPROGRAM
#pragma vertex vertex
#pragma fragment fragment
#define BASE_PASS
#include "raymarcher.cginc"
v2f vertex (appdata v){
return vert(v);
}
fragOut fragment (v2f i) {
return frag(i);
}
ENDCG
}
2023-06-10 18:52:39 +02:00
Pass
{
Tags { "LightMode" = "ForwardAdd"}
2023-06-17 21:13:30 +02:00
ZWrite On
2023-06-10 18:52:39 +02:00
CGPROGRAM
#pragma vertex vertex
#pragma fragment fragment
#include "raymarcher.cginc"
v2f vertex (appdata v){
return vert(v);
}
fragOut fragment (v2f i) {
return frag(i);
}
ENDCG
}
}
}