Sync with boo shader cache

This commit is contained in:
Jack Andersen 2017-03-05 13:03:23 -10:00
parent 71499f3250
commit 9b9ba95d45
17 changed files with 83 additions and 82 deletions

View File

@ -223,7 +223,7 @@ void CMoviePlayer::Initialize()
case boo::IGraphicsDataFactory::Platform::D3D11: case boo::IGraphicsDataFactory::Platform::D3D11:
case boo::IGraphicsDataFactory::Platform::D3D12: case boo::IGraphicsDataFactory::Platform::D3D12:
YUVShaderPipeline = static_cast<boo::ID3DDataFactory::Context&>(ctx).newShaderPipeline YUVShaderPipeline = static_cast<boo::ID3DDataFactory::Context&>(ctx).newShaderPipeline
(VS_HLSL_YUV, FS_HLSL_YUV, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), YUVVTXFmt, (VS_HLSL_YUV, FS_HLSL_YUV, nullptr, nullptr, nullptr, YUVVTXFmt,
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
boo::Primitive::TriStrips, false, false, false); boo::Primitive::TriStrips, false, false, false);
break; break;

View File

@ -114,7 +114,7 @@ TShader<CCameraBlurFilter>::IDataBindingFactory* CCameraBlurFilter::Initialize(b
{nullptr, nullptr, boo::VertexSemantic::UV4} {nullptr, nullptr, boo::VertexSemantic::UV4}
}; };
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt); s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
s_Pipeline = ctx.newShaderPipeline(VS, FS, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), s_Pipeline = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, nullptr,
s_VtxFmt, boo::BlendFactor::SrcAlpha, s_VtxFmt, boo::BlendFactor::SrcAlpha,
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false); boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false);
return new CCameraBlurFilterD3DDataBindingFactory; return new CCameraBlurFilterD3DDataBindingFactory;

View File

@ -88,13 +88,13 @@ CColoredQuadFilter::Initialize(boo::ID3DDataFactory::Context& ctx)
{nullptr, nullptr, boo::VertexSemantic::Position4} {nullptr, nullptr, boo::VertexSemantic::Position4}
}; };
s_VtxFmt = ctx.newVertexFormat(1, VtxVmt); s_VtxFmt = ctx.newVertexFormat(1, VtxVmt);
s_AlphaPipeline = ctx.newShaderPipeline(VS, FS, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), s_AlphaPipeline = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, nullptr,
s_VtxFmt, boo::BlendFactor::SrcAlpha, s_VtxFmt, boo::BlendFactor::SrcAlpha,
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false); boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false);
s_AddPipeline = ctx.newShaderPipeline(VS, FS, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), s_AddPipeline = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, nullptr,
s_VtxFmt, boo::BlendFactor::SrcAlpha, s_VtxFmt, boo::BlendFactor::SrcAlpha,
boo::BlendFactor::One, boo::Primitive::TriStrips, false, false, false); boo::BlendFactor::One, boo::Primitive::TriStrips, false, false, false);
s_MultPipeline = ctx.newShaderPipeline(VS, FS, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), s_MultPipeline = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, nullptr,
s_VtxFmt, boo::BlendFactor::SrcColor, s_VtxFmt, boo::BlendFactor::SrcColor,
boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false, false); boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false, false);
return new CColoredQuadFilterD3DDataBindingFactory; return new CColoredQuadFilterD3DDataBindingFactory;

View File

@ -125,20 +125,20 @@ CLineRendererShaders::IDataBindingFactory* CLineRendererShaders::Initialize(boo:
}; };
m_noTexVtxFmt = ctx.newVertexFormat(2, VtxFmtNoTex); m_noTexVtxFmt = ctx.newVertexFormat(2, VtxFmtNoTex);
m_texAlpha = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), m_texAlpha = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
ComPtr<ID3DBlob>(), m_texVtxFmt, nullptr, m_texVtxFmt,
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
boo::Primitive::TriStrips,false, true, false); boo::Primitive::TriStrips,false, true, false);
m_texAdditive = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), m_texAdditive = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
ComPtr<ID3DBlob>(), m_texVtxFmt, nullptr, m_texVtxFmt,
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One, boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
boo::Primitive::TriStrips,false, false, false); boo::Primitive::TriStrips,false, false, false);
m_noTexAlpha = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), m_noTexAlpha = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
ComPtr<ID3DBlob>(), m_noTexVtxFmt, nullptr, m_noTexVtxFmt,
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
boo::Primitive::TriStrips, false, true, false); boo::Primitive::TriStrips, false, true, false);
m_noTexAdditive = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), m_noTexAdditive = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
ComPtr<ID3DBlob>(), m_noTexVtxFmt, nullptr, m_noTexVtxFmt,
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One, boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
boo::Primitive::TriStrips, false, false, false); boo::Primitive::TriStrips, false, false, false);

