ULRE/inc/hgl/graph/shader/node/texture.h

72 lines
1.5 KiB
C
Raw Normal View History

#ifndef HGL_GRAPH_SHADER_NODE_TEXTURE_INCLUDE
#define HGL_GRAPH_SHADER_NODE_TEXTURE_INCLUDE
2019-12-06 21:45:51 +08:00
#include<hgl/graph/shader/node/vector.h>
2019-12-16 20:35:51 +08:00
#include<hgl/graph/shader/node/node.h>
2019-12-06 21:45:51 +08:00
BEGIN_SHADER_NODE_NAMESPACE
2019-12-16 20:35:51 +08:00
class texture:public Node
{
param::ParamType texture_type;
public:
texture(const param::ParamType &pt):Node(NodeType::Texture)
{
texture_type=pt;
}
const param::ParamType &GetTextureType()const{return texture_type;}
};//class texture:public Node
class texture1D:public texture
{
public:
texture1D():texture(param::ParamType::Texture1D)
{
SHADER_INPUT_PARAM(false,U,Float1)
}
};//class texture1D:public texture
class texture2D:public texture
2019-12-06 21:45:51 +08:00
{
public:
2019-12-16 20:35:51 +08:00
texture2D():texture(param::ParamType::Texture2D)
2019-12-06 21:45:51 +08:00
{
2019-12-16 20:35:51 +08:00
SHADER_INPUT_PARAM(false,UV,Float2)
2019-12-06 21:45:51 +08:00
}
2019-12-16 20:35:51 +08:00
};//class texture2D:public texture
2019-12-06 21:45:51 +08:00
2019-12-16 20:35:51 +08:00
class textureRect:public texture
2019-12-06 21:45:51 +08:00
{
public:
2019-12-16 20:35:51 +08:00
textureRect():texture(param::ParamType::TextureRect)
2019-12-06 21:45:51 +08:00
{
2019-12-16 20:35:51 +08:00
SHADER_INPUT_PARAM(false,UV,UInteger2)
2019-12-06 21:45:51 +08:00
}
2019-12-16 20:35:51 +08:00
};//class textureRect:public texture
2019-12-06 21:45:51 +08:00
2019-12-16 20:35:51 +08:00
class texture3D:public texture
2019-12-06 21:45:51 +08:00
{
public:
2019-12-16 20:35:51 +08:00
texture3D():texture(param::ParamType::Texture3D)
2019-12-06 21:45:51 +08:00
{
2019-12-16 20:35:51 +08:00
SHADER_INPUT_PARAM(false,UVD,Float3)
2019-12-06 21:45:51 +08:00
}
2019-12-16 20:35:51 +08:00
};//class texture3D:public texture
2019-12-06 21:45:51 +08:00
2019-12-16 20:35:51 +08:00
class textureCube:public texture
2019-12-06 21:45:51 +08:00
{
public:
2019-12-16 20:35:51 +08:00
textureCube():texture(param::ParamType::TextureCube)
2019-12-06 21:45:51 +08:00
{
2019-12-16 20:35:51 +08:00
SHADER_INPUT_PARAM(false,XYZ,Float3)
2019-12-06 21:45:51 +08:00
}
2019-12-16 20:35:51 +08:00
};//class TextureCube:public texture
2019-12-06 21:45:51 +08:00
END_SHADER_NODE_NAMESPACE
#endif//HGL_GRAPH_SHADER_NODE_TEXTURE_INCLUDE