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

gpu_shader_material_vector_curves.glsl « material « shaders « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 35d2e903cf4b0952817fa317e7c4eae34e0beb5a (plain)
1
2
3
4
5
6
7
8
void curves_vec(float fac, vec3 vec, sampler1DArray curvemap, float layer, out vec3 outvec)
{
  vec4 co = vec4(vec * 0.5 + 0.5, layer);
  outvec.x = texture(curvemap, co.xw).x;
  outvec.y = texture(curvemap, co.yw).y;
  outvec.z = texture(curvemap, co.zw).z;
  outvec = mix(vec, outvec, fac);
}