13 float detail_roughness,
21 p = (p + 0.000001f) * 0.999999f;
29 else if (bands_dir == 1) {
32 else if (bands_dir == 2) {
36 n = (p.
x + p.
y + p.
z) * 10.0f;
42 rp *=
float3(0.0f, 1.0f, 1.0f);
44 else if (rings_dir == 1) {
45 rp *=
float3(1.0f, 0.0f, 1.0f);
47 else if (rings_dir == 2) {
48 rp *=
float3(1.0f, 1.0f, 0.0f);
57 if (distortion != 0.0f) {
59 (
noise_fbm(p * detail_scale,
detail, detail_roughness, 2.0f, 0.0f, 0.0f,
true) * 2.0f -
63 if (wave_profile == 0) {
66 if (wave_profile == 1) {
72 return abs(n -
floor(n + 0.5f)) * 2.0f;
81 float detail_roughness,
102 color =
float4(f, f, f, 1.0f);
float length(VecOp< float, D >) RET
float noise_fbm(T co, float detail, float roughness, float lacunarity, float, float, bool normalize)
float calc_wave(float3 p, float distortion, float detail, float detail_scale, float detail_roughness, float phase, int wave_type, int bands_dir, int rings_dir, int wave_profile)
void node_tex_wave(float3 co, float scale, float distortion, float detail, float detail_scale, float detail_roughness, float phase, float wave_type, float bands_dir, float rings_dir, float wave_profile, float4 &color, float &fac)
float3x3 scale(float3x3 mat, float2 scale)