shader integers
This commit is contained in:
parent
03e407c1eb
commit
039d6b2540
13 changed files with 17 additions and 18 deletions
|
@ -4,7 +4,7 @@
|
||||||
{
|
{
|
||||||
[NoScaleOffset]
|
[NoScaleOffset]
|
||||||
_LastFrame ("Render texture", 2D) = "white" {}
|
_LastFrame ("Render texture", 2D) = "white" {}
|
||||||
_Rule("Rule", Int) = 110
|
_Rule("Rule", Integer) = 110
|
||||||
}
|
}
|
||||||
SubShader
|
SubShader
|
||||||
{
|
{
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
{
|
{
|
||||||
const uint x = (p.x + dx) % WIDTH;
|
const uint x = (p.x + dx) % WIDTH;
|
||||||
const uint y = (p.y + dy) % WIDTH;
|
const uint y = (p.y + dy) % WIDTH;
|
||||||
return _LastFrame[uint2(x, y)].b > 0;
|
return _LastFrame[uint2(x, y)].b > 0.1;
|
||||||
}
|
}
|
||||||
|
|
||||||
float3 frag (v2f i) : SV_Target
|
float3 frag (v2f i) : SV_Target
|
||||||
|
@ -66,7 +66,6 @@
|
||||||
|
|
||||||
float next = (_Rule >> permutation) & 1;
|
float next = (_Rule >> permutation) & 1;
|
||||||
return float3(i.uv * next, next * (_SinTime.y * 0.4 + 0.6));
|
return float3(i.uv * next, next * (_SinTime.y * 0.4 + 0.6));
|
||||||
// return next;
|
|
||||||
}
|
}
|
||||||
ENDCG
|
ENDCG
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
{
|
{
|
||||||
_LastFrame ("Texture", 2D) = "white" {}
|
_LastFrame ("Texture", 2D) = "white" {}
|
||||||
[Toggle]
|
[Toggle]
|
||||||
_Running ("Running", Int) = 0
|
_Running ("Running", Integer) = 0
|
||||||
}
|
}
|
||||||
SubShader
|
SubShader
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
Properties
|
Properties
|
||||||
{
|
{
|
||||||
[Header(Raymarcher Properties)]
|
[Header(Raymarcher Properties)]
|
||||||
_MaxSteps ("Max steps", Int) = 256
|
_MaxSteps ("Max steps", Integer) = 256
|
||||||
_MaxDist ("Max distance", Float) = 100
|
_MaxDist ("Max distance", Float) = 100
|
||||||
_SurfDist ("Surface distance threshold", Range(0.00001, 0.05)) = 0.001
|
_SurfDist ("Surface distance threshold", Range(0.00001, 0.05)) = 0.001
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
Properties
|
Properties
|
||||||
{
|
{
|
||||||
[Header(Raymarcher Properties)]
|
[Header(Raymarcher Properties)]
|
||||||
_MaxSteps ("Max steps", Int) = 256
|
_MaxSteps ("Max steps", Integer) = 256
|
||||||
_MaxDist ("Max distance", Float) = 100
|
_MaxDist ("Max distance", Float) = 100
|
||||||
_SurfDist ("Surface distance threshold", Range(0.00001, 0.05)) = 0.001
|
_SurfDist ("Surface distance threshold", Range(0.00001, 0.05)) = 0.001
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
_ObjectA ("Object A", Vector) = (0, 0, 0)
|
_ObjectA ("Object A", Vector) = (0, 0, 0)
|
||||||
_ObjectB ("Object B", Vector) = (0, 0, 0)
|
_ObjectB ("Object B", Vector) = (0, 0, 0)
|
||||||
[Header(Raymarcher Properties)]
|
[Header(Raymarcher Properties)]
|
||||||
_MaxSteps ("Max steps", Int) = 256
|
_MaxSteps ("Max steps", Integer) = 256
|
||||||
_MaxDist ("Max distance", Float) = 100
|
_MaxDist ("Max distance", Float) = 100
|
||||||
_SurfDist ("Surface distance threshold", Range(0.00001, 0.05)) = 0.001
|
_SurfDist ("Surface distance threshold", Range(0.00001, 0.05)) = 0.001
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
Properties
|
Properties
|
||||||
{
|
{
|
||||||
[Header(Raymarcher Properties)]
|
[Header(Raymarcher Properties)]
|
||||||
_MaxSteps ("Max steps", Int) = 128
|
_MaxSteps ("Max steps", Integer) = 128
|
||||||
_MaxDist ("Max distance", Float) = 128
|
_MaxDist ("Max distance", Float) = 128
|
||||||
_SurfDist ("Surface distance threshold", Range(0.0001, 0.05)) = 0.001
|
_SurfDist ("Surface distance threshold", Range(0.0001, 0.05)) = 0.001
|
||||||
[Header(Sky)]
|
[Header(Sky)]
|
||||||
|
|
|
@ -3,7 +3,7 @@ Shader "CrispyPin/Distortion"
|
||||||
Properties
|
Properties
|
||||||
{
|
{
|
||||||
[Header(Raymarcher Properties)]
|
[Header(Raymarcher Properties)]
|
||||||
_MaxSteps ("Max steps", Int) = 128
|
_MaxSteps ("Max steps", Integer) = 128
|
||||||
_MaxDist ("Max distance", Float) = 128
|
_MaxDist ("Max distance", Float) = 128
|
||||||
_SurfDist ("Surface distance threshold", Range(0.0001, 0.05)) = 0.001
|
_SurfDist ("Surface distance threshold", Range(0.0001, 0.05)) = 0.001
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ Shader "CrispyPin/Gyroid"
|
||||||
Properties
|
Properties
|
||||||
{
|
{
|
||||||
[Header(Raymarcher Properties)]
|
[Header(Raymarcher Properties)]
|
||||||
_MaxSteps ("Max steps", Int) = 128
|
_MaxSteps ("Max steps", Integer) = 128
|
||||||
_MaxDist ("Max distance", Float) = 128
|
_MaxDist ("Max distance", Float) = 128
|
||||||
_SurfDist ("Surface distance threshold", Range(0.0001, 0.05)) = 0.001
|
_SurfDist ("Surface distance threshold", Range(0.0001, 0.05)) = 0.001
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ Shader "CrispyPin/LibGarbageExample"
|
||||||
Properties
|
Properties
|
||||||
{
|
{
|
||||||
[Header(Raymarcher Properties)]
|
[Header(Raymarcher Properties)]
|
||||||
_MaxSteps ("Max steps", Int) = 128
|
_MaxSteps ("Max steps", Integer) = 128
|
||||||
_MaxDist ("Max distance", Float) = 128
|
_MaxDist ("Max distance", Float) = 128
|
||||||
_SurfDist ("Surface distance threshold", Range(0.0001, 0.05)) = 0.001
|
_SurfDist ("Surface distance threshold", Range(0.0001, 0.05)) = 0.001
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ Shader "CrispyPin/Nut"
|
||||||
Properties
|
Properties
|
||||||
{
|
{
|
||||||
[Header(Raymarcher Properties)]
|
[Header(Raymarcher Properties)]
|
||||||
_MaxSteps ("Max steps", Int) = 128
|
_MaxSteps ("Max steps", Integer) = 128
|
||||||
_MaxDist ("Max distance", Float) = 128
|
_MaxDist ("Max distance", Float) = 128
|
||||||
_SurfDist ("Surface distance threshold", Range(0.0001, 0.05)) = 0.001
|
_SurfDist ("Surface distance threshold", Range(0.0001, 0.05)) = 0.001
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ Shader "CrispyPin/LibGarbageSpinny"
|
||||||
Properties
|
Properties
|
||||||
{
|
{
|
||||||
[Header(Raymarcher Properties)]
|
[Header(Raymarcher Properties)]
|
||||||
_MaxSteps ("Max steps", Int) = 128
|
_MaxSteps ("Max steps", Integer) = 128
|
||||||
_MaxDist ("Max distance", Float) = 128
|
_MaxDist ("Max distance", Float) = 128
|
||||||
_SurfDist ("Surface distance threshold", Range(0.0001, 0.05)) = 0.001
|
_SurfDist ("Surface distance threshold", Range(0.0001, 0.05)) = 0.001
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
_SunPos ("Sun position", Vector) = (8, 4, 2)
|
_SunPos ("Sun position", Vector) = (8, 4, 2)
|
||||||
|
|
||||||
[Header(Raymarcher Properties)]
|
[Header(Raymarcher Properties)]
|
||||||
_MaxSteps ("Max steps", Int) = 256
|
_MaxSteps ("Max steps", Integer) = 256
|
||||||
_MaxDist ("Max distance", Float) = 256
|
_MaxDist ("Max distance", Float) = 256
|
||||||
_SurfDist ("Surface distance threshold", Range(0.00001, 0.05)) = 0.001
|
_SurfDist ("Surface distance threshold", Range(0.00001, 0.05)) = 0.001
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
_SunPos ("Sun position", Vector) = (8, 4, 2)
|
_SunPos ("Sun position", Vector) = (8, 4, 2)
|
||||||
|
|
||||||
[Header(Raymarcher Properties)]
|
[Header(Raymarcher Properties)]
|
||||||
_MaxSteps ("Max steps", Int) = 256
|
_MaxSteps ("Max steps", Integer) = 256
|
||||||
_MaxDist ("Max distance", Float) = 256
|
_MaxDist ("Max distance", Float) = 256
|
||||||
_SurfDist ("Surface distance threshold", Range(0.00001, 0.05)) = 0.001
|
_SurfDist ("Surface distance threshold", Range(0.00001, 0.05)) = 0.001
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue