mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-21 20:19:12 +00:00
Vulkan and HLSL object tracker support
This commit is contained in:
@@ -64,18 +64,19 @@ static const char* FS_NOTEX =
|
||||
|
||||
struct D3DParticleSwooshDataBindingFactory : TShader<CParticleSwooshShaders>::IDataBindingFactory
|
||||
{
|
||||
boo::IShaderDataBinding* BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx,
|
||||
CParticleSwooshShaders& shaders)
|
||||
boo::ObjToken<boo::IShaderDataBinding>
|
||||
BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx,
|
||||
CParticleSwooshShaders& shaders)
|
||||
{
|
||||
CParticleSwoosh& gen = shaders.m_gen;
|
||||
CSwooshDescription* desc = gen.GetDesc();
|
||||
|
||||
CUVElement* texr = desc->x3c_TEXR.get();
|
||||
boo::ITexture* textures[] = {texr ? texr->GetValueTexture(0).GetObj()->GetBooTexture() : nullptr};
|
||||
boo::ObjToken<boo::ITexture> textures[] = {texr ? texr->GetValueTexture(0).GetObj()->GetBooTexture() : nullptr};
|
||||
|
||||
boo::IGraphicsBuffer* uniforms[] = {gen.m_uniformBuf};
|
||||
boo::ObjToken<boo::IGraphicsBuffer> uniforms[] = {gen.m_uniformBuf.get()};
|
||||
gen.m_dataBind = ctx.newShaderDataBinding(shaders.m_pipeline, CParticleSwooshShaders::m_vtxFormat,
|
||||
gen.m_vertBuf, nullptr, nullptr, 1, uniforms,
|
||||
gen.m_vertBuf.get(), nullptr, nullptr, 1, uniforms,
|
||||
nullptr, texr ? 1 : 0, textures, nullptr, nullptr);
|
||||
return nullptr;
|
||||
}
|
||||
@@ -128,4 +129,19 @@ TShader<CParticleSwooshShaders>::IDataBindingFactory* CParticleSwooshShaders::In
|
||||
return new struct D3DParticleSwooshDataBindingFactory;
|
||||
}
|
||||
|
||||
template <>
|
||||
void CParticleSwooshShaders::Shutdown<boo::ID3DDataFactory>()
|
||||
{
|
||||
m_vtxFormat.reset();
|
||||
|
||||
m_texZWrite.reset();
|
||||
m_texNoZWrite.reset();
|
||||
m_texAdditiveZWrite.reset();
|
||||
m_texAdditiveNoZWrite.reset();
|
||||
|
||||
m_noTexZWrite.reset();
|
||||
m_noTexNoZWrite.reset();
|
||||
m_noTexAdditiveZWrite.reset();
|
||||
m_noTexAdditiveNoZWrite.reset();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user