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

node_object_info.osl « shaders « osl « kernel « cycles « intern - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8ed73231213c760d1416d1e5ed335163fc57b1b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* SPDX-License-Identifier: Apache-2.0
 * Copyright 2011-2022 Blender Foundation */

#include "stdcycles.h"

shader node_object_info(output point Location = point(0.0, 0.0, 0.0),
                        output color Color = color(1.0, 1.0, 1.0),
                        output float Alpha = 1.0,
                        output float ObjectIndex = 0.0,
                        output float MaterialIndex = 0.0,
                        output float Random = 0.0)
{
  getattribute("object:location", Location);
  getattribute("object:color", Color);
  getattribute("object:alpha", Alpha);
  getattribute("object:index", ObjectIndex);
  getattribute("material:index", MaterialIndex);
  getattribute("object:random", Random);
}