View File

@ -68,7 +68,7 @@ static const char* ThermalPostGLSL =
"};\n" "};\n"
"vec4 ThermalPostFunc(vec4 colorIn)\n" "vec4 ThermalPostFunc(vec4 colorIn)\n"
"{\n" "{\n"
" return vec4(texture(tex7, vtf.extTcgs[0]).rrr * tmulColor.rgb + addColor.rgb, 1.0);\n" " return vec4(texture(extTex7, vtf.extTcgs[0]).rrr * tmulColor.rgb + addColor.rgb, 1.0);\n"
"}\n" "}\n"
"\n"; "\n";
@ -91,9 +91,9 @@ static const char* MBShadowPostGLSL =
"};\n" "};\n"
"vec4 MBShadowPostFunc(vec4 colorIn)\n" "vec4 MBShadowPostFunc(vec4 colorIn)\n"
"{\n" "{\n"
" float idTexel = texture(tex0, vtf.extTcgs[0]).a;\n" " float idTexel = texture(extTex0, vtf.extTcgs[0]).a;\n"
" float sphereTexel = texture(tex1, vtf.extTcgs[1]).a;\n" " float sphereTexel = texture(extTex1, vtf.extTcgs[1]).a;\n"
" float fadeTexel = texture(tex2, vtf.extTcgs[2]).a;\n" " float fadeTexel = texture(extTex2, vtf.extTcgs[2]).a;\n"
" float val = ((abs(idTexel - shadowId) < 0.001) ?\n" " float val = ((abs(idTexel - shadowId) < 0.001) ?\n"
" (dot(vtf.mvNorm.xyz, shadowUp.xyz) * shadowUp.w) : 0.0) *\n" " (dot(vtf.mvNorm.xyz, shadowUp.xyz) * shadowUp.w) : 0.0) *\n"
" sphereTexel * fadeTexel;\n" " sphereTexel * fadeTexel;\n"

View File

