mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-10 10:27:42 +00:00
Implement actual CParticleSwoosh rendering
This commit is contained in:
75
Runtime/Graphics/Shaders/CElementGenShaders.hpp
Normal file
75
Runtime/Graphics/Shaders/CElementGenShaders.hpp
Normal file
@@ -0,0 +1,75 @@
|
||||
#ifndef __URDE_CELEMENTGENSHADERS_HPP__
|
||||
#define __URDE_CELEMENTGENSHADERS_HPP__
|
||||
|
||||
#include "TShader.hpp"
|
||||
#include "Graphics/CGraphics.hpp"
|
||||
#include "boo/graphicsdev/GL.hpp"
|
||||
#include "boo/graphicsdev/D3D.hpp"
|
||||
#include "boo/graphicsdev/Metal.hpp"
|
||||
#include "boo/graphicsdev/Vulkan.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
class CElementGen;
|
||||
|
||||
class CElementGenShaders
|
||||
{
|
||||
friend struct OGLElementDataBindingFactory;
|
||||
friend struct VulkanElementDataBindingFactory;
|
||||
friend struct D3DElementDataBindingFactory;
|
||||
friend struct MetalElementDataBindingFactory;
|
||||
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;
|
||||
|
||||
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;
|
||||
boo::IShaderPipeline* m_redToAlphaPipeline;
|
||||
CElementGenShaders(CElementGen& gen, boo::IShaderPipeline* regPipeline,
|
||||
boo::IShaderPipeline* redToAlphaPipeline)
|
||||
: m_gen(gen), m_regPipeline(regPipeline), m_redToAlphaPipeline(redToAlphaPipeline) {}
|
||||
|
||||
public:
|
||||
static EShaderClass GetShaderClass(CElementGen& gen);
|
||||
static void BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx, CElementGen& gen);
|
||||
|
||||
using _CLS = CElementGenShaders;
|
||||
#include "TShaderDecl.hpp"
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __URDE_CELEMENTGENSHADERS_HPP__
|
||||
Reference in New Issue
Block a user