diff --git a/DataSpec/DNAMP1/STRG.cpp b/DataSpec/DNAMP1/STRG.cpp index 4f20480c1..05e1d4738 100644 --- a/DataSpec/DNAMP1/STRG.cpp +++ b/DataSpec/DNAMP1/STRG.cpp @@ -34,7 +34,7 @@ static uint32_t ParseTag(const char16_t* str) for (i=0 ; i<8 && str[i] ; ++i) parseStr[i] = str[i]; parseStr[i] = '\0'; - return strtol(parseStr, nullptr, 16); + return strtoul(parseStr, nullptr, 16); } static std::u16string::const_iterator SkipCommas(std::u16string& ret, diff --git a/Runtime/Graphics/Shaders/CCameraBlurFilterGLSL.cpp b/Runtime/Graphics/Shaders/CCameraBlurFilterGLSL.cpp index 95513dec2..de3797664 100644 --- a/Runtime/Graphics/Shaders/CCameraBlurFilterGLSL.cpp +++ b/Runtime/Graphics/Shaders/CCameraBlurFilterGLSL.cpp @@ -80,6 +80,7 @@ BOO_GLSL_BINDING_HEAD URDE_DECL_SPECIALIZE_SHADER(CCameraBlurFilter) +static boo::IVertexFormat* s_VtxFmt = nullptr; static boo::IShaderPipeline* s_Pipeline = nullptr; struct CCameraBlurFilterGLDataBindingFactory : TShader::IDataBindingFactory @@ -113,7 +114,7 @@ struct CCameraBlurFilterVulkanDataBindingFactory : TShader::I boo::IGraphicsBuffer* bufs[] = {filter.m_uniBuf}; boo::ITexture* texs[] = {CGraphics::g_SpareTexture}; - return cctx.newShaderDataBinding(s_Pipeline, vtxFmt, + return cctx.newShaderDataBinding(s_Pipeline, s_VtxFmt, filter.m_vbo, nullptr, nullptr, 1, bufs, nullptr, nullptr, nullptr, 1, texs); } @@ -137,8 +138,8 @@ TShader::IDataBindingFactory* CCameraBlurFilter::Initialize(b {nullptr, nullptr, boo::VertexSemantic::Position4}, {nullptr, nullptr, boo::VertexSemantic::UV4} }; - vtxFmtOut = ctx.newVertexFormat(2, VtxVmt); - s_Pipeline = ctx.newShaderPipeline(VS, FS, vtxFmtOut, boo::BlendFactor::SrcAlpha, + s_VtxFmt = ctx.newVertexFormat(2, VtxVmt); + s_Pipeline = ctx.newShaderPipeline(VS, FS, s_VtxFmt, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false); return new CCameraBlurFilterVulkanDataBindingFactory; } diff --git a/Runtime/Graphics/Shaders/CCameraBlurFilterHLSL.cpp b/Runtime/Graphics/Shaders/CCameraBlurFilterHLSL.cpp index 0cba6be98..7cb9bc4f3 100644 --- a/Runtime/Graphics/Shaders/CCameraBlurFilterHLSL.cpp +++ b/Runtime/Graphics/Shaders/CCameraBlurFilterHLSL.cpp @@ -88,36 +88,35 @@ static const char* FS = URDE_DECL_SPECIALIZE_SHADER(CCameraBlurFilter) +static boo::IVertexFormat* s_VtxFmt = nullptr; +static boo::IShaderPipeline* s_Pipeline = nullptr; + struct CCameraBlurFilterD3DDataBindingFactory : TShader::IDataBindingFactory { boo::IShaderDataBinding* BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx, - boo::IShaderPipeline* pipeline, - boo::IVertexFormat* vtxFmt, CCameraBlurFilter& filter) { boo::ID3DDataFactory::Context& cctx = static_cast(ctx); boo::IGraphicsBuffer* bufs[] = {filter.m_uniBuf}; boo::ITexture* texs[] = {CGraphics::g_SpareTexture}; - return cctx.newShaderDataBinding(pipeline, vtxFmt, + return cctx.newShaderDataBinding(s_Pipeline, s_VtxFmt, filter.m_vbo, nullptr, nullptr, 1, bufs, nullptr, nullptr, nullptr, 1, texs); } }; -TShader::IDataBindingFactory* CCameraBlurFilter::Initialize(boo::ID3DDataFactory::Context& ctx, - boo::IShaderPipeline*& pipeOut, - boo::IVertexFormat*& vtxFmtOut) +TShader::IDataBindingFactory* CCameraBlurFilter::Initialize(boo::ID3DDataFactory::Context& ctx) { const boo::VertexElementDescriptor VtxVmt[] = { {nullptr, nullptr, boo::VertexSemantic::Position4}, {nullptr, nullptr, boo::VertexSemantic::UV4} }; - vtxFmtOut = ctx.newVertexFormat(2, VtxVmt); - pipeOut = ctx.newShaderPipeline(VS, FS, ComPtr(), ComPtr(), ComPtr(), - vtxFmtOut, boo::BlendFactor::SrcAlpha, - boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false); + s_VtxFmt = ctx.newVertexFormat(2, VtxVmt); + s_Pipeline = ctx.newShaderPipeline(VS, FS, ComPtr(), ComPtr(), ComPtr(), + s_VtxFmt, boo::BlendFactor::SrcAlpha, + boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false); return new CCameraBlurFilterD3DDataBindingFactory; } diff --git a/Runtime/Graphics/Shaders/CColoredQuadFilterGLSL.cpp b/Runtime/Graphics/Shaders/CColoredQuadFilterGLSL.cpp index 8ed0499a8..71364e8df 100644 --- a/Runtime/Graphics/Shaders/CColoredQuadFilterGLSL.cpp +++ b/Runtime/Graphics/Shaders/CColoredQuadFilterGLSL.cpp @@ -45,6 +45,7 @@ BOO_GLSL_BINDING_HEAD URDE_DECL_SPECIALIZE_MULTI_BLEND_SHADER(CColoredQuadFilter) +static boo::IVertexFormat* s_VtxFmt = nullptr; static boo::IShaderPipeline* s_AlphaPipeline = nullptr; static boo::IShaderPipeline* s_AddPipeline = nullptr; static boo::IShaderPipeline* s_MultPipeline = nullptr; @@ -88,12 +89,13 @@ struct CColoredQuadFilterGLDataBindingFactory : TMultiBlendShader::IDataBindingFactory { boo::IShaderDataBinding* BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx, + CCameraFilterPass::EFilterType type, CColoredQuadFilter& filter) { boo::VulkanDataFactory::Context& cctx = static_cast(ctx); boo::IGraphicsBuffer* bufs[] = {filter.m_uniBuf}; - return cctx.newShaderDataBinding(SelectPipeline(type), vtxFmt, + return cctx.newShaderDataBinding(SelectPipeline(type), s_VtxFmt, filter.m_vbo, nullptr, nullptr, 1, bufs, nullptr, nullptr, nullptr, 0, nullptr); } @@ -121,12 +123,12 @@ CColoredQuadFilter::Initialize(boo::VulkanDataFactory::Context& ctx) { {nullptr, nullptr, boo::VertexSemantic::Position4} }; - vtxFmtOut = ctx.newVertexFormat(1, VtxVmt); - s_AlphaPipeline = ctx.newShaderPipeline(VS, FS, vtxFmtOut, boo::BlendFactor::SrcAlpha, + s_VtxFmt = ctx.newVertexFormat(1, VtxVmt); + s_AlphaPipeline = ctx.newShaderPipeline(VS, FS, s_VtxFmt, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false); - s_AddPipeline = ctx.newShaderPipeline(VS, FS, vtxFmtOut, boo::BlendFactor::SrcAlpha, + s_AddPipeline = ctx.newShaderPipeline(VS, FS, s_VtxFmt, boo::BlendFactor::SrcAlpha, boo::BlendFactor::One, boo::Primitive::TriStrips, false, false, false); - s_MultPipeline = ctx.newShaderPipeline(VS, FS, vtxFmtOut, boo::BlendFactor::SrcColor, + s_MultPipeline = ctx.newShaderPipeline(VS, FS, s_VtxFmt, boo::BlendFactor::SrcColor, boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false, false); return new CColoredQuadFilterVulkanDataBindingFactory; } diff --git a/Runtime/Graphics/Shaders/CColoredQuadFilterHLSL.cpp b/Runtime/Graphics/Shaders/CColoredQuadFilterHLSL.cpp index 2aa191e19..44b5f562d 100644 --- a/Runtime/Graphics/Shaders/CColoredQuadFilterHLSL.cpp +++ b/Runtime/Graphics/Shaders/CColoredQuadFilterHLSL.cpp @@ -45,43 +45,58 @@ static const char* FS = URDE_DECL_SPECIALIZE_MULTI_BLEND_SHADER(CColoredQuadFilter) +static boo::IVertexFormat* s_VtxFmt = nullptr; +static boo::IShaderPipeline* s_AlphaPipeline = nullptr; +static boo::IShaderPipeline* s_AddPipeline = nullptr; +static boo::IShaderPipeline* s_MultPipeline = nullptr; + +static boo::IShaderPipeline* SelectPipeline(CCameraFilterPass::EFilterType type) +{ + switch (type) + { + case CCameraFilterPass::EFilterType::Blend: + return s_AlphaPipeline; + case CCameraFilterPass::EFilterType::Add: + return s_AddPipeline; + case CCameraFilterPass::EFilterType::Multiply: + return s_MultPipeline; + default: + return nullptr; + } +} + struct CColoredQuadFilterD3DDataBindingFactory : TMultiBlendShader::IDataBindingFactory { boo::IShaderDataBinding* BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx, - boo::IShaderPipeline* pipeline, - boo::IVertexFormat* vtxFmt, + CCameraFilterPass::EFilterType type, CColoredQuadFilter& filter) { boo::ID3DDataFactory::Context& cctx = static_cast(ctx); boo::IGraphicsBuffer* bufs[] = {filter.m_uniBuf}; - return cctx.newShaderDataBinding(pipeline, vtxFmt, + return cctx.newShaderDataBinding(SelectPipeline(type), s_VtxFmt, filter.m_vbo, nullptr, nullptr, 1, bufs, nullptr, nullptr, nullptr, 0, nullptr); } }; TMultiBlendShader::IDataBindingFactory* -CColoredQuadFilter::Initialize(boo::ID3DDataFactory::Context& ctx, - boo::IShaderPipeline*& alphaPipeOut, - boo::IShaderPipeline*& additivePipeOut, - boo::IShaderPipeline*& colorMultiplyPipeOut, - boo::IVertexFormat*& vtxFmtOut) +CColoredQuadFilter::Initialize(boo::ID3DDataFactory::Context& ctx) { const boo::VertexElementDescriptor VtxVmt[] = { {nullptr, nullptr, boo::VertexSemantic::Position4} }; - vtxFmtOut = ctx.newVertexFormat(1, VtxVmt); - alphaPipeOut = ctx.newShaderPipeline(VS, FS, ComPtr(), ComPtr(), ComPtr(), - vtxFmtOut, boo::BlendFactor::SrcAlpha, - boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false); - additivePipeOut = ctx.newShaderPipeline(VS, FS, ComPtr(), ComPtr(), ComPtr(), - vtxFmtOut, boo::BlendFactor::SrcAlpha, - boo::BlendFactor::One, boo::Primitive::TriStrips, false, false, false); - colorMultiplyPipeOut = ctx.newShaderPipeline(VS, FS, ComPtr(), ComPtr(), ComPtr(), - vtxFmtOut, boo::BlendFactor::SrcColor, - boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false, false); + s_VtxFmt = ctx.newVertexFormat(1, VtxVmt); + s_AlphaPipeline = ctx.newShaderPipeline(VS, FS, ComPtr(), ComPtr(), ComPtr(), + s_VtxFmt, boo::BlendFactor::SrcAlpha, + boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false); + s_AddPipeline = ctx.newShaderPipeline(VS, FS, ComPtr(), ComPtr(), ComPtr(), + s_VtxFmt, boo::BlendFactor::SrcAlpha, + boo::BlendFactor::One, boo::Primitive::TriStrips, false, false, false); + s_MultPipeline = ctx.newShaderPipeline(VS, FS, ComPtr(), ComPtr(), ComPtr(), + s_VtxFmt, boo::BlendFactor::SrcColor, + boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false, false); return new CColoredQuadFilterD3DDataBindingFactory; } diff --git a/Runtime/Graphics/Shaders/CSpaceWarpFilterGLSL.cpp b/Runtime/Graphics/Shaders/CSpaceWarpFilterGLSL.cpp index 2267f27db..aeb841885 100644 --- a/Runtime/Graphics/Shaders/CSpaceWarpFilterGLSL.cpp +++ b/Runtime/Graphics/Shaders/CSpaceWarpFilterGLSL.cpp @@ -53,6 +53,7 @@ BOO_GLSL_BINDING_HEAD URDE_DECL_SPECIALIZE_SHADER(CSpaceWarpFilter) +static boo::IVertexFormat* s_VtxFmt = nullptr; static boo::IShaderPipeline* s_Pipeline = nullptr; struct CSpaceWarpFilterGLDataBindingFactory : TShader::IDataBindingFactory @@ -86,7 +87,7 @@ struct CSpaceWarpFilterVulkanDataBindingFactory : TShader::IDa boo::IGraphicsBuffer* bufs[] = {filter.m_uniBuf}; boo::ITexture* texs[] = {CGraphics::g_SpareTexture, filter.m_warpTex}; - return cctx.newShaderDataBinding(pipeline, vtxFmt, + return cctx.newShaderDataBinding(s_Pipeline, s_VtxFmt, filter.m_vbo, nullptr, nullptr, 1, bufs, nullptr, nullptr, nullptr, 2, texs); } @@ -110,8 +111,8 @@ TShader::IDataBindingFactory* CSpaceWarpFilter::Initialize(boo {nullptr, nullptr, boo::VertexSemantic::Position4}, {nullptr, nullptr, boo::VertexSemantic::UV4} }; - vtxFmtOut = ctx.newVertexFormat(2, VtxVmt); - s_Pipeline = ctx.newShaderPipeline(VS, FS, vtxFmtOut, boo::BlendFactor::One, + s_VtxFmt = ctx.newVertexFormat(2, VtxVmt); + s_Pipeline = ctx.newShaderPipeline(VS, FS, s_VtxFmt, boo::BlendFactor::One, boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false, false); return new CSpaceWarpFilterVulkanDataBindingFactory; } diff --git a/Runtime/Graphics/Shaders/CSpaceWarpFilterHLSL.cpp b/Runtime/Graphics/Shaders/CSpaceWarpFilterHLSL.cpp index 6719aa805..73f7f54b5 100644 --- a/Runtime/Graphics/Shaders/CSpaceWarpFilterHLSL.cpp +++ b/Runtime/Graphics/Shaders/CSpaceWarpFilterHLSL.cpp @@ -55,36 +55,35 @@ static const char* FS = URDE_DECL_SPECIALIZE_SHADER(CSpaceWarpFilter) +static boo::IVertexFormat* s_VtxFmt = nullptr; +static boo::IShaderPipeline* s_Pipeline = nullptr; + struct CSpaceWarpFilterD3DDataBindingFactory : TShader::IDataBindingFactory { boo::IShaderDataBinding* BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx, - boo::IShaderPipeline* pipeline, - boo::IVertexFormat* vtxFmt, CSpaceWarpFilter& filter) { boo::ID3DDataFactory::Context& cctx = static_cast(ctx); boo::IGraphicsBuffer* bufs[] = {filter.m_uniBuf}; boo::ITexture* texs[] = {CGraphics::g_SpareTexture, filter.m_warpTex}; - return cctx.newShaderDataBinding(pipeline, vtxFmt, + return cctx.newShaderDataBinding(s_Pipeline, s_VtxFmt, filter.m_vbo, nullptr, nullptr, 1, bufs, nullptr, nullptr, nullptr, 2, texs); } }; -TShader::IDataBindingFactory* CSpaceWarpFilter::Initialize(boo::ID3DDataFactory::Context& ctx, - boo::IShaderPipeline*& pipeOut, - boo::IVertexFormat*& vtxFmtOut) +TShader::IDataBindingFactory* CSpaceWarpFilter::Initialize(boo::ID3DDataFactory::Context& ctx) { const boo::VertexElementDescriptor VtxVmt[] = { {nullptr, nullptr, boo::VertexSemantic::Position4}, {nullptr, nullptr, boo::VertexSemantic::UV4} }; - vtxFmtOut = ctx.newVertexFormat(2, VtxVmt); - pipeOut = ctx.newShaderPipeline(VS, FS, ComPtr(), ComPtr(), ComPtr(), - vtxFmtOut, boo::BlendFactor::One, - boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false, false); + s_VtxFmt = ctx.newVertexFormat(2, VtxVmt); + s_Pipeline = ctx.newShaderPipeline(VS, FS, ComPtr(), ComPtr(), ComPtr(), + s_VtxFmt, boo::BlendFactor::One, + boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false, false); return new CSpaceWarpFilterD3DDataBindingFactory; } diff --git a/Runtime/Graphics/Shaders/CTextSupportShaderHLSL.cpp b/Runtime/Graphics/Shaders/CTextSupportShaderHLSL.cpp index e69de29bb..9fd4bc93f 100644 --- a/Runtime/Graphics/Shaders/CTextSupportShaderHLSL.cpp +++ b/Runtime/Graphics/Shaders/CTextSupportShaderHLSL.cpp @@ -0,0 +1,154 @@ +#include "CTextSupportShader.hpp" +#include "GuiSys/CTextRenderBuffer.hpp" +#include "TMultiBlendShader.hpp" +#include "Graphics/CTexture.hpp" + +namespace urde +{ + +static const char* TextVS = +"struct InstData\n" +"{\n" +" float4 posIn[4] : POSITION;\n" +" float4 uvIn[4] : UV;\n" +" float4 fontColorIn : COLOR0;\n" +" float4 outlineColorIn : COLOR1;\n" +"};\n" +"\n" +"cbuffer TextSupportUniform : register(b0)\n" +"{\n" +" float4x4 mtx;\n" +" float4 color;\n" +"};\n" +"\n" +"struct VertToFrag\n" +"{\n" +" float4 pos : SV_Position;\n" +" float4 fontColor : COLOR0;\n" +" float4 outlineColor : COLOR1;\n" +" float3 uv : UV;\n" +"};\n" +"\n" +"VertToFrag main(in InstData inst, in uint vertId : SV_VertexID)\n" +"{\n" +" VertToFrag vtf;\n" +" vtf.fontColor = color * inst.fontColorIn;\n" +" vtf.outlineColor = color * inst.outlineColorIn;\n" +" vtf.uv = inst.uvIn[vertId].xyz;\n" +" vtf.pos = mul(mtx, float4(inst.posIn[vertId].xyz, 1.0));\n" +" return vtf;\n" +"}\n"; + +static const char* TextFS = +"struct VertToFrag\n" +"{\n" +" float4 pos : SV_Position;\n" +" float4 fontColor : COLOR0;\n" +" float4 outlineColor : COLOR1;\n" +" float3 uv : UV;\n" +"};\n" +"\n" +"Texture2DArray tex : register(t0);\n" +"SamplerState samp : register(s0);\n" +"\n" +"float4 main(in VertToFrag vtf) : SV_Target0\n" +"{\n" +" float4 texel = tex.Sample(samp, vtf.uv.xyz);\n" +" return vtf.fontColor * texel.r + vtf.outlineColor * texel.g;\n" +"}\n"; + +static const char* ImgVS = +"struct InstData\n" +"{\n" +" float4 posIn[4] : POSITION;\n" +" float4 uvIn[4] : UV;\n" +" float4 colorIn : COLOR;\n" +"};\n" +"\n" +"cbuffer TextSupportUniform : register(b0)\n" +"{\n" +" float4x4 mtx;\n" +" float4 color;\n" +"};\n" +"\n" +"struct VertToFrag\n" +"{\n" +" float4 pos : SV_Position;\n" +" float4 color : COLOR;\n" +" float2 uv : UV;\n" +"};\n" +"\n" +"VertToFrag main(in InstData inst, in uint vertId : SV_VertexID)\n" +"{\n" +" VertToFrag vtf;\n" +" vtf.color = color * inst.colorIn;\n" +" vtf.uv = inst.uvIn[vertId].xy;\n" +" vtf.pos = mul(mtx, float4(inst.posIn[vertId].xyz, 1.0));\n" +" return vtf;\n" +"}\n"; + +static const char* ImgFS = +"struct VertToFrag\n" +"{\n" +" float4 pos : SV_Position;\n" +" float4 color : COLOR;\n" +" float2 uv : UV;\n" +"};\n" +"\n" +"Texture2D tex : register(t0);\n" +"SamplerState samp : register(s0);\n" +"\n" +"float4 main(in VertToFrag vtf) : SV_Target0\n" +"{\n" +" float4 texel = tex.Sample(samp, vtf.uv);\n" +" return vtf.color * texel;\n" +"}\n"; + +TMultiBlendShader::IDataBindingFactory* +CTextSupportShader::Initialize(boo::ID3DDataFactory::Context& ctx) +{ + boo::VertexElementDescriptor TextVtxVmt[] = + { + {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::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::Color | boo::VertexSemantic::Instanced, 0}, + {nullptr, nullptr, boo::VertexSemantic::Color | boo::VertexSemantic::Instanced, 1}, + }; + s_TextVtxFmt = ctx.newVertexFormat(10, TextVtxVmt); + s_TextAlphaPipeline = ctx.newShaderPipeline(TextVS, TextFS, ComPtr(), ComPtr(), ComPtr(), + s_TextVtxFmt, boo::BlendFactor::SrcAlpha, + boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false); + s_TextAddPipeline = ctx.newShaderPipeline(TextVS, TextFS, ComPtr(), ComPtr(), ComPtr(), + s_TextVtxFmt, boo::BlendFactor::SrcAlpha, + boo::BlendFactor::One, boo::Primitive::TriStrips, false, false, false); + + boo::VertexElementDescriptor ImageVtxVmt[] = + { + {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::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::Color | boo::VertexSemantic::Instanced, 0}, + }; + s_ImageVtxFmt = ctx.newVertexFormat(9, ImageVtxVmt); + s_ImageAlphaPipeline = ctx.newShaderPipeline(ImgVS, ImgFS, ComPtr(), ComPtr(), ComPtr(), + s_ImageVtxFmt, boo::BlendFactor::SrcAlpha, + boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false); + s_ImageAddPipeline = ctx.newShaderPipeline(ImgVS, ImgFS, ComPtr(), ComPtr(), ComPtr(), + s_ImageVtxFmt, boo::BlendFactor::SrcAlpha, + boo::BlendFactor::One, boo::Primitive::TriStrips, false, false, false); + + return nullptr; +} + +} diff --git a/Runtime/Graphics/Shaders/CTexturedQuadFilterGLSL.cpp b/Runtime/Graphics/Shaders/CTexturedQuadFilterGLSL.cpp index 3a3bfd9fd..4ce447729 100644 --- a/Runtime/Graphics/Shaders/CTexturedQuadFilterGLSL.cpp +++ b/Runtime/Graphics/Shaders/CTexturedQuadFilterGLSL.cpp @@ -97,6 +97,7 @@ BOO_GLSL_BINDING_HEAD URDE_DECL_SPECIALIZE_MULTI_BLEND_SHADER(CTexturedQuadFilter) +static boo::IVertexFormat* s_VtxFmt = nullptr; static boo::IShaderPipeline* s_AlphaPipeline = nullptr; static boo::IShaderPipeline* s_AddPipeline = nullptr; static boo::IShaderPipeline* s_MultPipeline = nullptr; @@ -116,6 +117,7 @@ static boo::IShaderPipeline* SelectPipeline(CCameraFilterPass::EFilterType type) } } +static boo::IVertexFormat* s_AVtxFmt = nullptr; static boo::IShaderPipeline* s_AAlphaPipeline = nullptr; static boo::IShaderPipeline* s_AAddPipeline = nullptr; static boo::IShaderPipeline* s_AMultPipeline = nullptr; @@ -168,7 +170,7 @@ struct CTexturedQuadFilterVulkanDataBindingFactory : TMultiBlendShader::IDataBindingFactory { boo::IShaderDataBinding* BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx, - boo::IShaderPipeline* pipeline, - boo::IVertexFormat* vtxFmt, + CCameraFilterPass::EFilterType type, CTexturedQuadFilter& filter) { boo::ID3DDataFactory::Context& cctx = static_cast(ctx); boo::IGraphicsBuffer* bufs[] = {filter.m_uniBuf}; boo::ITexture* texs[] = {filter.m_booTex}; - return cctx.newShaderDataBinding(pipeline, vtxFmt, + return cctx.newShaderDataBinding(SelectPipeline(type), s_VtxFmt, filter.m_vbo, nullptr, nullptr, 1, bufs, nullptr, nullptr, nullptr, 1, texs); } }; TMultiBlendShader::IDataBindingFactory* -CTexturedQuadFilter::Initialize(boo::ID3DDataFactory::Context& ctx, - boo::IShaderPipeline*& alphaPipeOut, - boo::IShaderPipeline*& additivePipeOut, - boo::IShaderPipeline*& colorMultiplyPipeOut, - boo::IVertexFormat*& vtxFmtOut) +CTexturedQuadFilter::Initialize(boo::ID3DDataFactory::Context& ctx) { const boo::VertexElementDescriptor VtxVmt[] = { {nullptr, nullptr, boo::VertexSemantic::Position4}, {nullptr, nullptr, boo::VertexSemantic::UV4} }; - vtxFmtOut = ctx.newVertexFormat(2, VtxVmt); - alphaPipeOut = ctx.newShaderPipeline(VSNoFlip, FS, ComPtr(), ComPtr(), ComPtr(), - vtxFmtOut, boo::BlendFactor::SrcAlpha, - boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false); - additivePipeOut = ctx.newShaderPipeline(VSNoFlip, FS, ComPtr(), ComPtr(), ComPtr(), - vtxFmtOut, boo::BlendFactor::SrcAlpha, - boo::BlendFactor::One, boo::Primitive::TriStrips, false, false, false); - colorMultiplyPipeOut = ctx.newShaderPipeline(VSNoFlip, FS, ComPtr(), ComPtr(), ComPtr(), - vtxFmtOut, boo::BlendFactor::SrcColor, - boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false, false); + s_VtxFmt = ctx.newVertexFormat(2, VtxVmt); + s_AlphaPipeline = ctx.newShaderPipeline(VSNoFlip, FS, ComPtr(), ComPtr(), ComPtr(), + s_VtxFmt, boo::BlendFactor::SrcAlpha, + boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false); + s_AddPipeline = ctx.newShaderPipeline(VSNoFlip, FS, ComPtr(), ComPtr(), ComPtr(), + s_VtxFmt, boo::BlendFactor::SrcAlpha, + boo::BlendFactor::One, boo::Primitive::TriStrips, false, false, false); + s_MultPipeline = ctx.newShaderPipeline(VSNoFlip, FS, ComPtr(), ComPtr(), ComPtr(), + s_VtxFmt, boo::BlendFactor::SrcColor, + boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false, false); return new CTexturedQuadFilterD3DDataBindingFactory; } +static boo::IVertexFormat* s_AVtxFmt = nullptr; +static boo::IShaderPipeline* s_AAlphaPipeline = nullptr; +static boo::IShaderPipeline* s_AAddPipeline = nullptr; +static boo::IShaderPipeline* s_AMultPipeline = nullptr; + +static boo::IShaderPipeline* SelectAlphaPipeline(CCameraFilterPass::EFilterType type) +{ + switch (type) + { + case CCameraFilterPass::EFilterType::Blend: + return s_AAlphaPipeline; + case CCameraFilterPass::EFilterType::Add: + return s_AAddPipeline; + case CCameraFilterPass::EFilterType::Multiply: + return s_AMultPipeline; + default: + return nullptr; + } +} + struct CTexturedQuadFilterAlphaD3DDataBindingFactory : TMultiBlendShader::IDataBindingFactory { boo::IShaderDataBinding* BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx, - boo::IShaderPipeline* pipeline, - boo::IVertexFormat* vtxFmt, + CCameraFilterPass::EFilterType type, CTexturedQuadFilterAlpha& filter) { boo::ID3DDataFactory::Context& cctx = static_cast(ctx); boo::IGraphicsBuffer* bufs[] = {filter.m_uniBuf}; boo::ITexture* texs[] = {filter.m_booTex}; - return cctx.newShaderDataBinding(pipeline, vtxFmt, + return cctx.newShaderDataBinding(SelectAlphaPipeline(type), s_AVtxFmt, filter.m_vbo, nullptr, nullptr, 1, bufs, nullptr, nullptr, nullptr, 1, texs); } }; TMultiBlendShader::IDataBindingFactory* -CTexturedQuadFilterAlpha::Initialize(boo::ID3DDataFactory::Context& ctx, - boo::IShaderPipeline*& alphaPipeOut, - boo::IShaderPipeline*& additivePipeOut, - boo::IShaderPipeline*& colorMultiplyPipeOut, - boo::IVertexFormat*& vtxFmtOut) +CTexturedQuadFilterAlpha::Initialize(boo::ID3DDataFactory::Context& ctx) { const boo::VertexElementDescriptor VtxVmt[] = { {nullptr, nullptr, boo::VertexSemantic::Position4}, {nullptr, nullptr, boo::VertexSemantic::UV4} }; - vtxFmtOut = ctx.newVertexFormat(2, VtxVmt); - alphaPipeOut = ctx.newShaderPipeline(VSFlip, FSAlpha, ComPtr(), ComPtr(), ComPtr(), - vtxFmtOut, boo::BlendFactor::SrcAlpha, - boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false); - additivePipeOut = ctx.newShaderPipeline(VSFlip, FSAlpha, ComPtr(), ComPtr(), ComPtr(), - vtxFmtOut, boo::BlendFactor::SrcAlpha, - boo::BlendFactor::One, boo::Primitive::TriStrips, false, false, false); - colorMultiplyPipeOut = ctx.newShaderPipeline(VSFlip, FSAlpha, ComPtr(), ComPtr(), ComPtr(), - vtxFmtOut, boo::BlendFactor::SrcColor, - boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false, false); + s_AVtxFmt = ctx.newVertexFormat(2, VtxVmt); + s_AAlphaPipeline = ctx.newShaderPipeline(VSFlip, FSAlpha, ComPtr(), ComPtr(), ComPtr(), + s_AVtxFmt, boo::BlendFactor::SrcAlpha, + boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false); + s_AAddPipeline = ctx.newShaderPipeline(VSFlip, FSAlpha, ComPtr(), ComPtr(), ComPtr(), + s_AVtxFmt, boo::BlendFactor::SrcAlpha, + boo::BlendFactor::One, boo::Primitive::TriStrips, false, false, false); + s_AMultPipeline = ctx.newShaderPipeline(VSFlip, FSAlpha, ComPtr(), ComPtr(), ComPtr(), + s_AVtxFmt, boo::BlendFactor::SrcColor, + boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false, false); return new CTexturedQuadFilterAlphaD3DDataBindingFactory; } diff --git a/Runtime/Graphics/Shaders/CThermalColdFilterGLSL.cpp b/Runtime/Graphics/Shaders/CThermalColdFilterGLSL.cpp index 31f08470c..bc4a657c8 100644 --- a/Runtime/Graphics/Shaders/CThermalColdFilterGLSL.cpp +++ b/Runtime/Graphics/Shaders/CThermalColdFilterGLSL.cpp @@ -75,6 +75,7 @@ BOO_GLSL_BINDING_HEAD URDE_DECL_SPECIALIZE_SHADER(CThermalColdFilter) +static boo::IVertexFormat* s_VtxFmt = nullptr; static boo::IShaderPipeline* s_Pipeline = nullptr; struct CThermalColdFilterGLDataBindingFactory : TShader::IDataBindingFactory @@ -108,7 +109,7 @@ struct CThermalColdFilterVulkanDataBindingFactory : TShader: boo::IGraphicsBuffer* bufs[] = {filter.m_uniBuf}; boo::ITexture* texs[] = {CGraphics::g_SpareTexture, filter.m_shiftTex}; - return cctx.newShaderDataBinding(s_Pipeline, vtxFmt, + return cctx.newShaderDataBinding(s_Pipeline, s_VtxFmt, filter.m_vbo, nullptr, nullptr, 1, bufs, nullptr, nullptr, nullptr, 2, texs); } @@ -132,8 +133,8 @@ TShader::IDataBindingFactory* CThermalColdFilter::Initialize {nullptr, nullptr, boo::VertexSemantic::Position4}, {nullptr, nullptr, boo::VertexSemantic::UV4} }; - vtxFmtOut = ctx.newVertexFormat(2, VtxVmt); - s_Pipeline = ctx.newShaderPipeline(VS, FS, vtxFmtOut, boo::BlendFactor::One, + s_VtxFmt = ctx.newVertexFormat(2, VtxVmt); + s_Pipeline = ctx.newShaderPipeline(VS, FS, s_VtxFmt, boo::BlendFactor::One, boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false, false); return new CThermalColdFilterVulkanDataBindingFactory; } diff --git a/Runtime/Graphics/Shaders/CThermalColdFilterHLSL.cpp b/Runtime/Graphics/Shaders/CThermalColdFilterHLSL.cpp index d91aa179c..069f98d4c 100644 --- a/Runtime/Graphics/Shaders/CThermalColdFilterHLSL.cpp +++ b/Runtime/Graphics/Shaders/CThermalColdFilterHLSL.cpp @@ -77,36 +77,35 @@ static const char* FS = URDE_DECL_SPECIALIZE_SHADER(CThermalColdFilter) +static boo::IVertexFormat* s_VtxFmt = nullptr; +static boo::IShaderPipeline* s_Pipeline = nullptr; + struct CThermalColdFilterD3DDataBindingFactory : TShader::IDataBindingFactory { boo::IShaderDataBinding* BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx, - boo::IShaderPipeline* pipeline, - boo::IVertexFormat* vtxFmt, CThermalColdFilter& filter) { boo::ID3DDataFactory::Context& cctx = static_cast(ctx); boo::IGraphicsBuffer* bufs[] = {filter.m_uniBuf}; boo::ITexture* texs[] = {CGraphics::g_SpareTexture, filter.m_shiftTex}; - return cctx.newShaderDataBinding(pipeline, vtxFmt, + return cctx.newShaderDataBinding(s_Pipeline, s_VtxFmt, filter.m_vbo, nullptr, nullptr, 1, bufs, nullptr, nullptr, nullptr, 2, texs); } }; -TShader::IDataBindingFactory* CThermalColdFilter::Initialize(boo::ID3DDataFactory::Context& ctx, - boo::IShaderPipeline*& pipeOut, - boo::IVertexFormat*& vtxFmtOut) +TShader::IDataBindingFactory* CThermalColdFilter::Initialize(boo::ID3DDataFactory::Context& ctx) { const boo::VertexElementDescriptor VtxVmt[] = { {nullptr, nullptr, boo::VertexSemantic::Position4}, {nullptr, nullptr, boo::VertexSemantic::UV4} }; - vtxFmtOut = ctx.newVertexFormat(2, VtxVmt); - pipeOut = ctx.newShaderPipeline(VS, FS, ComPtr(), ComPtr(), ComPtr(), - vtxFmtOut, boo::BlendFactor::One, - boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false, false); + s_VtxFmt = ctx.newVertexFormat(2, VtxVmt); + s_Pipeline = ctx.newShaderPipeline(VS, FS, ComPtr(), ComPtr(), ComPtr(), + s_VtxFmt, boo::BlendFactor::One, + boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false, false); return new CThermalColdFilterD3DDataBindingFactory; } diff --git a/Runtime/Graphics/Shaders/CThermalHotFilterHLSL.cpp b/Runtime/Graphics/Shaders/CThermalHotFilterHLSL.cpp index 0b143f117..d7a89adb7 100644 --- a/Runtime/Graphics/Shaders/CThermalHotFilterHLSL.cpp +++ b/Runtime/Graphics/Shaders/CThermalHotFilterHLSL.cpp @@ -54,36 +54,35 @@ static const char* FS = URDE_DECL_SPECIALIZE_SHADER(CThermalHotFilter) +static boo::IVertexFormat* s_VtxFmt = nullptr; +static boo::IShaderPipeline* s_Pipeline = nullptr; + struct CThermalHotFilterD3DDataBindingFactory : TShader::IDataBindingFactory { boo::IShaderDataBinding* BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx, - boo::IShaderPipeline* pipeline, - boo::IVertexFormat* vtxFmt, CThermalHotFilter& filter) { boo::ID3DDataFactory::Context& cctx = static_cast(ctx); boo::IGraphicsBuffer* bufs[] = {filter.m_uniBuf}; boo::ITexture* texs[] = {CGraphics::g_SpareTexture, g_Renderer->GetThermoPalette()}; - return cctx.newShaderDataBinding(pipeline, vtxFmt, + return cctx.newShaderDataBinding(s_Pipeline, s_VtxFmt, filter.m_vbo, nullptr, nullptr, 1, bufs, nullptr, nullptr, nullptr, 2, texs); } }; -TShader::IDataBindingFactory* CThermalHotFilter::Initialize(boo::ID3DDataFactory::Context& ctx, - boo::IShaderPipeline*& pipeOut, - boo::IVertexFormat*& vtxFmtOut) +TShader::IDataBindingFactory* CThermalHotFilter::Initialize(boo::ID3DDataFactory::Context& ctx) { const boo::VertexElementDescriptor VtxVmt[] = { {nullptr, nullptr, boo::VertexSemantic::Position4}, {nullptr, nullptr, boo::VertexSemantic::UV4} }; - vtxFmtOut = ctx.newVertexFormat(2, VtxVmt); - pipeOut = ctx.newShaderPipeline(VS, FS, ComPtr(), ComPtr(), ComPtr(), - vtxFmtOut, boo::BlendFactor::DstAlpha, boo::BlendFactor::InvDstAlpha, - boo::Primitive::TriStrips, false, false, false); + s_VtxFmt = ctx.newVertexFormat(2, VtxVmt); + s_Pipeline = ctx.newShaderPipeline(VS, FS, ComPtr(), ComPtr(), ComPtr(), + s_VtxFmt, boo::BlendFactor::DstAlpha, boo::BlendFactor::InvDstAlpha, + boo::Primitive::TriStrips, false, false, false); return new CThermalHotFilterD3DDataBindingFactory; } diff --git a/Runtime/Graphics/Shaders/CXRayBlurFilterGLSL.cpp b/Runtime/Graphics/Shaders/CXRayBlurFilterGLSL.cpp index 72ad56c24..5e7589ee3 100644 --- a/Runtime/Graphics/Shaders/CXRayBlurFilterGLSL.cpp +++ b/Runtime/Graphics/Shaders/CXRayBlurFilterGLSL.cpp @@ -92,8 +92,6 @@ struct CXRayBlurFilterGLDataBindingFactory : TShader::IDataBind struct CXRayBlurFilterVulkanDataBindingFactory : TShader::IDataBindingFactory { boo::IShaderDataBinding* BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx, - boo::IShaderPipeline* pipeline, - boo::IVertexFormat* vtxFmt, CXRayBlurFilter& filter) { boo::VulkanDataFactory::Context& cctx = static_cast(ctx); diff --git a/Runtime/Graphics/Shaders/CXRayBlurFilterHLSL.cpp b/Runtime/Graphics/Shaders/CXRayBlurFilterHLSL.cpp index 129d8c3b2..6f8639d45 100644 --- a/Runtime/Graphics/Shaders/CXRayBlurFilterHLSL.cpp +++ b/Runtime/Graphics/Shaders/CXRayBlurFilterHLSL.cpp @@ -69,36 +69,35 @@ static const char* FS = URDE_DECL_SPECIALIZE_SHADER(CXRayBlurFilter) +static boo::IVertexFormat* s_VtxFmt = nullptr; +static boo::IShaderPipeline* s_Pipeline = nullptr; + struct CXRayBlurFilterD3DDataBindingFactory : TShader::IDataBindingFactory { boo::IShaderDataBinding* BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx, - boo::IShaderPipeline* pipeline, - boo::IVertexFormat* vtxFmt, CXRayBlurFilter& filter) { boo::ID3DDataFactory::Context& cctx = static_cast(ctx); boo::IGraphicsBuffer* bufs[] = {filter.m_uniBuf}; boo::ITexture* texs[] = {CGraphics::g_SpareTexture, filter.m_booTex}; - return cctx.newShaderDataBinding(pipeline, vtxFmt, + return cctx.newShaderDataBinding(s_Pipeline, s_VtxFmt, filter.m_vbo, nullptr, nullptr, 1, bufs, nullptr, nullptr, nullptr, 2, texs); } }; -TShader::IDataBindingFactory* CXRayBlurFilter::Initialize(boo::ID3DDataFactory::Context& ctx, - boo::IShaderPipeline*& pipeOut, - boo::IVertexFormat*& vtxFmtOut) +TShader::IDataBindingFactory* CXRayBlurFilter::Initialize(boo::ID3DDataFactory::Context& ctx) { const boo::VertexElementDescriptor VtxVmt[] = { {nullptr, nullptr, boo::VertexSemantic::Position4}, {nullptr, nullptr, boo::VertexSemantic::UV4} }; - vtxFmtOut = ctx.newVertexFormat(2, VtxVmt); - pipeOut = ctx.newShaderPipeline(VS, FS, ComPtr(), ComPtr(), ComPtr(), - vtxFmtOut, boo::BlendFactor::One, - boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false, false); + s_VtxFmt = ctx.newVertexFormat(2, VtxVmt); + s_Pipeline = ctx.newShaderPipeline(VS, FS, ComPtr(), ComPtr(), ComPtr(), + s_VtxFmt, boo::BlendFactor::One, + boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false, false); return new CXRayBlurFilterD3DDataBindingFactory; } diff --git a/Runtime/Graphics/Shaders/TMultiBlendShader.hpp b/Runtime/Graphics/Shaders/TMultiBlendShader.hpp index 44fe431a9..3c92ce69c 100644 --- a/Runtime/Graphics/Shaders/TMultiBlendShader.hpp +++ b/Runtime/Graphics/Shaders/TMultiBlendShader.hpp @@ -41,7 +41,7 @@ public: #if _WIN32 case boo::IGraphicsDataFactory::Platform::D3D11: case boo::IGraphicsDataFactory::Platform::D3D12: - m_bindFactory.reset(FilterImp::Initialize(static_cast(ctx))); + m_bindFactory.reset(ShaderImp::Initialize(static_cast(ctx))); break; #endif #if BOO_HAS_METAL @@ -51,7 +51,7 @@ public: #endif #if BOO_HAS_VULKAN case boo::IGraphicsDataFactory::Platform::Vulkan: - m_bindFactory.reset(FilterImp::Initialize(static_cast(ctx))); + m_bindFactory.reset(ShaderImp::Initialize(static_cast(ctx))); break; #endif default: break; diff --git a/Runtime/Graphics/Shaders/TShader.hpp b/Runtime/Graphics/Shaders/TShader.hpp index e36df3111..ceed5a56d 100644 --- a/Runtime/Graphics/Shaders/TShader.hpp +++ b/Runtime/Graphics/Shaders/TShader.hpp @@ -39,7 +39,7 @@ public: #if _WIN32 case boo::IGraphicsDataFactory::Platform::D3D11: case boo::IGraphicsDataFactory::Platform::D3D12: - m_bindFactory.reset(FilterImp::Initialize(static_cast(ctx))); + m_bindFactory.reset(ShaderImp::Initialize(static_cast(ctx))); break; #endif #if BOO_HAS_METAL @@ -49,7 +49,7 @@ public: #endif #if BOO_HAS_VULKAN case boo::IGraphicsDataFactory::Platform::Vulkan: - m_bindFactory.reset(FilterImp::Initialize(static_cast(ctx))); + m_bindFactory.reset(ShaderImp::Initialize(static_cast(ctx))); break; #endif default: break; diff --git a/Runtime/GuiSys/CTextRenderBuffer.cpp b/Runtime/GuiSys/CTextRenderBuffer.cpp index 20100d5c2..7af074c9d 100644 --- a/Runtime/GuiSys/CTextRenderBuffer.cpp +++ b/Runtime/GuiSys/CTextRenderBuffer.cpp @@ -95,7 +95,7 @@ void CTextRenderBuffer::CommitResources() boo::IGraphicsBuffer* uniforms[] = {uBufInfo.first}; boo::PipelineStage unistages[] = {boo::PipelineStage::Vertex}; - size_t unioffs[] = {uBufInfo.second}; + size_t unioffs[] = {size_t(uBufInfo.second)}; size_t unisizes[] = {sizeof(CTextSupportShader::Uniform)}; boo::ITexture* texs[] = {chs.m_font->GetTexture()}; chs.m_dataBinding = ctx.newShaderDataBinding(CTextSupportShader::SelectTextPipeline(m_drawFlags), @@ -130,7 +130,7 @@ void CTextRenderBuffer::CommitResources() boo::IGraphicsBuffer* uniforms[] = {uBufInfo.first}; boo::PipelineStage unistages[] = {boo::PipelineStage::Vertex}; - size_t unioffs[] = {uBufInfo.second}; + size_t unioffs[] = {size_t(uBufInfo.second)}; size_t unisizes[] = {sizeof(CTextSupportShader::Uniform)}; img.m_dataBinding.reserve(img.m_imageDef.x4_texs.size()); for (TToken& tex : img.m_imageDef.x4_texs) diff --git a/hecl b/hecl index d4fd78673..1dbd76929 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit d4fd78673feebcc5b29eba53178e545cee695891 +Subproject commit 1dbd769296619bfa0a9534c76c43c83ae7b7eede