#include "CParticleSwooshShaders.hpp" #include "Particle/CParticleSwoosh.hpp" #include "Particle/CSwooshDescription.hpp" namespace urde { boo::ObjToken CParticleSwooshShaders::m_texZWrite; boo::ObjToken CParticleSwooshShaders::m_texNoZWrite; boo::ObjToken CParticleSwooshShaders::m_texAdditiveZWrite; boo::ObjToken CParticleSwooshShaders::m_texAdditiveNoZWrite; boo::ObjToken CParticleSwooshShaders::m_noTexZWrite; boo::ObjToken CParticleSwooshShaders::m_noTexNoZWrite; boo::ObjToken CParticleSwooshShaders::m_noTexAdditiveZWrite; boo::ObjToken CParticleSwooshShaders::m_noTexAdditiveNoZWrite; boo::ObjToken CParticleSwooshShaders::m_vtxFormat; CParticleSwooshShaders::EShaderClass CParticleSwooshShaders::GetShaderClass(CParticleSwoosh& gen) { CSwooshDescription* desc = gen.GetDesc(); if (desc->x3c_TEXR) return EShaderClass::Tex; else return EShaderClass::NoTex; } void CParticleSwooshShaders::BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx, CParticleSwoosh& gen) { CSwooshDescription* desc = gen.GetDesc(); boo::ObjToken pipeline; if (desc->x3c_TEXR) { if (desc->x44_31_AALP) { if (desc->x45_24_ZBUF) pipeline = m_texAdditiveZWrite; else pipeline = m_texAdditiveNoZWrite; } else { if (desc->x45_24_ZBUF) pipeline = m_texZWrite; else pipeline = m_texNoZWrite; } } else { if (desc->x44_31_AALP) { if (desc->x45_24_ZBUF) pipeline = m_noTexAdditiveZWrite; else pipeline = m_noTexAdditiveNoZWrite; } else { if (desc->x45_24_ZBUF) pipeline = m_noTexZWrite; else pipeline = m_noTexNoZWrite; } } CParticleSwooshShaders shad(gen, pipeline); TShader::BuildShaderDataBinding(ctx, shad); } URDE_SPECIALIZE_SHADER(CParticleSwooshShaders) }