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]
|
||||
_LastFrame ("Render texture", 2D) = "white" {}
|
||||
_Rule("Rule", Int) = 110
|
||||
_Rule("Rule", Integer) = 110
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
|
@ -48,7 +48,7 @@
|
|||
{
|
||||
const uint x = (p.x + dx) % 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
|
||||
|
@ -60,13 +60,12 @@
|
|||
return state(p, 0, 0);
|
||||
}
|
||||
int permutation =
|
||||
(state(p, -1, 1)<<2) |
|
||||
(state(p, 0, 1)<<1) |
|
||||
state(p, 1, 1);
|
||||
(state(p, -1, 1) << 2) |
|
||||
(state(p, 0, 1) << 1) |
|
||||
state(p, 1, 1);
|
||||
|
||||
float next = (_Rule >> permutation) & 1;
|
||||
return float3(i.uv * next, next * (_SinTime.y * 0.4 + 0.6));
|
||||
// return next;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{
|
||||
_LastFrame ("Texture", 2D) = "white" {}
|
||||
[Toggle]
|
||||
_Running ("Running", Int) = 0
|
||||
_Running ("Running", Integer) = 0
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
Properties
|
||||
{
|
||||
[Header(Raymarcher Properties)]
|
||||
_MaxSteps ("Max steps", Int) = 256
|
||||
_MaxSteps ("Max steps", Integer) = 256
|
||||
_MaxDist ("Max distance", Float) = 100
|
||||
_SurfDist ("Surface distance threshold", Range(0.00001, 0.05)) = 0.001
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
Properties
|
||||
{
|
||||
[Header(Raymarcher Properties)]
|
||||
_MaxSteps ("Max steps", Int) = 256
|
||||
_MaxSteps ("Max steps", Integer) = 256
|
||||
_MaxDist ("Max distance", Float) = 100
|
||||
_SurfDist ("Surface distance threshold", Range(0.00001, 0.05)) = 0.001
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
_ObjectA ("Object A", Vector) = (0, 0, 0)
|
||||
_ObjectB ("Object B", Vector) = (0, 0, 0)
|
||||
[Header(Raymarcher Properties)]
|
||||
_MaxSteps ("Max steps", Int) = 256
|
||||
_MaxSteps ("Max steps", Integer) = 256
|
||||
_MaxDist ("Max distance", Float) = 100
|
||||
_SurfDist ("Surface distance threshold", Range(0.00001, 0.05)) = 0.001
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
Properties
|
||||
{
|
||||
[Header(Raymarcher Properties)]
|
||||
_MaxSteps ("Max steps", Int) = 128
|
||||
_MaxSteps ("Max steps", Integer) = 128
|
||||
_MaxDist ("Max distance", Float) = 128
|
||||
_SurfDist ("Surface distance threshold", Range(0.0001, 0.05)) = 0.001
|
||||
[Header(Sky)]
|
||||
|
|
|
@ -3,7 +3,7 @@ Shader "CrispyPin/Distortion"
|
|||
Properties
|
||||
{
|
||||
[Header(Raymarcher Properties)]
|
||||
_MaxSteps ("Max steps", Int) = 128
|
||||
_MaxSteps ("Max steps", Integer) = 128
|
||||
_MaxDist ("Max distance", Float) = 128
|
||||
_SurfDist ("Surface distance threshold", Range(0.0001, 0.05)) = 0.001
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ Shader "CrispyPin/Gyroid"
|
|||
Properties
|
||||
{
|
||||
[Header(Raymarcher Properties)]
|
||||
_MaxSteps ("Max steps", Int) = 128
|
||||
_MaxSteps ("Max steps", Integer) = 128
|
||||
_MaxDist ("Max distance", Float) = 128
|
||||
_SurfDist ("Surface distance threshold", Range(0.0001, 0.05)) = 0.001
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ Shader "CrispyPin/LibGarbageExample"
|
|||
Properties
|
||||
{
|
||||
[Header(Raymarcher Properties)]
|
||||
_MaxSteps ("Max steps", Int) = 128
|
||||
_MaxSteps ("Max steps", Integer) = 128
|
||||
_MaxDist ("Max distance", Float) = 128
|
||||
_SurfDist ("Surface distance threshold", Range(0.0001, 0.05)) = 0.001
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ Shader "CrispyPin/Nut"
|
|||
Properties
|
||||
{
|
||||
[Header(Raymarcher Properties)]
|
||||
_MaxSteps ("Max steps", Int) = 128
|
||||
_MaxSteps ("Max steps", Integer) = 128
|
||||
_MaxDist ("Max distance", Float) = 128
|
||||
_SurfDist ("Surface distance threshold", Range(0.0001, 0.05)) = 0.001
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ Shader "CrispyPin/LibGarbageSpinny"
|
|||
Properties
|
||||
{
|
||||
[Header(Raymarcher Properties)]
|
||||
_MaxSteps ("Max steps", Int) = 128
|
||||
_MaxSteps ("Max steps", Integer) = 128
|
||||
_MaxDist ("Max distance", Float) = 128
|
||||
_SurfDist ("Surface distance threshold", Range(0.0001, 0.05)) = 0.001
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
_SunPos ("Sun position", Vector) = (8, 4, 2)
|
||||
|
||||
[Header(Raymarcher Properties)]
|
||||
_MaxSteps ("Max steps", Int) = 256
|
||||
_MaxSteps ("Max steps", Integer) = 256
|
||||
_MaxDist ("Max distance", Float) = 256
|
||||
_SurfDist ("Surface distance threshold", Range(0.00001, 0.05)) = 0.001
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
_SunPos ("Sun position", Vector) = (8, 4, 2)
|
||||
|
||||
[Header(Raymarcher Properties)]
|
||||
_MaxSteps ("Max steps", Int) = 256
|
||||
_MaxSteps ("Max steps", Integer) = 256
|
||||
_MaxDist ("Max distance", Float) = 256
|
||||
_SurfDist ("Surface distance threshold", Range(0.00001, 0.05)) = 0.001
|
||||
|
||||
|
|
Loading…
Reference in a new issue