@ -76,7 +76,7 @@ static const char* SolidPostHLSL =
"{\n" "{\n"
" float4 solidColor;\n" " float4 solidColor;\n"
"};\n" "};\n"
"static float4 SolidPostFunc(float4 colorIn)\n" "static float4 SolidPostFunc(in VertToFrag vtf, float4 colorIn)\n"
"{\n" "{\n"
" return solidColor;\n" " return solidColor;\n"
"}\n" "}\n"
@ -88,7 +88,7 @@ static const char* MBShadowPostHLSL =
" float4 shadowUp;\n" " float4 shadowUp;\n"
" float shadowId;\n" " float shadowId;\n"
"};\n" "};\n"
"static float4 MBShadowPostFunc(float4 colorIn)\n" "static float4 MBShadowPostFunc(in VertToFrag vtf, float4 colorIn)\n"
"{\n" "{\n"
" float idTexel = extTex0.Sample(samp, vtf.extTcgs[0]).a;\n" " float idTexel = extTex0.Sample(samp, vtf.extTcgs[0]).a;\n"
" float sphereTexel = extTex1.Sample(samp, vtf.extTcgs[1]).a;\n" " float sphereTexel = extTex1.Sample(samp, vtf.extTcgs[1]).a;\n"
@ -130,7 +130,7 @@ CModelShaders::GetShaderExtensionsHLSL(boo::IGraphicsDataFactory::Platform plat)
0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::One, 0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::One,
hecl::Backend::BlendFactor::Zero); hecl::Backend::BlendFactor::Zero);
/* Solid shading */ /* MorphBall shadow shading */
ext.registerExtensionSlot({}, {MBShadowPostHLSL, "MBShadowPostFunc"}, ext.registerExtensionSlot({}, {MBShadowPostHLSL, "MBShadowPostFunc"},
0, nullptr, 3, BallFadeTextures, 0, nullptr, 3, BallFadeTextures,
hecl::Backend::BlendFactor::SrcAlpha, hecl::Backend::BlendFactor::SrcAlpha,

View File

@ -65,9 +65,9 @@ static const char* ThermalPostMetal =
" float4 tmulColor;\n" " float4 tmulColor;\n"
" float4 addColor;\n" " float4 addColor;\n"
"};\n" "};\n"
"static float4 ThermalPostFunc(thread VertToFrag& vtf, constant ThermalUniform& lu, texture2d<float> tex7, float4 colorIn)\n" "static float4 ThermalPostFunc(thread VertToFrag& vtf, constant ThermalUniform& lu, texture2d<float> extTex7, float4 colorIn)\n"
"{\n" "{\n"
" return float4(tex7.sample(samp, vtf.extTcgs0).rrr * lu.tmulColor.rgb + lu.addColor.rgb, 1.0);\n" " return float4(extTex7.sample(samp, vtf.extTcgs0).rrr * lu.tmulColor.rgb + lu.addColor.rgb, 1.0);\n"
"}\n" "}\n"
"\n"; "\n";
@ -89,11 +89,11 @@ static const char* MBShadowPostMetal =
" float shadowId;\n" " float shadowId;\n"
"};\n" "};\n"
"static float4 MBShadowPostFunc(thread VertToFrag& vtf, constant MBShadowUniform& su,\n" "static float4 MBShadowPostFunc(thread VertToFrag& vtf, constant MBShadowUniform& su,\n"
" texture2d<float> tex0, texture2d<float> tex1, texture2d<float> tex2, float4 colorIn)\n" " texture2d<float> extTex0, texture2d<float> extTex1, texture2d<float> extTex2, float4 colorIn)\n"
"{\n" "{\n"
" float idTexel = tex0.sample(samp, vtf.extTcgs0).a;\n" " float idTexel = extTex0.sample(samp, vtf.extTcgs0).a;\n"
" float sphereTexel = tex1.sample(samp, vtf.extTcgs1).a;\n" " float sphereTexel = extTex1.sample(samp, vtf.extTcgs1).a;\n"
" float fadeTexel = tex2.sample(samp, vtf.extTcgs2).a;\n" " float fadeTexel = extTex2.sample(samp, vtf.extTcgs2).a;\n"
" float val = ((fabs(idTexel - su.shadowId) < 0.001) ?\n" " float val = ((fabs(idTexel - su.shadowId) < 0.001) ?\n"
" (dot(vtf.mvNorm.xyz, su.shadowUp.xyz) * su.shadowUp.w) : 0.0) *\n" " (dot(vtf.mvNorm.xyz, su.shadowUp.xyz) * su.shadowUp.w) : 0.0) *\n"
" sphereTexel * fadeTexel;\n" " sphereTexel * fadeTexel;\n"

View File

@ -81,7 +81,7 @@ TShader<CSpaceWarpFilter>::IDataBindingFactory* CSpaceWarpFilter::Initialize(boo
{nullptr, nullptr, boo::VertexSemantic::UV4} {nullptr, nullptr, boo::VertexSemantic::UV4}
}; };
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt); s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
s_Pipeline = ctx.newShaderPipeline(VS, FS, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), s_Pipeline = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, nullptr,
s_VtxFmt, boo::BlendFactor::One, s_VtxFmt, boo::BlendFactor::One,
boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false, false); boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false, false);
return new CSpaceWarpFilterD3DDataBindingFactory; return new CSpaceWarpFilterD3DDataBindingFactory;

View File

