You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
734 B
Plaintext

/******************************************************************************/
/*
Project - MudBun
Publisher - Long Bunny Labs
http://LongBunnyLabs.com
Author - Ming-Lun "Allen" Chou
http://AllenChou.net
*/
/******************************************************************************/
#ifndef MUDBUN_NOISE_GRADIENT
#define MUDBUN_NOISE_GRADIENT
#ifndef MUDBUN_UNITY_SHADER_GRAPH
#define MUDBUN_UNITY_SHADER_GRAPH
#endif
#include "Assets/MudBun/Shader/Noise/SimplexNoise3D.cginc"
void MudNoiseGradient_float
(
float3 Position,
float NoiseSize,
float OffsetAmount,
out float3 Offset
)
{
Offset = snoise_grad(Position / max(1e-6, NoiseSize)).xyz * OffsetAmount;
}
#endif