godot/scene/resources/visual_shader_nodes.h

/**************************************************************************/
/*  visual_shader_nodes.h                                                 */
/**************************************************************************/
/*                         This file is part of:                          */
/*                             GODOT ENGINE                               */
/*                        https://godotengine.org                         */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
/*                                                                        */
/* Permission is hereby granted, free of charge, to any person obtaining  */
/* a copy of this software and associated documentation files (the        */
/* "Software"), to deal in the Software without restriction, including    */
/* without limitation the rights to use, copy, modify, merge, publish,    */
/* distribute, sublicense, and/or sell copies of the Software, and to     */
/* permit persons to whom the Software is furnished to do so, subject to  */
/* the following conditions:                                              */
/*                                                                        */
/* The above copyright notice and this permission notice shall be         */
/* included in all copies or substantial portions of the Software.        */
/*                                                                        */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
/**************************************************************************/

#ifndef VISUAL_SHADER_NODES_H
#define VISUAL_SHADER_NODES_H

#include "scene/resources/compressed_texture.h"
#include "scene/resources/curve_texture.h"
#include "scene/resources/visual_shader.h"

class Cubemap;
class Texture2DArray;

///////////////////////////////////////
/// Vector Base Node
///////////////////////////////////////

class VisualShaderNodeVectorBase : public VisualShaderNode {};

VARIANT_ENUM_CAST(VisualShaderNodeVectorBase::OpType)

///////////////////////////////////////
/// CONSTANTS
///////////////////////////////////////

class VisualShaderNodeConstant : public VisualShaderNode {};

class VisualShaderNodeFloatConstant : public VisualShaderNodeConstant {};

///////////////////////////////////////

class VisualShaderNodeIntConstant : public VisualShaderNodeConstant {};

///////////////////////////////////////

class VisualShaderNodeUIntConstant : public VisualShaderNodeConstant {};

///////////////////////////////////////

class VisualShaderNodeBooleanConstant : public VisualShaderNodeConstant {};

///////////////////////////////////////

class VisualShaderNodeColorConstant : public VisualShaderNodeConstant {};

///////////////////////////////////////

class VisualShaderNodeVec2Constant : public VisualShaderNodeConstant {};

///////////////////////////////////////

class VisualShaderNodeVec3Constant : public VisualShaderNodeConstant {};

///////////////////////////////////////

class VisualShaderNodeVec4Constant : public VisualShaderNodeConstant {};

///////////////////////////////////////

class VisualShaderNodeTransformConstant : public VisualShaderNodeConstant {};

///////////////////////////////////////
/// TEXTURES
///////////////////////////////////////

class VisualShaderNodeTexture : public VisualShaderNode {};

VARIANT_ENUM_CAST(VisualShaderNodeTexture::TextureType)
VARIANT_ENUM_CAST(VisualShaderNodeTexture::Source)

///////////////////////////////////////

class VisualShaderNodeCurveTexture : public VisualShaderNodeResizableBase {};

///////////////////////////////////////

class VisualShaderNodeCurveXYZTexture : public VisualShaderNodeResizableBase {};

///////////////////////////////////////

class VisualShaderNodeSample3D : public VisualShaderNode {};

VARIANT_ENUM_CAST(VisualShaderNodeSample3D::Source)

class VisualShaderNodeTexture2DArray : public VisualShaderNodeSample3D {};

class VisualShaderNodeTexture3D : public VisualShaderNodeSample3D {};

class VisualShaderNodeCubemap : public VisualShaderNode {};

VARIANT_ENUM_CAST(VisualShaderNodeCubemap::TextureType)
VARIANT_ENUM_CAST(VisualShaderNodeCubemap::Source)

///////////////////////////////////////

class VisualShaderNodeLinearSceneDepth : public VisualShaderNode {};

class VisualShaderNodeWorldPositionFromDepth : public VisualShaderNode {};

class VisualShaderNodeScreenNormalWorldSpace : public VisualShaderNode {};

///////////////////////////////////////
/// OPS
///////////////////////////////////////

class VisualShaderNodeFloatOp : public VisualShaderNode {};

VARIANT_ENUM_CAST(VisualShaderNodeFloatOp::Operator)

class VisualShaderNodeIntOp : public VisualShaderNode {};

VARIANT_ENUM_CAST(VisualShaderNodeIntOp::Operator)

class VisualShaderNodeUIntOp : public VisualShaderNode {};

VARIANT_ENUM_CAST(VisualShaderNodeUIntOp::Operator)

class VisualShaderNodeVectorOp : public VisualShaderNodeVectorBase {};

VARIANT_ENUM_CAST(VisualShaderNodeVectorOp::Operator)

///////////////////////////////////////

class VisualShaderNodeColorOp : public VisualShaderNode {};

VARIANT_ENUM_CAST(VisualShaderNodeColorOp::Operator)

////////////////////////////////
/// TRANSFORM-TRANSFORM OPERATOR
////////////////////////////////

