metaforce/Runtime/Graphics/Shaders/CElementGenShaders.hpp

91 lines
3.3 KiB
C++
Raw Normal View History

2016-04-13 06:07:23 +00:00
#ifndef __URDE_CELEMENTGENSHADERS_HPP__
#define __URDE_CELEMENTGENSHADERS_HPP__
2016-02-15 04:00:26 +00:00
#include "TShader.hpp"
2016-03-04 23:04:53 +00:00
#include "Graphics/CGraphics.hpp"
2016-02-15 04:00:26 +00:00
#include "boo/graphicsdev/GL.hpp"
#include "boo/graphicsdev/D3D.hpp"
#include "boo/graphicsdev/Metal.hpp"
2016-02-23 02:34:16 +00:00
#include "boo/graphicsdev/Vulkan.hpp"
2016-02-15 04:00:26 +00:00
2016-03-04 23:04:53 +00:00
namespace urde
2016-02-15 04:00:26 +00:00
{
class CElementGen;
class CElementGenShaders
{
friend struct OGLElementDataBindingFactory;
friend struct VulkanElementDataBindingFactory;
friend struct D3DElementDataBindingFactory;
friend struct MetalElementDataBindingFactory;
2016-02-15 04:00:26 +00:00
public:
enum class EShaderClass
{
Tex,
IndTex,
NoTex
};
private:
static boo::IShaderPipeline* m_texZTestZWrite;
static boo::IShaderPipeline* m_texNoZTestZWrite;
static boo::IShaderPipeline* m_texZTestNoZWrite;
static boo::IShaderPipeline* m_texNoZTestNoZWrite;
static boo::IShaderPipeline* m_texAdditiveZTest;
static boo::IShaderPipeline* m_texAdditiveNoZTest;
static boo::IShaderPipeline* m_texRedToAlphaZTest;
static boo::IShaderPipeline* m_texRedToAlphaNoZTest;
2017-09-05 03:00:19 +00:00
static boo::IShaderPipeline* m_texZTestNoZWriteSub;
static boo::IShaderPipeline* m_texNoZTestNoZWriteSub;
static boo::IShaderPipeline* m_texRedToAlphaZTestSub;
static boo::IShaderPipeline* m_texRedToAlphaNoZTestSub;
2016-02-15 04:00:26 +00:00
static boo::IShaderPipeline* m_indTexZWrite;
static boo::IShaderPipeline* m_indTexNoZWrite;
static boo::IShaderPipeline* m_indTexAdditive;
static boo::IShaderPipeline* m_cindTexZWrite;
static boo::IShaderPipeline* m_cindTexNoZWrite;
static boo::IShaderPipeline* m_cindTexAdditive;
static boo::IShaderPipeline* m_noTexZTestZWrite;
static boo::IShaderPipeline* m_noTexNoZTestZWrite;
static boo::IShaderPipeline* m_noTexZTestNoZWrite;
static boo::IShaderPipeline* m_noTexNoZTestNoZWrite;
static boo::IShaderPipeline* m_noTexAdditiveZTest;
static boo::IShaderPipeline* m_noTexAdditiveNoZTest;
static boo::IVertexFormat* m_vtxFormatTex; /* No OpenGL */
static boo::IVertexFormat* m_vtxFormatIndTex; /* No OpenGL */
static boo::IVertexFormat* m_vtxFormatNoTex; /* No OpenGL */
CElementGen& m_gen;
boo::IShaderPipeline* m_regPipeline;
2017-09-05 03:00:19 +00:00
boo::IShaderPipeline* m_regPipelineSub;
boo::IShaderPipeline* m_redToAlphaPipeline;
2017-09-05 03:00:19 +00:00
boo::IShaderPipeline* m_redToAlphaPipelineSub;
boo::IShaderPipeline* m_regPipelinePmus;
boo::IShaderPipeline* m_redToAlphaPipelinePmus;
CElementGenShaders(CElementGen& gen,
boo::IShaderPipeline* regPipeline,
2017-09-05 03:00:19 +00:00
boo::IShaderPipeline* regPipelineSub,
boo::IShaderPipeline* redToAlphaPipeline,
2017-09-05 03:00:19 +00:00
boo::IShaderPipeline* redToAlphaPipelineSub,
boo::IShaderPipeline* regPipelinePmus,
boo::IShaderPipeline* redToAlphaPipelinePmus)
2017-09-05 03:00:19 +00:00
: m_gen(gen), m_regPipeline(regPipeline), m_regPipelineSub(regPipelineSub),
m_redToAlphaPipeline(redToAlphaPipeline), m_redToAlphaPipelineSub(redToAlphaPipelineSub),
m_regPipelinePmus(regPipelinePmus), m_redToAlphaPipelinePmus(redToAlphaPipelinePmus) {}
2016-02-15 04:00:26 +00:00
public:
static EShaderClass GetShaderClass(CElementGen& gen);
2016-03-30 19:16:01 +00:00
static void BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx, CElementGen& gen);
using _CLS = CElementGenShaders;
#include "TShaderDecl.hpp"
2016-02-15 04:00:26 +00:00
};
}
2016-04-13 06:07:23 +00:00
#endif // __URDE_CELEMENTGENSHADERS_HPP__