@ -126,10 +126,10 @@ CTextSupportShader::Initialize(boo::ID3DDataFactory::Context& ctx)
{nullptr, nullptr, boo::VertexSemantic::Color | boo::VertexSemantic::Instanced, 2}, {nullptr, nullptr, boo::VertexSemantic::Color | boo::VertexSemantic::Instanced, 2},
}; };
s_TextVtxFmt = ctx.newVertexFormat(11, TextVtxVmt); s_TextVtxFmt = ctx.newVertexFormat(11, TextVtxVmt);
s_TextAlphaPipeline = ctx.newShaderPipeline(TextVS, TextFS, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), s_TextAlphaPipeline = ctx.newShaderPipeline(TextVS, TextFS, nullptr, nullptr, nullptr,
s_TextVtxFmt, boo::BlendFactor::SrcAlpha, s_TextVtxFmt, boo::BlendFactor::SrcAlpha,
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, true, false, false); boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, true, false, false);
s_TextAddPipeline = ctx.newShaderPipeline(TextVS, TextFS, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), s_TextAddPipeline = ctx.newShaderPipeline(TextVS, TextFS, nullptr, nullptr, nullptr,
s_TextVtxFmt, boo::BlendFactor::SrcAlpha, s_TextVtxFmt, boo::BlendFactor::SrcAlpha,
boo::BlendFactor::One, boo::Primitive::TriStrips, true, false, false); boo::BlendFactor::One, boo::Primitive::TriStrips, true, false, false);
@ -146,10 +146,10 @@ CTextSupportShader::Initialize(boo::ID3DDataFactory::Context& ctx)
{nullptr, nullptr, boo::VertexSemantic::Color | boo::VertexSemantic::Instanced, 0}, {nullptr, nullptr, boo::VertexSemantic::Color | boo::VertexSemantic::Instanced, 0},
}; };
s_ImageVtxFmt = ctx.newVertexFormat(9, ImageVtxVmt); s_ImageVtxFmt = ctx.newVertexFormat(9, ImageVtxVmt);
s_ImageAlphaPipeline = ctx.newShaderPipeline(ImgVS, ImgFS, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), s_ImageAlphaPipeline = ctx.newShaderPipeline(ImgVS, ImgFS, nullptr, nullptr, nullptr,
s_ImageVtxFmt, boo::BlendFactor::SrcAlpha, s_ImageVtxFmt, boo::BlendFactor::SrcAlpha,
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, true, false, false); boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, true, false, false);
s_ImageAddPipeline = ctx.newShaderPipeline(ImgVS, ImgFS, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), s_ImageAddPipeline = ctx.newShaderPipeline(ImgVS, ImgFS, nullptr, nullptr, nullptr,
s_ImageVtxFmt, boo::BlendFactor::SrcAlpha, s_ImageVtxFmt, boo::BlendFactor::SrcAlpha,
boo::BlendFactor::One, boo::Primitive::TriStrips, true, false, false); boo::BlendFactor::One, boo::Primitive::TriStrips, true, false, false);

View File

