mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 17:47:43 +00:00
Implement actual CParticleSwoosh rendering
This commit is contained in:
63
Runtime/Graphics/Shaders/CParticleSwooshShaders.hpp
Normal file
63
Runtime/Graphics/Shaders/CParticleSwooshShaders.hpp
Normal file
@@ -0,0 +1,63 @@
|
||||
#ifndef __URDE_CPARTICLESWOOSHSHADERS_HPP__
|
||||
#define __URDE_CPARTICLESWOOSHSHADERS_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 CParticleSwoosh;
|
||||
|
||||
class CParticleSwooshShaders
|
||||
{
|
||||
friend struct OGLParticleSwooshDataBindingFactory;
|
||||
friend struct VulkanParticleSwooshDataBindingFactory;
|
||||
friend struct D3DParticleSwooshDataBindingFactory;
|
||||
friend struct MetalParticleSwooshDataBindingFactory;
|
||||
public:
|
||||
enum class EShaderClass
|
||||
{
|
||||
Tex,
|
||||
NoTex
|
||||
};
|
||||
|
||||
struct Vert
|
||||
{
|
||||
zeus::CVector3f m_pos;
|
||||
zeus::CVector2f m_uv;
|
||||
zeus::CColor m_color;
|
||||
};
|
||||
|
||||
private:
|
||||
static boo::IShaderPipeline* m_texZWrite;
|
||||
static boo::IShaderPipeline* m_texNoZWrite;
|
||||
static boo::IShaderPipeline* m_texAdditiveZWrite;
|
||||
static boo::IShaderPipeline* m_texAdditiveNoZWrite;
|
||||
|
||||
static boo::IShaderPipeline* m_noTexZWrite;
|
||||
static boo::IShaderPipeline* m_noTexNoZWrite;
|
||||
static boo::IShaderPipeline* m_noTexAdditiveZWrite;
|
||||
static boo::IShaderPipeline* m_noTexAdditiveNoZWrite;
|
||||
|
||||
static boo::IVertexFormat* m_vtxFormat; /* No OpenGL */
|
||||
|
||||
CParticleSwoosh& m_gen;
|
||||
boo::IShaderPipeline* m_pipeline;
|
||||
CParticleSwooshShaders(CParticleSwoosh& gen, boo::IShaderPipeline* pipeline)
|
||||
: m_gen(gen), m_pipeline(pipeline) {}
|
||||
|
||||
public:
|
||||
static EShaderClass GetShaderClass(CParticleSwoosh& gen);
|
||||
static void BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx, CParticleSwoosh& gen);
|
||||
|
||||
using _CLS = CParticleSwooshShaders;
|
||||
#include "TShaderDecl.hpp"
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __URDE_CPARTICLESWOOSHSHADERS_HPP__
|
||||
Reference in New Issue
Block a user