架构大更
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -109,7 +109,8 @@
|
||||
return 2.3 * n_xy;
|
||||
}
|
||||
|
||||
float NoiseManger(float2 st, int scale_x, int scale_y, float seed, float scale_value, int start_band, int end_band, float persistance, int type)
|
||||
float NoiseManger(float2 st, int scale_x, int scale_y, float seed, float scale_value, int start_band,
|
||||
int end_band, float persistance, int type)
|
||||
{
|
||||
float accum = 0.0;
|
||||
float sx = scale_x;
|
||||
@@ -120,7 +121,8 @@
|
||||
if (i >= start_band && i <= end_band)
|
||||
{
|
||||
if (type == 0)
|
||||
accum += (PerlinNoise(float3(st.x * sx, st.y * sy, seed), float3(sx, sy, 1000.)) * 0.5 + 0.5) * sv;
|
||||
accum += (PerlinNoise(float3(st.x * sx, st.y * sy, seed), float3(sx, sy, 1000.)) * 0.5 +
|
||||
0.5) * sv;
|
||||
else
|
||||
accum += abs(PerlinNoise(float3(st.x * sx, st.y * sy, seed), float3(sx, sy, 1000.))) * sv;
|
||||
sv *= persistance;
|
||||
@@ -143,8 +145,9 @@
|
||||
i.uv.x += _Offset * 1.3234;
|
||||
i.uv.y += _Offset * 0.8734;
|
||||
|
||||
float result = NoiseManger(i.uv, _ScaleX, _ScaleY, _Offset * 9745, 0.7, _StartBand, _EndBand, 0.5, 1 - _Fractal);
|
||||
if(_Invert) result = 1 - result;
|
||||
float result = NoiseManger(i.uv, _ScaleX, _ScaleY, _Offset * 9745, 0.7, _StartBand, _EndBand, 0.5,
|
||||
1 - _Fractal);
|
||||
if (_Invert) result = 1 - result;
|
||||
result = saturate((result - 0.5) * _Contrast + 0.5 + _Brightness);
|
||||
|
||||
return half4(result, result, result, 1);
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
Shader "AllIn1Vfx/Others/ZWrite"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
}
|
||||
Properties {}
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType"="Opaque" "RenderQueue"="Geometry+1"}
|
||||
Tags
|
||||
{
|
||||
"RenderType"="Opaque" "RenderQueue"="Geometry+1"
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user