////////////////////////////////////////////////////////////////////////// // // 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/NoiseBlitNone" { 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/None/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_NoneBillow( pos ); // return n; // } // ENDHLSL // } Pass // Billow Noise { Name "Billow Raw Noise Blit (2D)" HLSLPROGRAM #pragma vertex vert #pragma fragment frag #include "../NoiseLib/None/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_NoneBillow( pos3D ); return n; } ENDHLSL } Pass { Name "Billow Raw Noise Blit (3D)" HLSLPROGRAM #pragma vertex vert #pragma fragment frag #include "../NoiseLib/None/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_NoneBillow( pos ); return n; } ENDHLSL } // Pass // { // Name "Perlin Raw Noise Blit (2D)" // HLSLPROGRAM // #pragma vertex vert // #pragma fragment frag // #include "../NoiseLib//None/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_NonePerlin( pos ); // return n; // } // ENDHLSL // } Pass // Perlin Noise { Name "Perlin Raw Noise Blit (2D)" HLSLPROGRAM #pragma vertex vert #pragma fragment frag #include "../NoiseLib//None/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_NonePerlin( pos3D ); return n; } ENDHLSL } Pass { Name "Perlin Raw Noise Blit (3D)" HLSLPROGRAM #pragma vertex vert #pragma fragment frag #include "../NoiseLib//None/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_NonePerlin( pos ); return n; } ENDHLSL } // Pass // { // Name "Ridge Raw Noise Blit (2D)" // HLSLPROGRAM // #pragma vertex vert // #pragma fragment frag // #include "../NoiseLib//None/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_NoneRidge( pos ); // return n; // } // ENDHLSL // } Pass // Ridge Noise { Name "Ridge Raw Noise Blit (2D)" HLSLPROGRAM #pragma vertex vert #pragma fragment frag #include "../NoiseLib//None/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_NoneRidge( pos3D ); return n; } ENDHLSL } Pass { Name "Ridge Raw Noise Blit (3D)" HLSLPROGRAM #pragma vertex vert #pragma fragment frag #include "../NoiseLib//None/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_NoneRidge( pos ); return n; } ENDHLSL } // Pass // { // Name "Value Raw Noise Blit (2D)" // HLSLPROGRAM // #pragma vertex vert // #pragma fragment frag // #include "../NoiseLib//None/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_NoneValue( pos ); // return n; // } // ENDHLSL // } Pass // Value Noise { Name "Value Raw Noise Blit (2D)" HLSLPROGRAM #pragma vertex vert #pragma fragment frag #include "../NoiseLib//None/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_NoneValue( pos3D ); return n; } ENDHLSL } Pass { Name "Value Raw Noise Blit (3D)" HLSLPROGRAM #pragma vertex vert #pragma fragment frag #include "../NoiseLib//None/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_NoneValue( pos ); return n; } ENDHLSL } // Pass // { // Name "Voronoi Raw Noise Blit (2D)" // HLSLPROGRAM // #pragma vertex vert // #pragma fragment frag // #include "../NoiseLib//None/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_NoneVoronoi( pos ); // return n; // } // ENDHLSL // } Pass // Voronoi Noise { Name "Voronoi Raw Noise Blit (2D)" HLSLPROGRAM #pragma vertex vert #pragma fragment frag #include "../NoiseLib//None/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_NoneVoronoi( pos3D ); return n; } ENDHLSL } Pass { Name "Voronoi Raw Noise Blit (3D)" HLSLPROGRAM #pragma vertex vert #pragma fragment frag #include "../NoiseLib//None/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_NoneVoronoi( pos ); return n; } ENDHLSL } } }