2
* Copyright 2011, Blender Foundation.
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License
6
* as published by the Free Software Foundation; either version 2
7
* of the License, or (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software Foundation,
16
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2
* Copyright 2011-2013 Blender Foundation
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
8
* http://www.apache.org/licenses/LICENSE-2.0
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License
19
17
#ifndef __NODES_H__
46
enum Type { POINT = 0, TEXTURE = 1, VECTOR = 2, NORMAL = 3 };
48
49
enum Mapping { NONE = 0, X = 1, Y = 2, Z = 3 };
49
50
Mapping x_mapping, y_mapping, z_mapping;
201
206
BsdfNode(bool scattering = false);
202
207
SHADER_NODE_BASE_CLASS(BsdfNode);
204
void compile(SVMCompiler& compiler, ShaderInput *param1, ShaderInput *param2, ShaderInput *param3 = NULL);
209
void compile(SVMCompiler& compiler, ShaderInput *param1, ShaderInput *param2, ShaderInput *param3 = NULL, ShaderInput *param4 = NULL);
206
211
ClosureType closure;
316
324
SHADER_NODE_CLASS(IsotropicVolumeNode)
327
class HairBsdfNode : public BsdfNode {
329
SHADER_NODE_CLASS(HairBsdfNode)
332
static ShaderEnum component_enum;
319
336
class GeometryNode : public ShaderNode {
321
338
SHADER_NODE_CLASS(GeometryNode)
407
424
SHADER_NODE_CLASS(CombineRGBNode)
427
class CombineHSVNode : public ShaderNode {
429
SHADER_NODE_CLASS(CombineHSVNode)
410
432
class GammaNode : public ShaderNode {
412
434
SHADER_NODE_CLASS(GammaNode)
422
444
SHADER_NODE_CLASS(SeparateRGBNode)
447
class SeparateHSVNode : public ShaderNode {
449
SHADER_NODE_CLASS(SeparateHSVNode)
425
452
class HSVNode : public ShaderNode {
427
454
SHADER_NODE_CLASS(HSVNode)
462
489
SHADER_NODE_CLASS(WavelengthNode)
492
class BlackbodyNode : public ShaderNode {
494
SHADER_NODE_CLASS(BlackbodyNode)
496
bool has_converter_blackbody() { return true; }
465
499
class MathNode : public ShaderNode {
467
501
SHADER_NODE_CLASS(MathNode)
487
521
static ShaderEnum type_enum;
524
class VectorTransformNode : public ShaderNode {
526
SHADER_NODE_CLASS(VectorTransformNode)
529
ustring convert_from;
532
static ShaderEnum type_enum;
533
static ShaderEnum convert_space_enum;
490
536
class BumpNode : public ShaderNode {
492
538
SHADER_NODE_CLASS(BumpNode)