diff options
author | OmarSquircleArt <omar.squircleart@gmail.com> | 2019-08-08 18:56:19 +0300 |
---|---|---|
committer | OmarSquircleArt <omar.squircleart@gmail.com> | 2019-08-08 18:56:19 +0300 |
commit | b091542fe91353c15dd7240ba7ce8ecf72d4011b (patch) | |
tree | c145dd5cf7d6496e87883be7a9e1dfab0d813958 /source/blender/gpu/shaders/gpu_shader_material.glsl | |
parent | 6c87aa858bf0f756560949b25c1afc9c6a887996 (diff) |
Avoid writing to input variables and using reserved function names.
Previously, we edited the input variables directly, OSL doesn't like that. Moreover, we used the name `noise`, which is already a built-in function, so we changed the function names to `noise_texture_*` instead.
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_material.glsl')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_material.glsl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl index 58572e13af8..806bffea806 100644 --- a/source/blender/gpu/shaders/gpu_shader_material.glsl +++ b/source/blender/gpu/shaders/gpu_shader_material.glsl @@ -3549,7 +3549,7 @@ vec4 random_vec4_offset(float seed) 100.0 + hash_vec2_to_float(vec2(seed, 3.0)) * 100.0); } -void node_tex_noise_1d( +void node_noise_texture_1d( vec3 co, float w, float scale, float detail, float distortion, out float value, out vec4 color) { float p = w * scale; @@ -3564,7 +3564,7 @@ void node_tex_noise_1d( 1.0); } -void node_tex_noise_2d( +void node_noise_texture_2d( vec3 co, float w, float scale, float detail, float distortion, out float value, out vec4 color) { vec2 p = co.xy * scale; @@ -3580,7 +3580,7 @@ void node_tex_noise_2d( 1.0); } -void node_tex_noise_3d( +void node_noise_texture_3d( vec3 co, float w, float scale, float detail, float distortion, out float value, out vec4 color) { vec3 p = co * scale; @@ -3597,7 +3597,7 @@ void node_tex_noise_3d( 1.0); } -void node_tex_noise_4d( +void node_noise_texture_4d( vec3 co, float w, float scale, float detail, float distortion, out float value, out vec4 color) { vec4 p = vec4(co, w) * scale; |