class VisualShaderNodeTransformOp : public VisualShaderNode {};

VARIANT_ENUM_CAST(VisualShaderNodeTransformOp::Operator)

///////////////////////////////////////
/// TRANSFORM-VECTOR MULTIPLICATION
///////////////////////////////////////

class VisualShaderNodeTransformVecMult : public VisualShaderNode {};

VARIANT_ENUM_CAST(VisualShaderNodeTransformVecMult::Operator)

///////////////////////////////////////
/// FLOAT FUNC
///////////////////////////////////////

class VisualShaderNodeFloatFunc : public VisualShaderNode {};

VARIANT_ENUM_CAST(VisualShaderNodeFloatFunc::Function)

///////////////////////////////////////
/// INT FUNC
///////////////////////////////////////

class VisualShaderNodeIntFunc : public VisualShaderNode {};

VARIANT_ENUM_CAST(VisualShaderNodeIntFunc::Function)

///////////////////////////////////////
/// UINT FUNC
///////////////////////////////////////

class VisualShaderNodeUIntFunc : public VisualShaderNode {};

VARIANT_ENUM_CAST(VisualShaderNodeUIntFunc::Function)

///////////////////////////////////////
/// VECTOR FUNC
///////////////////////////////////////

class VisualShaderNodeVectorFunc : public VisualShaderNodeVectorBase {};

VARIANT_ENUM_CAST(VisualShaderNodeVectorFunc::Function)

///////////////////////////////////////
/// COLOR FUNC
///////////////////////////////////////

class VisualShaderNodeColorFunc : public VisualShaderNode {};

VARIANT_ENUM_CAST(VisualShaderNodeColorFunc::Function)

///////////////////////////////////////
/// TRANSFORM FUNC
///////////////////////////////////////

class VisualShaderNodeTransformFunc : public VisualShaderNode {};

VARIANT_ENUM_CAST(VisualShaderNodeTransformFunc::Function)

///////////////////////////////////////
/// UV FUNC
///////////////////////////////////////

class VisualShaderNodeUVFunc : public VisualShaderNode {};

VARIANT_ENUM_CAST(VisualShaderNodeUVFunc::Function)

///////////////////////////////////////
/// UV POLARCOORD
///////////////////////////////////////

class VisualShaderNodeUVPolarCoord : public VisualShaderNode {};

///////////////////////////////////////
/// DOT
///////////////////////////////////////

class VisualShaderNodeDotProduct : public VisualShaderNode {};

///////////////////////////////////////
/// LENGTH
///////////////////////////////////////

class VisualShaderNodeVectorLen : public VisualShaderNodeVectorBase {};

///////////////////////////////////////
/// DETERMINANT
///////////////////////////////////////

class VisualShaderNodeDeterminant : public VisualShaderNode {};

///////////////////////////////////////
/// CLAMP
///////////////////////////////////////

class VisualShaderNodeClamp : public VisualShaderNode {};

VARIANT_ENUM_CAST(VisualShaderNodeClamp::OpType)

///////////////////////////////////////
/// DERIVATIVE FUNCTION
///////////////////////////////////////

class VisualShaderNodeDerivativeFunc : public VisualShaderNode {};

VARIANT_ENUM_CAST(VisualShaderNodeDerivativeFunc::OpType)
VARIANT_ENUM_CAST(VisualShaderNodeDerivativeFunc::Function)
VARIANT_ENUM_CAST(VisualShaderNodeDerivativeFunc::Precision)

///////////////////////////////////////
/// FACEFORWARD
///////////////////////////////////////

class VisualShaderNodeFaceForward : public VisualShaderNodeVectorBase {};

///////////////////////////////////////
/// OUTER PRODUCT
///////////////////////////////////////

class VisualShaderNodeOuterProduct : public VisualShaderNode {};

///////////////////////////////////////
/// STEP
///////////////////////////////////////

class VisualShaderNodeStep : public VisualShaderNode {};

VARIANT_ENUM_CAST(VisualShaderNodeStep::OpType)

///////////////////////////////////////
/// SMOOTHSTEP
///////////////////////////////////////

class VisualShaderNodeSmoothStep : public VisualShaderNode {};

VARIANT_ENUM_CAST(VisualShaderNodeSmoothStep::OpType)

///////////////////////////////////////
/// DISTANCE
///////////////////////////////////////

class VisualShaderNodeVectorDistance : public VisualShaderNodeVectorBase {};

///////////////////////////////////////
/// REFRACT
///////////////////////////////////////

class VisualShaderNodeVectorRefract : public VisualShaderNodeVectorBase {};

///////////////////////////////////////
/// MIX
///////////////////////////////////////

class VisualShaderNodeMix : public VisualShaderNode {};

VARIANT_ENUM_CAST(VisualShaderNodeMix::OpType)

///////////////////////////////////////
/// COMPOSE
///////////////////////////////////////

