Blender Internal: Add "Lamp Data" shader node that allows shaders to acquire information such as light vector from specified Lamp.

For now this provides the following outputs:

- Color
- Light Vector
- Distance
- Shadow
- Visibility Factor

Note: Color output is multiplied by the lamp energy.  Multiplication of
color*max(dot(light_vector,normal_vector),0)*shadow*visibility_factor
produces the exact same result as the Lambert shader.

Many thanks to Brecht for code review and discussion!
This commit is contained in:
2013-11-25 20:58:23 +09:00
parent 33bc6a3959
commit ab9822eff8
18 changed files with 296 additions and 1 deletions

View File

@@ -47,6 +47,7 @@ void register_node_type_sh_group(void);
void register_node_type_sh_output(void);
void register_node_type_sh_material(void);
void register_node_type_sh_camera(void);
void register_node_type_sh_lamp(void);
void register_node_type_sh_value(void);
void register_node_type_sh_rgb(void);
void register_node_type_sh_mix_rgb(void);