@ -143,13 +143,13 @@ CTexturedQuadFilter::Initialize(boo::ID3DDataFactory::Context& ctx)
{nullptr, nullptr, boo::VertexSemantic::UV4} {nullptr, nullptr, boo::VertexSemantic::UV4}
}; };
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt); s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
s_AlphaPipeline = ctx.newShaderPipeline(VSNoFlip, FS, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), s_AlphaPipeline = ctx.newShaderPipeline(VSNoFlip, FS, nullptr, nullptr, nullptr,
s_VtxFmt, boo::BlendFactor::SrcAlpha, s_VtxFmt, boo::BlendFactor::SrcAlpha,
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false); boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false);
s_AddPipeline = ctx.newShaderPipeline(VSNoFlip, FS, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), s_AddPipeline = ctx.newShaderPipeline(VSNoFlip, FS, nullptr, nullptr, nullptr,
s_VtxFmt, boo::BlendFactor::SrcAlpha, s_VtxFmt, boo::BlendFactor::SrcAlpha,
boo::BlendFactor::One, boo::Primitive::TriStrips, false, false, false); boo::BlendFactor::One, boo::Primitive::TriStrips, false, false, false);
s_MultPipeline = ctx.newShaderPipeline(VSNoFlip, FS, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), s_MultPipeline = ctx.newShaderPipeline(VSNoFlip, FS, nullptr, nullptr, nullptr,
s_VtxFmt, boo::BlendFactor::SrcColor, s_VtxFmt, boo::BlendFactor::SrcColor,
boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false, false); boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false, false);
return new CTexturedQuadFilterD3DDataBindingFactory; return new CTexturedQuadFilterD3DDataBindingFactory;
@ -200,13 +200,13 @@ CTexturedQuadFilterAlpha::Initialize(boo::ID3DDataFactory::Context& ctx)
{nullptr, nullptr, boo::VertexSemantic::UV4} {nullptr, nullptr, boo::VertexSemantic::UV4}
}; };
s_AVtxFmt = ctx.newVertexFormat(2, VtxVmt); s_AVtxFmt = ctx.newVertexFormat(2, VtxVmt);
s_AAlphaPipeline = ctx.newShaderPipeline(VSFlip, FSAlpha, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), s_AAlphaPipeline = ctx.newShaderPipeline(VSFlip, FSAlpha, nullptr, nullptr, nullptr,
s_AVtxFmt, boo::BlendFactor::SrcAlpha, s_AVtxFmt, boo::BlendFactor::SrcAlpha,
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false); boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false);
s_AAddPipeline = ctx.newShaderPipeline(VSFlip, FSAlpha, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), s_AAddPipeline = ctx.newShaderPipeline(VSFlip, FSAlpha, nullptr, nullptr, nullptr,
s_AVtxFmt, boo::BlendFactor::SrcAlpha, s_AVtxFmt, boo::BlendFactor::SrcAlpha,
boo::BlendFactor::One, boo::Primitive::TriStrips, false, false, false); boo::BlendFactor::One, boo::Primitive::TriStrips, false, false, false);
s_AMultPipeline = ctx.newShaderPipeline(VSFlip, FSAlpha, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), s_AMultPipeline = ctx.newShaderPipeline(VSFlip, FSAlpha, nullptr, nullptr, nullptr,
s_AVtxFmt, boo::BlendFactor::SrcColor, s_AVtxFmt, boo::BlendFactor::SrcColor,
boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false, false); boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false, false);
return new CTexturedQuadFilterAlphaD3DDataBindingFactory; return new CTexturedQuadFilterAlphaD3DDataBindingFactory;

View File

@ -103,7 +103,7 @@ TShader<CThermalColdFilter>::IDataBindingFactory* CThermalColdFilter::Initialize
{nullptr, nullptr, boo::VertexSemantic::UV4} {nullptr, nullptr, boo::VertexSemantic::UV4}
}; };
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt); s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
s_Pipeline = ctx.newShaderPipeline(VS, FS, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), s_Pipeline = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, nullptr,
s_VtxFmt, boo::BlendFactor::One, s_VtxFmt, boo::BlendFactor::One,
boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false, false); boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false, false);
return new CThermalColdFilterD3DDataBindingFactory; return new CThermalColdFilterD3DDataBindingFactory;

View File

@ -80,7 +80,7 @@ TShader<CThermalHotFilter>::IDataBindingFactory* CThermalHotFilter::Initialize(b
{nullptr, nullptr, boo::VertexSemantic::UV4} {nullptr, nullptr, boo::VertexSemantic::UV4}
}; };
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt); s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
s_Pipeline = ctx.newShaderPipeline(VS, FS, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), s_Pipeline = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, nullptr,
s_VtxFmt, boo::BlendFactor::DstAlpha, boo::BlendFactor::InvDstAlpha, s_VtxFmt, boo::BlendFactor::DstAlpha, boo::BlendFactor::InvDstAlpha,
boo::Primitive::TriStrips, false, false, false); boo::Primitive::TriStrips, false, false, false);
return new CThermalHotFilterD3DDataBindingFactory; return new CThermalHotFilterD3DDataBindingFactory;

View File

