From 7e7f789c28e86f3bf6ed9717aa3f1aa0ad71c034 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Mon, 22 Feb 2016 16:34:16 -1000 Subject: [PATCH] Vulkan updates --- CMakeLists.txt | 1 + Runtime/CGraphics.hpp | 6 +- Runtime/CTextureBoo.cpp | 50 +++--- Runtime/Graphics/CLineRenderer.cpp | 12 +- Runtime/Graphics/CLineRendererShaders.hpp | 7 +- Runtime/Graphics/CLineRendererShadersGLSL.cpp | 60 ++++++- Runtime/Particle/CElementGen.cpp | 16 +- Runtime/Particle/CElementGenShaders.hpp | 7 +- Runtime/Particle/CElementGenShadersGLSL.cpp | 158 +++++++++++++++++- hecl | 2 +- libSpecter | 2 +- 11 files changed, 281 insertions(+), 40 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6682e6622..04fd7b20b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,6 +77,7 @@ set(HECL_DATASPEC_PUSHES HECL::Database::DATA_SPEC_REGISTRY.push_back(&DataSpec::SpecEntMP2); HECL::Database::DATA_SPEC_REGISTRY.push_back(&DataSpec::SpecEntMP3);") add_subdirectory(hecl) +add_definitions(${BOO_SYS_DEFINES}) add_subdirectory(libSpecter) set(SPECTER_INCLUDE_DIR libSpecter/include libSpecter/freetype2/include) add_subdirectory(NODLib) diff --git a/Runtime/CGraphics.hpp b/Runtime/CGraphics.hpp index ca84f1e39..0b5eab90f 100644 --- a/Runtime/CGraphics.hpp +++ b/Runtime/CGraphics.hpp @@ -206,14 +206,12 @@ public: { g_BooMainCommandQueue->setShaderDataBinding(binding); } - static void DrawInstances(boo::Primitive prim, size_t start, size_t count, size_t instCount) + static void DrawInstances(size_t start, size_t count, size_t instCount) { - g_BooMainCommandQueue->setDrawPrimitive(prim); g_BooMainCommandQueue->drawInstances(start, count, instCount); } - static void DrawArray(boo::Primitive prim, size_t start, size_t count) + static void DrawArray(size_t start, size_t count) { - g_BooMainCommandQueue->setDrawPrimitive(prim); g_BooMainCommandQueue->draw(start, count); } }; diff --git a/Runtime/CTextureBoo.cpp b/Runtime/CTextureBoo.cpp index 72e11ce66..4f1d59cb4 100644 --- a/Runtime/CTextureBoo.cpp +++ b/Runtime/CTextureBoo.cpp @@ -111,10 +111,11 @@ void CTexture::BuildI4FromGCN(CInputStream& in) h /= 2; } + boo::ITextureS* tmp; m_booToken = CGraphics::g_BooFactory->newStaticTextureNoContext(x4_w, x6_h, x8_mips, boo::TextureFormat::RGBA8, - buf.get(), texelCount * 4, - reinterpret_cast(&m_booTex)); + buf.get(), texelCount * 4, tmp); + m_booTex = tmp; } void CTexture::BuildI8FromGCN(CInputStream& in) @@ -157,10 +158,11 @@ void CTexture::BuildI8FromGCN(CInputStream& in) h /= 2; } + boo::ITextureS* tmp; m_booToken = CGraphics::g_BooFactory->newStaticTextureNoContext(x4_w, x6_h, x8_mips, boo::TextureFormat::RGBA8, - buf.get(), texelCount * 4, - reinterpret_cast(&m_booTex)); + buf.get(), texelCount * 4, tmp); + m_booTex = tmp; } void CTexture::BuildIA4FromGCN(CInputStream& in) @@ -204,10 +206,11 @@ void CTexture::BuildIA4FromGCN(CInputStream& in) h /= 2; } + boo::ITextureS* tmp; m_booToken = CGraphics::g_BooFactory->newStaticTextureNoContext(x4_w, x6_h, x8_mips, boo::TextureFormat::RGBA8, - buf.get(), texelCount * 4, - reinterpret_cast(&m_booTex)); + buf.get(), texelCount * 4, tmp); + m_booTex = tmp; } void CTexture::BuildIA8FromGCN(CInputStream& in) @@ -251,10 +254,11 @@ void CTexture::BuildIA8FromGCN(CInputStream& in) h /= 2; } + boo::ITextureS* tmp; m_booToken = CGraphics::g_BooFactory->newStaticTextureNoContext(x4_w, x6_h, x8_mips, boo::TextureFormat::RGBA8, - buf.get(), texelCount * 4, - reinterpret_cast(&m_booTex)); + buf.get(), texelCount * 4, tmp); + m_booTex = tmp; } static std::vector DecodePalette(int numEntries, CInputStream& in) @@ -357,10 +361,11 @@ void CTexture::BuildC4FromGCN(CInputStream& in) h /= 2; } + boo::ITextureS* tmp; m_booToken = CGraphics::g_BooFactory->newStaticTextureNoContext(x4_w, x6_h, x8_mips, boo::TextureFormat::RGBA8, - buf.get(), texelCount * 4, - reinterpret_cast(&m_booTex)); + buf.get(), texelCount * 4, tmp); + m_booTex = tmp; } void CTexture::BuildC8FromGCN(CInputStream& in) @@ -399,10 +404,11 @@ void CTexture::BuildC8FromGCN(CInputStream& in) h /= 2; } + boo::ITextureS* tmp; m_booToken = CGraphics::g_BooFactory->newStaticTextureNoContext(x4_w, x6_h, x8_mips, boo::TextureFormat::RGBA8, - buf.get(), texelCount * 4, - reinterpret_cast(&m_booTex)); + buf.get(), texelCount * 4, tmp); + m_booTex = tmp; } void CTexture::BuildC14X2FromGCN(CInputStream& in) @@ -449,10 +455,11 @@ void CTexture::BuildRGB565FromGCN(CInputStream& in) h /= 2; } + boo::ITextureS* tmp; m_booToken = CGraphics::g_BooFactory->newStaticTextureNoContext(x4_w, x6_h, x8_mips, boo::TextureFormat::RGBA8, - buf.get(), texelCount * 4, - reinterpret_cast(&m_booTex)); + buf.get(), texelCount * 4, tmp); + m_booTex = tmp; } void CTexture::BuildRGB5A3FromGCN(CInputStream& in) @@ -504,10 +511,11 @@ void CTexture::BuildRGB5A3FromGCN(CInputStream& in) h /= 2; } + boo::ITextureS* tmp; m_booToken = CGraphics::g_BooFactory->newStaticTextureNoContext(x4_w, x6_h, x8_mips, boo::TextureFormat::RGBA8, - buf.get(), texelCount * 4, - reinterpret_cast(&m_booTex)); + buf.get(), texelCount * 4, tmp); + m_booTex = tmp; } void CTexture::BuildRGBA8FromGCN(CInputStream& in) @@ -559,10 +567,11 @@ void CTexture::BuildRGBA8FromGCN(CInputStream& in) h /= 2; } + boo::ITextureS* tmp; m_booToken = CGraphics::g_BooFactory->newStaticTextureNoContext(x4_w, x6_h, x8_mips, boo::TextureFormat::RGBA8, - buf.get(), texelCount * 4, - reinterpret_cast(&m_booTex)); + buf.get(), texelCount * 4, tmp); + m_booTex = tmp; } struct DXT1Block @@ -621,10 +630,11 @@ void CTexture::BuildDXT1FromGCN(CInputStream& in) h /= 2; } + boo::ITextureS* tmp; m_booToken = CGraphics::g_BooFactory->newStaticTextureNoContext(x4_w, x6_h, x8_mips, boo::TextureFormat::DXT1, - buf.get(), blockCount * 8, - reinterpret_cast(&m_booTex)); + buf.get(), blockCount * 8, tmp); + m_booTex = tmp; } CTexture::CTexture(CInputStream& in) diff --git a/Runtime/Graphics/CLineRenderer.cpp b/Runtime/Graphics/CLineRenderer.cpp index 47dc8300a..8effbe535 100644 --- a/Runtime/Graphics/CLineRenderer.cpp +++ b/Runtime/Graphics/CLineRenderer.cpp @@ -31,10 +31,16 @@ void CLineRendererShaders::Initialize() case boo::IGraphicsDataFactory::Platform::D3D12: m_bindFactory.reset(Initialize(*static_cast(CGraphics::g_BooFactory))); break; -#elif BOO_HAS_METAL +#endif +#if BOO_HAS_METAL case boo::IGraphicsDataFactory::Platform::Metal: m_bindFactory.reset(Initialize(*static_cast(CGraphics::g_BooFactory))); break; +#endif +#if BOO_HAS_VULKAN + case boo::IGraphicsDataFactory::Platform::Vulkan: + m_bindFactory.reset(Initialize(*static_cast(CGraphics::g_BooFactory))); + break; #endif default: break; } @@ -389,13 +395,13 @@ void CLineRenderer::Render(const Zeus::CColor& moduColor) { m_vertBuf->load(g_StaticLineVertsTex.data(), sizeof(SDrawVertTex) * g_StaticLineVertsTex.size()); CGraphics::SetShaderDataBinding(m_shaderBind); - CGraphics::DrawArray(boo::Primitive::TriStrips, 0, g_StaticLineVertsTex.size()); + CGraphics::DrawArray(0, g_StaticLineVertsTex.size()); } else { m_vertBuf->load(g_StaticLineVertsNoTex.data(), sizeof(SDrawVertNoTex) * g_StaticLineVertsNoTex.size()); CGraphics::SetShaderDataBinding(m_shaderBind); - CGraphics::DrawArray(boo::Primitive::TriStrips, 0, g_StaticLineVertsNoTex.size()); + CGraphics::DrawArray(0, g_StaticLineVertsNoTex.size()); } } diff --git a/Runtime/Graphics/CLineRendererShaders.hpp b/Runtime/Graphics/CLineRendererShaders.hpp index bd26608b4..4d810e6d7 100644 --- a/Runtime/Graphics/CLineRendererShaders.hpp +++ b/Runtime/Graphics/CLineRendererShaders.hpp @@ -5,6 +5,7 @@ #include "boo/graphicsdev/GL.hpp" #include "boo/graphicsdev/D3D.hpp" #include "boo/graphicsdev/Metal.hpp" +#include "boo/graphicsdev/Vulkan.hpp" namespace pshag { @@ -36,9 +37,13 @@ public: static IDataBindingFactory* Initialize(boo::GLDataFactory& factory); #if _WIN32 static IDataBindingFactory* Initialize(boo::ID3DDataFactory& factory); -#elif BOO_HAS_METAL +#endif +#if BOO_HAS_METAL static IDataBindingFactory* Initialize(boo::MetalDataFactory& factory); #endif +#if BOO_HAS_VULKAN + static IDataBindingFactory* Initialize(boo::VulkanDataFactory& factory); +#endif static void Initialize(); static void Shutdown(); diff --git a/Runtime/Graphics/CLineRendererShadersGLSL.cpp b/Runtime/Graphics/CLineRendererShadersGLSL.cpp index caf19c08a..28d1d05e2 100644 --- a/Runtime/Graphics/CLineRendererShadersGLSL.cpp +++ b/Runtime/Graphics/CLineRendererShadersGLSL.cpp @@ -81,7 +81,7 @@ static const char* FS_GLSL_NOTEX = " colorOut = vtf.color;\n" "}\n"; -struct GLSLLineDataBindingFactory : CLineRendererShaders::IDataBindingFactory +struct OGLLineDataBindingFactory : CLineRendererShaders::IDataBindingFactory { void BuildShaderDataBinding(CLineRenderer& renderer, boo::IShaderPipeline* pipeline, boo::ITexture* texture) { @@ -136,7 +136,63 @@ CLineRendererShaders::IDataBindingFactory* CLineRendererShaders::Initialize(boo: boo::BlendFactor::SrcAlpha, boo::BlendFactor::One, false, false, false); - return new struct GLSLLineDataBindingFactory; + return new struct OGLLineDataBindingFactory; } +#if BOO_HAS_VULKAN +struct VulkanLineDataBindingFactory : CLineRendererShaders::IDataBindingFactory +{ + void BuildShaderDataBinding(CLineRenderer& renderer, boo::IShaderPipeline* pipeline, boo::ITexture* texture) + { + int texCount = 0; + boo::ITexture* textures[1]; + + if (texture) + { + textures[0] = texture; + texCount = 1; + } + + boo::IGraphicsBuffer* uniforms[] = {renderer.m_uniformBuf}; + + renderer.m_shaderBind = CGraphics::g_BooFactory->newShaderDataBinding(pipeline, nullptr, renderer.m_vertBuf, + nullptr, nullptr, 1, uniforms, + texCount, textures); + } +}; + +CLineRendererShaders::IDataBindingFactory* CLineRendererShaders::Initialize(boo::VulkanDataFactory& factory) +{ + static const boo::VertexElementDescriptor VtxFmtTex[] = + { + {nullptr, nullptr, boo::VertexSemantic::Position4}, + {nullptr, nullptr, boo::VertexSemantic::Color}, + {nullptr, nullptr, boo::VertexSemantic::UV4} + }; + m_texVtxFmt = factory.newVertexFormat(3, VtxFmtTex); + + static const boo::VertexElementDescriptor VtxFmtNoTex[] = + { + {nullptr, nullptr, boo::VertexSemantic::Position4}, + {nullptr, nullptr, boo::VertexSemantic::Color} + }; + m_noTexVtxFmt = factory.newVertexFormat(2, VtxFmtNoTex); + + m_texAlpha = factory.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_texVtxFmt, + boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, + false, true, false); + m_texAdditive = factory.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_texVtxFmt, + boo::BlendFactor::SrcAlpha, boo::BlendFactor::One, + false, false, false); + m_noTexAlpha = factory.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_noTexVtxFmt, + boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, + false, true, false); + m_noTexAdditive = factory.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_noTexVtxFmt, + boo::BlendFactor::SrcAlpha, boo::BlendFactor::One, + false, false, false); + + return new struct VulkanLineDataBindingFactory; +} +#endif + } diff --git a/Runtime/Particle/CElementGen.cpp b/Runtime/Particle/CElementGen.cpp index f50ad12c7..5f7cdd5fb 100644 --- a/Runtime/Particle/CElementGen.cpp +++ b/Runtime/Particle/CElementGen.cpp @@ -185,10 +185,16 @@ void CElementGenShaders::Initialize() case boo::IGraphicsDataFactory::Platform::D3D12: m_bindFactory.reset(Initialize(*static_cast(CGraphics::g_BooFactory))); break; -#elif BOO_HAS_METAL +#endif +#if BOO_HAS_METAL case boo::IGraphicsDataFactory::Platform::Metal: m_bindFactory.reset(Initialize(*static_cast(CGraphics::g_BooFactory))); break; +#endif +#if BOO_HAS_VULKAN + case boo::IGraphicsDataFactory::Platform::Vulkan: + m_bindFactory.reset(Initialize(*static_cast(CGraphics::g_BooFactory))); + break; #endif default: break; } @@ -1706,11 +1712,11 @@ void CElementGen::RenderParticles() { case CElementGenShaders::EShaderClass::Tex: m_instBuf->load(g_instTexData.data(), g_instTexData.size() * sizeof(SParticleInstanceTex)); - CGraphics::DrawInstances(boo::Primitive::TriStrips, 0, 4, g_instTexData.size()); + CGraphics::DrawInstances(0, 4, g_instTexData.size()); break; case CElementGenShaders::EShaderClass::NoTex: m_instBuf->load(g_instNoTexData.data(), g_instNoTexData.size() * sizeof(SParticleInstanceNoTex)); - CGraphics::DrawInstances(boo::Primitive::TriStrips, 0, 4, g_instNoTexData.size()); + CGraphics::DrawInstances(0, 4, g_instNoTexData.size()); break; default: break; } @@ -1845,11 +1851,11 @@ void CElementGen::RenderParticles() { case CElementGenShaders::EShaderClass::Tex: m_instBuf->load(g_instTexData.data(), g_instTexData.size() * sizeof(SParticleInstanceTex)); - CGraphics::DrawInstances(boo::Primitive::TriStrips, 0, 4, g_instTexData.size()); + CGraphics::DrawInstances(0, 4, g_instTexData.size()); break; case CElementGenShaders::EShaderClass::NoTex: m_instBuf->load(g_instNoTexData.data(), g_instNoTexData.size() * sizeof(SParticleInstanceNoTex)); - CGraphics::DrawInstances(boo::Primitive::TriStrips, 0, 4, g_instNoTexData.size()); + CGraphics::DrawInstances(0, 4, g_instNoTexData.size()); break; default: break; } diff --git a/Runtime/Particle/CElementGenShaders.hpp b/Runtime/Particle/CElementGenShaders.hpp index 3c7977fd0..f2eab5303 100644 --- a/Runtime/Particle/CElementGenShaders.hpp +++ b/Runtime/Particle/CElementGenShaders.hpp @@ -5,6 +5,7 @@ #include "boo/graphicsdev/GL.hpp" #include "boo/graphicsdev/D3D.hpp" #include "boo/graphicsdev/Metal.hpp" +#include "boo/graphicsdev/Vulkan.hpp" namespace pshag { @@ -63,9 +64,13 @@ public: static IDataBindingFactory* Initialize(boo::GLDataFactory& factory); #if _WIN32 static IDataBindingFactory* Initialize(boo::ID3DDataFactory& factory); -#elif BOO_HAS_METAL +#endif +#if BOO_HAS_METAL static IDataBindingFactory* Initialize(boo::MetalDataFactory& factory); #endif +#if BOO_HAS_VULKAN + static IDataBindingFactory* Initialize(boo::VulkanDataFactory& factory); +#endif static void Initialize(); static void Shutdown(); diff --git a/Runtime/Particle/CElementGenShadersGLSL.cpp b/Runtime/Particle/CElementGenShadersGLSL.cpp index e387204e5..73c392d93 100644 --- a/Runtime/Particle/CElementGenShadersGLSL.cpp +++ b/Runtime/Particle/CElementGenShadersGLSL.cpp @@ -177,7 +177,7 @@ static const char* FS_GLSL_NOTEX = " colorOut = vtf.color;\n" "}\n"; -struct GLSLElementDataBindingFactory : CElementGenShaders::IDataBindingFactory +struct OGLElementDataBindingFactory : CElementGenShaders::IDataBindingFactory { void BuildShaderDataBinding(CElementGen& gen, boo::IShaderPipeline* regPipeline, @@ -333,7 +333,161 @@ CElementGenShaders::IDataBindingFactory* CElementGenShaders::Initialize(boo::GLD boo::BlendFactor::SrcAlpha, boo::BlendFactor::One, false, false, false); - return new struct GLSLElementDataBindingFactory; + return new struct OGLElementDataBindingFactory; } +#if BOO_HAS_VULKAN +struct VulkanElementDataBindingFactory : CElementGenShaders::IDataBindingFactory +{ + void BuildShaderDataBinding(CElementGen& gen, + boo::IShaderPipeline* regPipeline, + boo::IShaderPipeline* redToAlphaPipeline) + { + CGenDescription* desc = gen.GetDesc(); + + CUVElement* texr = desc->x54_TEXR.get(); + CUVElement* tind = desc->x58_TIND.get(); + int texCount = 0; + boo::ITexture* textures[3]; + + if (texr) + { + textures[0] = texr->GetValueTexture(0).GetObj()->GetBooTexture(); + texCount = 1; + if (tind) + { + textures[1] = CGraphics::g_SpareTexture; + textures[2] = tind->GetValueTexture(0).GetObj()->GetBooTexture(); + texCount = 3; + } + } + + boo::IGraphicsBuffer* uniforms[] = {gen.m_uniformBuf}; + + if (regPipeline) + gen.m_normalDataBind = CGraphics::g_BooFactory->newShaderDataBinding(regPipeline, nullptr, nullptr, + gen.m_instBuf, nullptr, 1, uniforms, + texCount, textures); + if (redToAlphaPipeline) + gen.m_redToAlphaDataBind = CGraphics::g_BooFactory->newShaderDataBinding(redToAlphaPipeline, nullptr, nullptr, + gen.m_instBuf, nullptr, 1, uniforms, + texCount, textures); + } +}; + +CElementGenShaders::IDataBindingFactory* CElementGenShaders::Initialize(boo::VulkanDataFactory& factory) +{ + static const boo::VertexElementDescriptor TexFmtTex[] = + { + {nullptr, nullptr, boo::VertexSemantic::Position4 | boo::VertexSemantic::Instanced, 0}, + {nullptr, nullptr, boo::VertexSemantic::Position4 | boo::VertexSemantic::Instanced, 1}, + {nullptr, nullptr, boo::VertexSemantic::Position4 | boo::VertexSemantic::Instanced, 2}, + {nullptr, nullptr, boo::VertexSemantic::Position4 | boo::VertexSemantic::Instanced, 3}, + {nullptr, nullptr, boo::VertexSemantic::Color | boo::VertexSemantic::Instanced}, + {nullptr, nullptr, boo::VertexSemantic::UV4 | boo::VertexSemantic::Instanced, 0}, + {nullptr, nullptr, boo::VertexSemantic::UV4 | boo::VertexSemantic::Instanced, 1}, + {nullptr, nullptr, boo::VertexSemantic::UV4 | boo::VertexSemantic::Instanced, 2}, + {nullptr, nullptr, boo::VertexSemantic::UV4 | boo::VertexSemantic::Instanced, 3} + }; + m_vtxFormatTex = factory.newVertexFormat(9, TexFmtTex); + + static const boo::VertexElementDescriptor TexFmtIndTex[] = + { + {nullptr, nullptr, boo::VertexSemantic::Position4 | boo::VertexSemantic::Instanced, 0}, + {nullptr, nullptr, boo::VertexSemantic::Position4 | boo::VertexSemantic::Instanced, 1}, + {nullptr, nullptr, boo::VertexSemantic::Position4 | boo::VertexSemantic::Instanced, 2}, + {nullptr, nullptr, boo::VertexSemantic::Position4 | boo::VertexSemantic::Instanced, 3}, + {nullptr, nullptr, boo::VertexSemantic::Color | boo::VertexSemantic::Instanced}, + {nullptr, nullptr, boo::VertexSemantic::UV4 | boo::VertexSemantic::Instanced, 0}, + {nullptr, nullptr, boo::VertexSemantic::UV4 | boo::VertexSemantic::Instanced, 1}, + {nullptr, nullptr, boo::VertexSemantic::UV4 | boo::VertexSemantic::Instanced, 2}, + {nullptr, nullptr, boo::VertexSemantic::UV4 | boo::VertexSemantic::Instanced, 3}, + {nullptr, nullptr, boo::VertexSemantic::UV4 | boo::VertexSemantic::Instanced, 4}, + {nullptr, nullptr, boo::VertexSemantic::UV4 | boo::VertexSemantic::Instanced, 5}, + {nullptr, nullptr, boo::VertexSemantic::UV4 | boo::VertexSemantic::Instanced, 6}, + {nullptr, nullptr, boo::VertexSemantic::UV4 | boo::VertexSemantic::Instanced, 7} + }; + m_vtxFormatIndTex = CGraphics::g_BooFactory->newVertexFormat(13, TexFmtIndTex); + + static const boo::VertexElementDescriptor TexFmtNoTex[] = + { + {nullptr, nullptr, boo::VertexSemantic::Position4 | boo::VertexSemantic::Instanced, 0}, + {nullptr, nullptr, boo::VertexSemantic::Position4 | boo::VertexSemantic::Instanced, 1}, + {nullptr, nullptr, boo::VertexSemantic::Position4 | boo::VertexSemantic::Instanced, 2}, + {nullptr, nullptr, boo::VertexSemantic::Position4 | boo::VertexSemantic::Instanced, 3}, + {nullptr, nullptr, boo::VertexSemantic::Color | boo::VertexSemantic::Instanced} + }; + m_vtxFormatNoTex = CGraphics::g_BooFactory->newVertexFormat(5, TexFmtNoTex); + + m_texZTestZWrite = factory.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_vtxFormatTex, + boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, + true, true, false); + m_texNoZTestZWrite = factory.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_vtxFormatTex, + boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, + false, true, false); + m_texZTestNoZWrite = factory.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_vtxFormatTex, + boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, + true, false, false); + m_texNoZTestNoZWrite = factory.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_vtxFormatTex, + boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, + false, false, false); + + m_texAdditiveZTest = factory.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_vtxFormatTex, + boo::BlendFactor::SrcAlpha, boo::BlendFactor::One, + true, false, false); + m_texAdditiveNoZTest = factory.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_vtxFormatTex, + boo::BlendFactor::SrcAlpha, boo::BlendFactor::One, + false, false, false); + + m_texRedToAlphaZTest = factory.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX_REDTOALPHA, m_vtxFormatTex, + boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, + true, false, false); + m_texRedToAlphaNoZTest = factory.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX_REDTOALPHA, m_vtxFormatTex, + boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, + false, false, false); + + m_indTexZWrite = factory.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_INDTEX, m_vtxFormatIndTex, + boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, + true, true, false); + m_indTexNoZWrite = factory.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_INDTEX, m_vtxFormatIndTex, + boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, + true, false, false); + m_indTexAdditive = factory.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_INDTEX, m_vtxFormatIndTex, + boo::BlendFactor::SrcAlpha, boo::BlendFactor::One, + true, true, false); + + m_cindTexZWrite = factory.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_CINDTEX, m_vtxFormatIndTex, + boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, + true, true, false); + m_cindTexNoZWrite = factory.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_CINDTEX, m_vtxFormatIndTex, + boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, + true, false, false); + m_cindTexAdditive = factory.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_CINDTEX, m_vtxFormatIndTex, + boo::BlendFactor::SrcAlpha, boo::BlendFactor::One, + true, true, false); + + m_noTexZTestZWrite = factory.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_vtxFormatNoTex, + boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, + true, true, false); + m_noTexNoZTestZWrite = factory.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_vtxFormatNoTex, + boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, + false, true, false); + m_noTexZTestNoZWrite = factory.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_vtxFormatNoTex, + boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, + true, false, false); + m_noTexNoZTestNoZWrite = factory.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_vtxFormatNoTex, + boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, + false, false, false); + + m_noTexAdditiveZTest = factory.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_vtxFormatNoTex, + boo::BlendFactor::SrcAlpha, boo::BlendFactor::One, + true, false, false); + m_noTexAdditiveNoZTest = factory.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_vtxFormatNoTex, + boo::BlendFactor::SrcAlpha, boo::BlendFactor::One, + false, false, false); + + return new struct VulkanElementDataBindingFactory; +} +#endif + } diff --git a/hecl b/hecl index e8ab7ce9b..2ff161839 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit e8ab7ce9b252f02674c88b39a8cdf0a32cc3ba6e +Subproject commit 2ff161839491dd42362a680221f5ef4bc95f32cc diff --git a/libSpecter b/libSpecter index 38b3396e0..c83c1f0b9 160000 --- a/libSpecter +++ b/libSpecter @@ -1 +1 @@ -Subproject commit 38b3396e0853e9bf446859a9d8b042044d9fd78e +Subproject commit c83c1f0b939115497f4a15cfbc2669445e07bdb7