class VisualShaderNodeVectorCompose : public VisualShaderNodeVectorBase {};

///////////////////////////////////////

class VisualShaderNodeTransformCompose : public VisualShaderNode {};

///////////////////////////////////////
/// DECOMPOSE
///////////////////////////////////////

class VisualShaderNodeVectorDecompose : public VisualShaderNodeVectorBase {};

///////////////////////////////////////

class VisualShaderNodeTransformDecompose : public VisualShaderNode {};

///////////////////////////////////////
/// PARAMETERS
///////////////////////////////////////

class VisualShaderNodeFloatParameter : public VisualShaderNodeParameter {};

VARIANT_ENUM_CAST(VisualShaderNodeFloatParameter::Hint)

class VisualShaderNodeIntParameter : public VisualShaderNodeParameter {};

VARIANT_ENUM_CAST(VisualShaderNodeIntParameter::Hint)

///////////////////////////////////////

class VisualShaderNodeUIntParameter : public VisualShaderNodeParameter {};

///////////////////////////////////////

class VisualShaderNodeBooleanParameter : public VisualShaderNodeParameter {};

///////////////////////////////////////

class VisualShaderNodeColorParameter : public VisualShaderNodeParameter {};

///////////////////////////////////////

class VisualShaderNodeVec2Parameter : public VisualShaderNodeParameter {};

///////////////////////////////////////

class VisualShaderNodeVec3Parameter : public VisualShaderNodeParameter {};

///////////////////////////////////////

class VisualShaderNodeVec4Parameter : public VisualShaderNodeParameter {};

///////////////////////////////////////

class VisualShaderNodeTransformParameter : public VisualShaderNodeParameter {};

///////////////////////////////////////

class VisualShaderNodeTextureParameter : public VisualShaderNodeParameter {};

VARIANT_ENUM_CAST(VisualShaderNodeTextureParameter::TextureType)
VARIANT_ENUM_CAST(VisualShaderNodeTextureParameter::ColorDefault)
VARIANT_ENUM_CAST(VisualShaderNodeTextureParameter::TextureFilter)
VARIANT_ENUM_CAST(VisualShaderNodeTextureParameter::TextureRepeat)
VARIANT_ENUM_CAST(VisualShaderNodeTextureParameter::TextureSource)

///////////////////////////////////////

class VisualShaderNodeTexture2DParameter : public VisualShaderNodeTextureParameter {};

///////////////////////////////////////

class VisualShaderNodeTextureParameterTriplanar : public VisualShaderNodeTextureParameter {};

///////////////////////////////////////

class VisualShaderNodeTexture2DArrayParameter : public VisualShaderNodeTextureParameter {};

///////////////////////////////////////

class VisualShaderNodeTexture3DParameter : public VisualShaderNodeTextureParameter {};

///////////////////////////////////////

class VisualShaderNodeCubemapParameter : public VisualShaderNodeTextureParameter {};

///////////////////////////////////////
/// IF
///////////////////////////////////////

class VisualShaderNodeIf : public VisualShaderNode {};

///////////////////////////////////////
/// SWITCH
///////////////////////////////////////

class VisualShaderNodeSwitch : public VisualShaderNode {};

VARIANT_ENUM_CAST(VisualShaderNodeSwitch::OpType)

///////////////////////////////////////
/// FRESNEL
///////////////////////////////////////

class VisualShaderNodeFresnel : public VisualShaderNode {};

///////////////////////////////////////
/// Is
///////////////////////////////////////

class VisualShaderNodeIs : public VisualShaderNode {};

VARIANT_ENUM_CAST(VisualShaderNodeIs::Function)

///////////////////////////////////////
/// Compare
///////////////////////////////////////

class VisualShaderNodeCompare : public VisualShaderNode {};

VARIANT_ENUM_CAST(VisualShaderNodeCompare::ComparisonType)
VARIANT_ENUM_CAST(VisualShaderNodeCompare::Function)
VARIANT_ENUM_CAST(VisualShaderNodeCompare::Condition)

class VisualShaderNodeMultiplyAdd : public VisualShaderNode {};

VARIANT_ENUM_CAST(VisualShaderNodeMultiplyAdd::OpType)

class VisualShaderNodeBillboard : public VisualShaderNode {};

VARIANT_ENUM_CAST(VisualShaderNodeBillboard::BillboardType)

///////////////////////////////////////
/// DistanceFade
///////////////////////////////////////

class VisualShaderNodeDistanceFade : public VisualShaderNode {};

class VisualShaderNodeProximityFade : public VisualShaderNode {};

class VisualShaderNodeRandomRange : public VisualShaderNode {};

class VisualShaderNodeRemap : public VisualShaderNode {};

class VisualShaderNodeRotationByAxis : public VisualShaderNode {};

class VisualShaderNodeReroute : public VisualShaderNode {};

#endif // VISUAL_SHADER_NODES_H