2023-08-04 13:24:17 +10:00
|
|
|
/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: Apache-2.0 */
|
2012-09-14 18:10:54 +00:00
|
|
|
|
2020-02-11 21:40:23 -07:00
|
|
|
#include "stdcycles.h"
|
2012-09-14 18:10:54 +00:00
|
|
|
|
2012-10-18 04:51:37 +00:00
|
|
|
shader node_object_info(output point Location = point(0.0, 0.0, 0.0),
|
2019-08-22 14:26:09 +02:00
|
|
|
output color Color = color(1.0, 1.0, 1.0),
|
2022-03-07 17:34:52 +01:00
|
|
|
output float Alpha = 1.0,
|
2012-10-18 04:51:37 +00:00
|
|
|
output float ObjectIndex = 0.0,
|
|
|
|
|
output float MaterialIndex = 0.0,
|
|
|
|
|
output float Random = 0.0)
|
2012-09-14 18:10:54 +00:00
|
|
|
{
|
2012-11-03 14:32:13 +00:00
|
|
|
getattribute("object:location", Location);
|
2019-08-22 14:26:09 +02:00
|
|
|
getattribute("object:color", Color);
|
2022-03-07 17:34:52 +01:00
|
|
|
getattribute("object:alpha", Alpha);
|
2012-11-03 14:32:13 +00:00
|
|
|
getattribute("object:index", ObjectIndex);
|
|
|
|
|
getattribute("material:index", MaterialIndex);
|
2025-02-24 23:44:14 +01:00
|
|
|
getattribute("object:random", Random);
|
2012-09-14 18:10:54 +00:00
|
|
|
}
|