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

gpu_shader_material_virtual_camera.glsl « material « shaders « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 26d15292e6a604e2b71da349a8c4fa722087d391 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
void node_virtual_camera_empty(vec3 co, out vec4 color, out float alpha)
{
  color = vec4(0.0);
  alpha = 0.0;
}

void node_virtual_camera(vec3 co, sampler2D ima, float mix, out vec4 color, out float alpha)
{
  if (mix == 1.0) {
    node_virtual_camera_empty(co, color, alpha);
    return;
  }

  color = texture(ima, co.xy);
  alpha = color.a;
}