Upload project files
This commit is contained in:
59
Shader/Include/Common/NoiseCommon.hlsl
Normal file
59
Shader/Include/Common/NoiseCommon.hlsl
Normal file
@@ -0,0 +1,59 @@
|
||||
float wglnoise_mod(float x, float y)
|
||||
{
|
||||
return x - y * floor(x / y);
|
||||
}
|
||||
|
||||
float2 wglnoise_mod(float2 x, float2 y)
|
||||
{
|
||||
return x - y * floor(x / y);
|
||||
}
|
||||
|
||||
float3 wglnoise_mod(float3 x, float3 y)
|
||||
{
|
||||
return x - y * floor(x / y);
|
||||
}
|
||||
|
||||
float4 wglnoise_mod(float4 x, float4 y)
|
||||
{
|
||||
return x - y * floor(x / y);
|
||||
}
|
||||
|
||||
float2 wglnoise_fade(float2 t)
|
||||
{
|
||||
return t * t * t * (t * (t * 6 - 15) + 10);
|
||||
}
|
||||
|
||||
float3 wglnoise_fade(float3 t)
|
||||
{
|
||||
return t * t * t * (t * (t * 6 - 15) + 10);
|
||||
}
|
||||
|
||||
float wglnoise_mod289(float x)
|
||||
{
|
||||
return x - floor(x / 289) * 289;
|
||||
}
|
||||
|
||||
float2 wglnoise_mod289(float2 x)
|
||||
{
|
||||
return x - floor(x / 289) * 289;
|
||||
}
|
||||
|
||||
float3 wglnoise_mod289(float3 x)
|
||||
{
|
||||
return x - floor(x / 289) * 289;
|
||||
}
|
||||
|
||||
float4 wglnoise_mod289(float4 x)
|
||||
{
|
||||
return x - floor(x / 289) * 289;
|
||||
}
|
||||
|
||||
float3 wglnoise_permute(float3 x)
|
||||
{
|
||||
return wglnoise_mod289((x * 34 + 1) * x);
|
||||
}
|
||||
|
||||
float4 wglnoise_permute(float4 x)
|
||||
{
|
||||
return wglnoise_mod289((x * 34 + 1) * x);
|
||||
}
|
||||
7
Shader/Include/Common/NoiseCommon.hlsl.meta
Normal file
7
Shader/Include/Common/NoiseCommon.hlsl.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ab1c13ca725af4e42bb92eca00cb93e8
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user