@ -95,7 +95,7 @@ TShader<CXRayBlurFilter>::IDataBindingFactory* CXRayBlurFilter::Initialize(boo::
{nullptr, nullptr, boo::VertexSemantic::UV4} {nullptr, nullptr, boo::VertexSemantic::UV4}
}; };
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt); s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
s_Pipeline = ctx.newShaderPipeline(VS, FS, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), s_Pipeline = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, nullptr,
s_VtxFmt, boo::BlendFactor::One, s_VtxFmt, boo::BlendFactor::One,
boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false, false); boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false, false);
return new CXRayBlurFilterD3DDataBindingFactory; return new CXRayBlurFilterD3DDataBindingFactory;

View File

@ -268,90 +268,90 @@ CElementGenShaders::IDataBindingFactory* CElementGenShaders::Initialize(boo::ID3
}; };
m_vtxFormatNoTex = ctx.newVertexFormat(5, TexFmtNoTex); m_vtxFormatNoTex = ctx.newVertexFormat(5, TexFmtNoTex);
m_texZTestZWrite = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), m_texZTestZWrite = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
ComPtr<ID3DBlob>(), m_vtxFormatTex, nullptr, m_vtxFormatTex,
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
boo::Primitive::TriStrips, true, true, false); boo::Primitive::TriStrips, true, true, false);
m_texNoZTestZWrite = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), m_texNoZTestZWrite = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
ComPtr<ID3DBlob>(), m_vtxFormatTex, nullptr, m_vtxFormatTex,
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
boo::Primitive::TriStrips, false, true, false); boo::Primitive::TriStrips, false, true, false);
m_texZTestNoZWrite = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), m_texZTestNoZWrite = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
ComPtr<ID3DBlob>(), m_vtxFormatTex, nullptr, m_vtxFormatTex,
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
boo::Primitive::TriStrips, true, false, false); boo::Primitive::TriStrips, true, false, false);
m_texNoZTestNoZWrite = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), m_texNoZTestNoZWrite = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
ComPtr<ID3DBlob>(), m_vtxFormatTex, nullptr, m_vtxFormatTex,
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
boo::Primitive::TriStrips, false, false, false); boo::Primitive::TriStrips, false, false, false);
m_texAdditiveZTest = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), m_texAdditiveZTest = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
ComPtr<ID3DBlob>(), m_vtxFormatTex, nullptr, m_vtxFormatTex,
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One, boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
boo::Primitive::TriStrips, true, false, false); boo::Primitive::TriStrips, true, false, false);
m_texAdditiveNoZTest = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), m_texAdditiveNoZTest = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
ComPtr<ID3DBlob>(), m_vtxFormatTex, nullptr, m_vtxFormatTex,
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One, boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
boo::Primitive::TriStrips, false, false, false); boo::Primitive::TriStrips, false, false, false);
m_texRedToAlphaZTest = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX_REDTOALPHA, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), m_texRedToAlphaZTest = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX_REDTOALPHA, nullptr, nullptr,
ComPtr<ID3DBlob>(), m_vtxFormatTex, nullptr, m_vtxFormatTex,
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
boo::Primitive::TriStrips, true, false, false); boo::Primitive::TriStrips, true, false, false);
m_texRedToAlphaNoZTest = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX_REDTOALPHA, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), m_texRedToAlphaNoZTest = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX_REDTOALPHA, nullptr, nullptr,
ComPtr<ID3DBlob>(), m_vtxFormatTex, nullptr, m_vtxFormatTex,
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
boo::Primitive::TriStrips, false, false, false); boo::Primitive::TriStrips, false, false, false);
m_indTexZWrite = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_INDTEX, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), m_indTexZWrite = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_INDTEX, nullptr, nullptr,
ComPtr<ID3DBlob>(), m_vtxFormatIndTex, nullptr, m_vtxFormatIndTex,
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
boo::Primitive::TriStrips, false, true, false); boo::Primitive::TriStrips, false, true, false);
m_indTexNoZWrite = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_INDTEX, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), m_indTexNoZWrite = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_INDTEX, nullptr, nullptr,
ComPtr<ID3DBlob>(), m_vtxFormatIndTex, nullptr, m_vtxFormatIndTex,
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
boo::Primitive::TriStrips, false, false, false); boo::Primitive::TriStrips, false, false, false);
m_indTexAdditive = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_INDTEX, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), m_indTexAdditive = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_INDTEX, nullptr, nullptr,
ComPtr<ID3DBlob>(), m_vtxFormatIndTex, nullptr, m_vtxFormatIndTex,
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One, boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
boo::Primitive::TriStrips, false, true, false); boo::Primitive::TriStrips, false, true, false);
m_cindTexZWrite = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_CINDTEX, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), m_cindTexZWrite = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_CINDTEX, nullptr, nullptr,
ComPtr<ID3DBlob>(), m_vtxFormatIndTex, nullptr, m_vtxFormatIndTex,
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
boo::Primitive::TriStrips, false, true, false); boo::Primitive::TriStrips, false, true, false);
m_cindTexNoZWrite = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_CINDTEX, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), m_cindTexNoZWrite = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_CINDTEX, nullptr, nullptr,
ComPtr<ID3DBlob>(), m_vtxFormatIndTex, nullptr, m_vtxFormatIndTex,
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
boo::Primitive::TriStrips, false, false, false); boo::Primitive::TriStrips, false, false, false);
m_cindTexAdditive = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_CINDTEX, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), m_cindTexAdditive = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_CINDTEX, nullptr, nullptr,
ComPtr<ID3DBlob>(), m_vtxFormatIndTex, nullptr, m_vtxFormatIndTex,
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One, boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
boo::Primitive::TriStrips, false, true, false); boo::Primitive::TriStrips, false, true, false);
m_noTexZTestZWrite = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), m_noTexZTestZWrite = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
ComPtr<ID3DBlob>(), m_vtxFormatNoTex, nullptr, m_vtxFormatNoTex,
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
boo::Primitive::TriStrips, true, true, false); boo::Primitive::TriStrips, true, true, false);
m_noTexNoZTestZWrite = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), m_noTexNoZTestZWrite = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
ComPtr<ID3DBlob>(), m_vtxFormatNoTex, nullptr, m_vtxFormatNoTex,
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
boo::Primitive::TriStrips, false, true, false); boo::Primitive::TriStrips, false, true, false);
m_noTexZTestNoZWrite = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), m_noTexZTestNoZWrite = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
ComPtr<ID3DBlob>(), m_vtxFormatNoTex, nullptr, m_vtxFormatNoTex,
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
boo::Primitive::TriStrips, true, false, false); boo::Primitive::TriStrips, true, false, false);
m_noTexNoZTestNoZWrite = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), m_noTexNoZTestNoZWrite = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
ComPtr<ID3DBlob>(), m_vtxFormatNoTex, nullptr, m_vtxFormatNoTex,
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha, boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
boo::Primitive::TriStrips, false, false, false); boo::Primitive::TriStrips, false, false, false);
m_noTexAdditiveZTest = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), m_noTexAdditiveZTest = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
ComPtr<ID3DBlob>(), m_vtxFormatNoTex, nullptr, m_vtxFormatNoTex,
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One, boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
boo::Primitive::TriStrips, true, false, false); boo::Primitive::TriStrips, true, false, false);
m_noTexAdditiveNoZTest = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, ComPtr<ID3DBlob>(), ComPtr<ID3DBlob>(), m_noTexAdditiveNoZTest = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
ComPtr<ID3DBlob>(), m_vtxFormatNoTex, nullptr, m_vtxFormatNoTex,
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One, boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
boo::Primitive::TriStrips, false, false, false); boo::Primitive::TriStrips, false, false, false);

View File

@ -4,6 +4,7 @@
#include "GameGlobalObjects.hpp" #include "GameGlobalObjects.hpp"
#include "Graphics/CBooRenderer.hpp" #include "Graphics/CBooRenderer.hpp"
#include "World/CPlayer.hpp" #include "World/CPlayer.hpp"
#include "Particle/CGenDescription.hpp"
namespace urde namespace urde
{ {

2
hecl

@ -1 +1 @@
Subproject commit b80547d01fb70f349eb6128bd9c44921763f2821 Subproject commit f1a75980dcaafa4ec1d6e8584a4552ca8ed80dca

@ -1 +1 @@
Subproject commit 717a6bbb1dd3a9dbe9ab85e58033c8ebca163a92 Subproject commit 4838cb43970dae46b88ae6061c29e6d33cecf7b0