Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gpu_shader_material_tex_white_noise.glsl « material « shaders « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c5081372aa4fadfdf1e13cdd78e6a2ce875161c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#pragma BLENDER_REQUIRE(gpu_shader_common_hash.glsl)

/* White Noise */

void node_white_noise_1d(vec3 vector, float w, out float value, out vec4 color)
{
  value = hash_float_to_float(w);
  color.xyz = hash_float_to_vec3(w);
}

void node_white_noise_2d(vec3 vector, float w, out float value, out vec4 color)
{
  value = hash_vec2_to_float(vector.xy);
  color.xyz = hash_vec2_to_vec3(vector.xy);
}

void node_white_noise_3d(vec3 vector, float w, out float value, out vec4 color)
{
  value = hash_vec3_to_float(vector);
  color.xyz = hash_vec3_to_vec3(vector);
}

void node_white_noise_4d(vec3 vector, float w, out float value, out vec4 color)
{
  value = hash_vec4_to_float(vec4(vector, w));
  color.xyz = hash_vec4_to_vec3(vec4(vector, w));
}