Initial commit
This commit is contained in:
1 parent
ee9615239e
commit
16feac691f
4093 files changed
+1030491
No files matched your search
+445
@@ -0,0 +1,445 @@
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DO NOT EDIT THIS FILE!! THIS IS AUTOMATICALLY GENERATED!!
|
||||
// DO NOT EDIT THIS FILE!! THIS IS AUTOMATICALLY GENERATED!!
|
||||
// DO NOT EDIT THIS FILE!! THIS IS AUTOMATICALLY GENERATED!!
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Shader "Hidden/TerrainTools/Noise/NoiseBlit/NoiseBlitFbm"
|
||||
{
|
||||
Properties { _MainTex ("Texture", any) = "" {} }
|
||||
|
||||
SubShader
|
||||
{
|
||||
ZTest Always Cull OFF ZWrite Off
|
||||
|
||||
HLSLINCLUDE
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
sampler2D _MainTex;
|
||||
float4 _MainTex_TexelSize; // 1/width, 1/height, width, height
|
||||
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
v2f vert( appdata_t v )
|
||||
{
|
||||
v2f o;
|
||||
|
||||
o.vertex = UnityObjectToClipPos( v.vertex );
|
||||
o.uv = v.uv;
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
|
||||
|
||||
|
||||
// Pass
|
||||
// {
|
||||
// Name "Billow Raw Noise Blit (2D)"
|
||||
|
||||
// HLSLPROGRAM
|
||||
|
||||
// #pragma vertex vert
|
||||
// #pragma fragment frag
|
||||
|
||||
// #include "../NoiseLib/Fbm/Billow.hlsl"
|
||||
|
||||
// float4 frag( v2f i ) : SV_Target
|
||||
// {
|
||||
// float3 pos = ApplyNoiseTransform( float3(i.uv.x, 0, i.uv.y) - float3(.5, 0, .5) );
|
||||
|
||||
// float n = noise_FbmBillow( pos, GetFbmFractalInput() );
|
||||
|
||||
// return n;
|
||||
// }
|
||||
|
||||
// ENDHLSL
|
||||
// }
|
||||
|
||||
Pass // Billow Noise
|
||||
{
|
||||
Name "Billow Raw Noise Blit (2D)"
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "../NoiseLib/Fbm/Billow.hlsl"
|
||||
|
||||
float4 frag( v2f i ) : SV_Target
|
||||
{
|
||||
// calc pos for center of pixel
|
||||
float3 uv = float3( i.uv.x, 0, i.uv.y ) - float3( .5, 0, .5 );
|
||||
uv += + float3(.5, 0, .5) * _MainTex_TexelSize.xxy; // offset by half a texel so we are sampling noise for the center of the texel
|
||||
|
||||
float3 pos3D = ApplyNoiseTransform( uv.xyz );
|
||||
float2 pos2D = ApplyNoiseTransform( uv.xz );
|
||||
|
||||
float n = noise_FbmBillow( pos3D, GetFbmFractalInput() );
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Billow Raw Noise Blit (3D)"
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "../NoiseLib/Fbm/Billow.hlsl"
|
||||
|
||||
float _UVY;
|
||||
|
||||
float4 frag( v2f i ) : SV_Target
|
||||
{
|
||||
float3 pos = ApplyNoiseTransform( float3(i.uv.x, _UVY, i.uv.y) - float3(.5, 0, .5) );
|
||||
|
||||
float n = noise_FbmBillow( pos, GetFbmFractalInput() );
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Pass
|
||||
// {
|
||||
// Name "Perlin Raw Noise Blit (2D)"
|
||||
|
||||
// HLSLPROGRAM
|
||||
|
||||
// #pragma vertex vert
|
||||
// #pragma fragment frag
|
||||
|
||||
// #include "../NoiseLib//Fbm/Perlin.hlsl"
|
||||
|
||||
// float4 frag( v2f i ) : SV_Target
|
||||
// {
|
||||
// float3 pos = ApplyNoiseTransform( float3(i.uv.x, 0, i.uv.y) - float3(.5, 0, .5) );
|
||||
|
||||
// float n = noise_FbmPerlin( pos, GetFbmFractalInput() );
|
||||
|
||||
// return n;
|
||||
// }
|
||||
|
||||
// ENDHLSL
|
||||
// }
|
||||
|
||||
Pass // Perlin Noise
|
||||
{
|
||||
Name "Perlin Raw Noise Blit (2D)"
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "../NoiseLib//Fbm/Perlin.hlsl"
|
||||
|
||||
float4 frag( v2f i ) : SV_Target
|
||||
{
|
||||
// calc pos for center of pixel
|
||||
float3 uv = float3( i.uv.x, 0, i.uv.y ) - float3( .5, 0, .5 );
|
||||
uv += + float3(.5, 0, .5) * _MainTex_TexelSize.xxy; // offset by half a texel so we are sampling noise for the center of the texel
|
||||
|
||||
float3 pos3D = ApplyNoiseTransform( uv.xyz );
|
||||
float2 pos2D = ApplyNoiseTransform( uv.xz );
|
||||
|
||||
float n = noise_FbmPerlin( pos3D, GetFbmFractalInput() );
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Perlin Raw Noise Blit (3D)"
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "../NoiseLib//Fbm/Perlin.hlsl"
|
||||
|
||||
float _UVY;
|
||||
|
||||
float4 frag( v2f i ) : SV_Target
|
||||
{
|
||||
float3 pos = ApplyNoiseTransform( float3(i.uv.x, _UVY, i.uv.y) - float3(.5, 0, .5) );
|
||||
|
||||
float n = noise_FbmPerlin( pos, GetFbmFractalInput() );
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Pass
|
||||
// {
|
||||
// Name "Ridge Raw Noise Blit (2D)"
|
||||
|
||||
// HLSLPROGRAM
|
||||
|
||||
// #pragma vertex vert
|
||||
// #pragma fragment frag
|
||||
|
||||
// #include "../NoiseLib//Fbm/Ridge.hlsl"
|
||||
|
||||
// float4 frag( v2f i ) : SV_Target
|
||||
// {
|
||||
// float3 pos = ApplyNoiseTransform( float3(i.uv.x, 0, i.uv.y) - float3(.5, 0, .5) );
|
||||
|
||||
// float n = noise_FbmRidge( pos, GetFbmFractalInput() );
|
||||
|
||||
// return n;
|
||||
// }
|
||||
|
||||
// ENDHLSL
|
||||
// }
|
||||
|
||||
Pass // Ridge Noise
|
||||
{
|
||||
Name "Ridge Raw Noise Blit (2D)"
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "../NoiseLib//Fbm/Ridge.hlsl"
|
||||
|
||||
float4 frag( v2f i ) : SV_Target
|
||||
{
|
||||
// calc pos for center of pixel
|
||||
float3 uv = float3( i.uv.x, 0, i.uv.y ) - float3( .5, 0, .5 );
|
||||
uv += + float3(.5, 0, .5) * _MainTex_TexelSize.xxy; // offset by half a texel so we are sampling noise for the center of the texel
|
||||
|
||||
float3 pos3D = ApplyNoiseTransform( uv.xyz );
|
||||
float2 pos2D = ApplyNoiseTransform( uv.xz );
|
||||
|
||||
float n = noise_FbmRidge( pos3D, GetFbmFractalInput() );
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Ridge Raw Noise Blit (3D)"
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "../NoiseLib//Fbm/Ridge.hlsl"
|
||||
|
||||
float _UVY;
|
||||
|
||||
float4 frag( v2f i ) : SV_Target
|
||||
{
|
||||
float3 pos = ApplyNoiseTransform( float3(i.uv.x, _UVY, i.uv.y) - float3(.5, 0, .5) );
|
||||
|
||||
float n = noise_FbmRidge( pos, GetFbmFractalInput() );
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Pass
|
||||
// {
|
||||
// Name "Value Raw Noise Blit (2D)"
|
||||
|
||||
// HLSLPROGRAM
|
||||
|
||||
// #pragma vertex vert
|
||||
// #pragma fragment frag
|
||||
|
||||
// #include "../NoiseLib//Fbm/Value.hlsl"
|
||||
|
||||
// float4 frag( v2f i ) : SV_Target
|
||||
// {
|
||||
// float3 pos = ApplyNoiseTransform( float3(i.uv.x, 0, i.uv.y) - float3(.5, 0, .5) );
|
||||
|
||||
// float n = noise_FbmValue( pos, GetFbmFractalInput() );
|
||||
|
||||
// return n;
|
||||
// }
|
||||
|
||||
// ENDHLSL
|
||||
// }
|
||||
|
||||
Pass // Value Noise
|
||||
{
|
||||
Name "Value Raw Noise Blit (2D)"
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "../NoiseLib//Fbm/Value.hlsl"
|
||||
|
||||
float4 frag( v2f i ) : SV_Target
|
||||
{
|
||||
// calc pos for center of pixel
|
||||
float3 uv = float3( i.uv.x, 0, i.uv.y ) - float3( .5, 0, .5 );
|
||||
uv += + float3(.5, 0, .5) * _MainTex_TexelSize.xxy; // offset by half a texel so we are sampling noise for the center of the texel
|
||||
|
||||
float3 pos3D = ApplyNoiseTransform( uv.xyz );
|
||||
float2 pos2D = ApplyNoiseTransform( uv.xz );
|
||||
|
||||
float n = noise_FbmValue( pos3D, GetFbmFractalInput() );
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Value Raw Noise Blit (3D)"
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "../NoiseLib//Fbm/Value.hlsl"
|
||||
|
||||
float _UVY;
|
||||
|
||||
float4 frag( v2f i ) : SV_Target
|
||||
{
|
||||
float3 pos = ApplyNoiseTransform( float3(i.uv.x, _UVY, i.uv.y) - float3(.5, 0, .5) );
|
||||
|
||||
float n = noise_FbmValue( pos, GetFbmFractalInput() );
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Pass
|
||||
// {
|
||||
// Name "Voronoi Raw Noise Blit (2D)"
|
||||
|
||||
// HLSLPROGRAM
|
||||
|
||||
// #pragma vertex vert
|
||||
// #pragma fragment frag
|
||||
|
||||
// #include "../NoiseLib//Fbm/Voronoi.hlsl"
|
||||
|
||||
// float4 frag( v2f i ) : SV_Target
|
||||
// {
|
||||
// float3 pos = ApplyNoiseTransform( float3(i.uv.x, 0, i.uv.y) - float3(.5, 0, .5) );
|
||||
|
||||
// float n = noise_FbmVoronoi( pos, GetFbmFractalInput() );
|
||||
|
||||
// return n;
|
||||
// }
|
||||
|
||||
// ENDHLSL
|
||||
// }
|
||||
|
||||
Pass // Voronoi Noise
|
||||
{
|
||||
Name "Voronoi Raw Noise Blit (2D)"
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "../NoiseLib//Fbm/Voronoi.hlsl"
|
||||
|
||||
float4 frag( v2f i ) : SV_Target
|
||||
{
|
||||
// calc pos for center of pixel
|
||||
float3 uv = float3( i.uv.x, 0, i.uv.y ) - float3( .5, 0, .5 );
|
||||
uv += + float3(.5, 0, .5) * _MainTex_TexelSize.xxy; // offset by half a texel so we are sampling noise for the center of the texel
|
||||
|
||||
float3 pos3D = ApplyNoiseTransform( uv.xyz );
|
||||
float2 pos2D = ApplyNoiseTransform( uv.xz );
|
||||
|
||||
float n = noise_FbmVoronoi( pos3D, GetFbmFractalInput() );
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Voronoi Raw Noise Blit (3D)"
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "../NoiseLib//Fbm/Voronoi.hlsl"
|
||||
|
||||
float _UVY;
|
||||
|
||||
float4 frag( v2f i ) : SV_Target
|
||||
{
|
||||
float3 pos = ApplyNoiseTransform( float3(i.uv.x, _UVY, i.uv.y) - float3(.5, 0, .5) );
|
||||
|
||||
float n = noise_FbmVoronoi( pos, GetFbmFractalInput() );
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user