mirror of https://github.com/AxioDL/metaforce.git
Windows fixes and updated rendering interface
This commit is contained in:
parent
1629882113
commit
6c81cea420
|
@ -350,8 +350,7 @@ void ProjectResourceFactoryBase::BackgroundIndexProc()
|
||||||
m_pathToTag[path.hash()] = pathTag;
|
m_pathToTag[path.hash()] = pathTag;
|
||||||
WriteTag(cacheWriter, pathTag, path);
|
WriteTag(cacheWriter, pathTag, path);
|
||||||
}
|
}
|
||||||
fprintf(stderr, "\r %" PRISize " / %" PRISize, ++loadIdx,
|
fprintf(stderr, "\r %" PRISize " / %" PRISize, ++loadIdx, tagCount);
|
||||||
cacheReader.getRootNode()->m_mapChildren.size());
|
|
||||||
}
|
}
|
||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,11 +113,11 @@ void ViewManager::TestGameView::draw(boo::IGraphicsCommandQueue *gfxQ)
|
||||||
boo::SWindowRect windowRect = m_vm.m_mainWindow->getWindowFrame();
|
boo::SWindowRect windowRect = m_vm.m_mainWindow->getWindowFrame();
|
||||||
float aspect = windowRect.size[0] / float(windowRect.size[1]);
|
float aspect = windowRect.size[0] / float(windowRect.size[1]);
|
||||||
|
|
||||||
CGraphics::SetPerspective(55.0, aspect, 0.2f, 750.f);
|
CGraphics::SetPerspective(55.0, aspect, 0.2f, 50.f);
|
||||||
//CGraphics::SetFog(ERglFogMode::PerspExp, 7.f, 15.f, zeus::CColor::skRed);
|
//CGraphics::SetFog(ERglFogMode::PerspExp, 7.f, 15.f, zeus::CColor::skRed);
|
||||||
//CGraphics::SetFog(ERglFogMode::PerspExp, 10.f + std::sin(m_theta) * 5.f, 15.f + std::sin(m_theta) * 5.f, zeus::CColor::skRed);
|
//CGraphics::SetFog(ERglFogMode::PerspExp, 10.f + std::sin(m_theta) * 5.f, 15.f + std::sin(m_theta) * 5.f, zeus::CColor::skRed);
|
||||||
zeus::CFrustum frustum;
|
zeus::CFrustum frustum;
|
||||||
frustum.updatePlanes(CGraphics::g_GXModelView, zeus::SProjPersp(55.0, aspect, 0.2f, 750.f));
|
frustum.updatePlanes(CGraphics::g_GXModelView, zeus::SProjPersp(55.0, aspect, 0.2f, 50.f));
|
||||||
g_Renderer->SetClippingPlanes(frustum);
|
g_Renderer->SetClippingPlanes(frustum);
|
||||||
|
|
||||||
std::vector<CLight> lights = {CLight::BuildLocalAmbient({}, {0.05f, 0.05f, 0.05f, 1.f}),
|
std::vector<CLight> lights = {CLight::BuildLocalAmbient({}, {0.05f, 0.05f, 0.05f, 1.f}),
|
||||||
|
@ -128,8 +128,7 @@ void ViewManager::TestGameView::draw(boo::IGraphicsCommandQueue *gfxQ)
|
||||||
//g_Renderer->SetThermal(true, 1.f, zeus::CColor::skWhite);
|
//g_Renderer->SetThermal(true, 1.f, zeus::CColor::skWhite);
|
||||||
//g_Renderer->SetThermalColdScale(std::sin(m_theta) * 0.5f + 0.5f);
|
//g_Renderer->SetThermalColdScale(std::sin(m_theta) * 0.5f + 0.5f);
|
||||||
//g_Renderer->DoThermalBlendCold();
|
//g_Renderer->DoThermalBlendCold();
|
||||||
//flags.m_extendedShaderIdx = 2;
|
flags.m_extendedShader = EExtendedShader::Lighting;
|
||||||
//flags.m_extendedShader = EExtendedShader::Lighting;
|
|
||||||
//m_widescreen.draw(zeus::CColor::skBlack, std::sin(m_theta * 3.f) / 2.f + 0.5f);
|
//m_widescreen.draw(zeus::CColor::skBlack, std::sin(m_theta * 3.f) / 2.f + 0.5f);
|
||||||
m_vm.m_modelTest->Draw(flags);
|
m_vm.m_modelTest->Draw(flags);
|
||||||
g_Renderer->ReallyRenderFogVolume(zeus::CColor::skRed, m_vm.m_modelTest->GetAABB(),
|
g_Renderer->ReallyRenderFogVolume(zeus::CColor::skRed, m_vm.m_modelTest->GetAABB(),
|
||||||
|
|
|
@ -25,7 +25,7 @@ Everything else is much too experimental to make portable/stable release builds
|
||||||
* [macOS Package](http://llvm.org/releases/3.9.0/clang+llvm-3.9.0-x86_64-apple-darwin.tar.xz)
|
* [macOS Package](http://llvm.org/releases/3.9.0/clang+llvm-3.9.0-x86_64-apple-darwin.tar.xz)
|
||||||
* **[Windows]** [Visual Studio 2015 and Windows SDK](https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx)
|
* **[Windows]** [Visual Studio 2015 and Windows SDK](https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx)
|
||||||
* **[macOS]** [Xcode Tools](https://developer.apple.com/xcode/download/)
|
* **[macOS]** [Xcode Tools](https://developer.apple.com/xcode/download/)
|
||||||
* **[Linux]** recent development packages of `udev`, `x11`, `xcb`, `xinput`, `glx`, `asound`
|
* **[Linux]** recent development packages of `udev`, `x11`, `xcb`, `xinput`, `glx`, `asound`, `dmix`
|
||||||
|
|
||||||
### Prep Directions
|
### Prep Directions
|
||||||
|
|
||||||
|
|
|
@ -336,7 +336,7 @@ void CBooRenderer::CalcDrawFogFan(const zeus::CPlane* planes, int numPlanes, con
|
||||||
for (int i=0 ; i<numVerts ; ++i)
|
for (int i=0 ; i<numVerts ; ++i)
|
||||||
{
|
{
|
||||||
int nextIdx = (i + 1) % numVerts;
|
int nextIdx = (i + 1) % numVerts;
|
||||||
int insidePair = outsidePlane[i] | (outsidePlane[nextIdx] << 1);
|
int insidePair = int(outsidePlane[i]) | (int(outsidePlane[nextIdx]) << 1);
|
||||||
if (!(insidePair & 0x1))
|
if (!(insidePair & 0x1))
|
||||||
useVerts[numUseVerts++] = verts[i];
|
useVerts[numUseVerts++] = verts[i];
|
||||||
if (insidePair == 1 || insidePair == 2)
|
if (insidePair == 1 || insidePair == 2)
|
||||||
|
|
|
@ -162,7 +162,7 @@ static const zeus::CMatrix4f PlusOneZ(1.f, 0.f, 0.f, 0.f,
|
||||||
0.f, 0.f, 1.f, 1.f,
|
0.f, 0.f, 1.f, 1.f,
|
||||||
0.f, 0.f, 0.f, 1.f);
|
0.f, 0.f, 0.f, 1.f);
|
||||||
|
|
||||||
static const zeus::CMatrix4f PlusOneZFlip(1.f, 0.f, 0.f, 0.f,
|
static const zeus::CMatrix4f VulkanCorrect(1.f, 0.f, 0.f, 0.f,
|
||||||
0.f, -1.f, 0.f, 0.f,
|
0.f, -1.f, 0.f, 0.f,
|
||||||
0.f, 0.f, 0.5f, 0.5f,
|
0.f, 0.f, 0.5f, 0.5f,
|
||||||
0.f, 0.f, 0.f, 1.f);
|
0.f, 0.f, 0.f, 1.f);
|
||||||
|
@ -221,7 +221,7 @@ zeus::CMatrix4f CGraphics::CalculatePerspectiveMatrix(float fovy, float aspect,
|
||||||
0.f, 2.f * st.x14_near / tmb, tpb / tmb, 0.f,
|
0.f, 2.f * st.x14_near / tmb, tpb / tmb, 0.f,
|
||||||
0.f, 0.f, -fpn / fmn, -2.f * st.x18_far * st.x14_near / fmn,
|
0.f, 0.f, -fpn / fmn, -2.f * st.x18_far * st.x14_near / fmn,
|
||||||
0.f, 0.f, -1.f, 0.f);
|
0.f, 0.f, -1.f, 0.f);
|
||||||
return PlusOneZFlip * mat2;
|
return VulkanCorrect * mat2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -271,7 +271,7 @@ zeus::CMatrix4f CGraphics::GetPerspectiveProjectionMatrix(bool forRenderer)
|
||||||
0.f, 2.f * g_Proj.x14_near / tmb, tpb / tmb, 0.f,
|
0.f, 2.f * g_Proj.x14_near / tmb, tpb / tmb, 0.f,
|
||||||
0.f, 0.f, -fpn / fmn, -2.f * g_Proj.x18_far * g_Proj.x14_near / fmn,
|
0.f, 0.f, -fpn / fmn, -2.f * g_Proj.x18_far * g_Proj.x14_near / fmn,
|
||||||
0.f, 0.f, -1.f, 0.f);
|
0.f, 0.f, -1.f, 0.f);
|
||||||
return PlusOneZFlip * mat2;
|
return VulkanCorrect * mat2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -316,9 +316,9 @@ zeus::CMatrix4f CGraphics::GetPerspectiveProjectionMatrix(bool forRenderer)
|
||||||
{
|
{
|
||||||
zeus::CMatrix4f mat2(2.f / rml, 0.f, 0.f, -rpl / rml,
|
zeus::CMatrix4f mat2(2.f / rml, 0.f, 0.f, -rpl / rml,
|
||||||
0.f, 2.f / tmb, 0.f, -tpb / tmb,
|
0.f, 2.f / tmb, 0.f, -tpb / tmb,
|
||||||
0.f, 0.f, 1.f / fmn, g_Proj.x14_near / fmn,
|
0.f, 0.f, -2.f / fmn, -fpn / fmn,
|
||||||
0.f, 0.f, 0.f, 1.f);
|
0.f, 0.f, 0.f, 1.f);
|
||||||
return PlusOneZFlip * mat2;
|
return VulkanCorrect * mat2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -171,8 +171,7 @@ CBooModel::ModelInstance* CBooModel::PushNewModelInstance()
|
||||||
/* Binding for each surface */
|
/* Binding for each surface */
|
||||||
newInst.m_shaderDataBindings.reserve(x0_surfaces->size());
|
newInst.m_shaderDataBindings.reserve(x0_surfaces->size());
|
||||||
|
|
||||||
std::vector<boo::ITexture*> texs;
|
boo::ITexture* texs[8] = {};
|
||||||
texs.resize(8);
|
|
||||||
boo::ITexture* mbShadowTexs[] = {g_Renderer->m_ballShadowId,
|
boo::ITexture* mbShadowTexs[] = {g_Renderer->m_ballShadowId,
|
||||||
g_Renderer->x220_sphereRamp,
|
g_Renderer->x220_sphereRamp,
|
||||||
g_Renderer->m_ballFade};
|
g_Renderer->m_ballFade};
|
||||||
|
@ -188,11 +187,11 @@ CBooModel::ModelInstance* CBooModel::PushNewModelInstance()
|
||||||
{
|
{
|
||||||
const MaterialSet::Material& mat = x4_matSet->materials.at(surf.m_data.matIdx);
|
const MaterialSet::Material& mat = x4_matSet->materials.at(surf.m_data.matIdx);
|
||||||
|
|
||||||
texs.clear();
|
u32 texCount = 0;
|
||||||
for (atUint32 idx : mat.textureIdxs)
|
for (atUint32 idx : mat.textureIdxs)
|
||||||
{
|
{
|
||||||
TCachedToken<CTexture>& tex = x1c_textures[idx];
|
TCachedToken<CTexture>& tex = x1c_textures[idx];
|
||||||
texs.push_back(tex.GetObj()->GetBooTexture());
|
texs[texCount++] = tex.GetObj()->GetBooTexture();
|
||||||
}
|
}
|
||||||
texs[7] = g_Renderer->x220_sphereRamp;
|
texs[7] = g_Renderer->x220_sphereRamp;
|
||||||
|
|
||||||
|
@ -227,7 +226,7 @@ CBooModel::ModelInstance* CBooModel::PushNewModelInstance()
|
||||||
if (idx == EExtendedShader::Thermal)
|
if (idx == EExtendedShader::Thermal)
|
||||||
{
|
{
|
||||||
texCount = 8;
|
texCount = 8;
|
||||||
ltexs = texs.data();
|
ltexs = texs;
|
||||||
}
|
}
|
||||||
else if (idx == EExtendedShader::MorphBallShadow)
|
else if (idx == EExtendedShader::MorphBallShadow)
|
||||||
{
|
{
|
||||||
|
@ -237,7 +236,7 @@ CBooModel::ModelInstance* CBooModel::PushNewModelInstance()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
texCount = mat.textureIdxs.size();
|
texCount = mat.textureIdxs.size();
|
||||||
ltexs = texs.data();
|
ltexs = texs;
|
||||||
}
|
}
|
||||||
extendeds.push_back(
|
extendeds.push_back(
|
||||||
ctx.newShaderDataBinding(pipeline, m_vtxFmt,
|
ctx.newShaderDataBinding(pipeline, m_vtxFmt,
|
||||||
|
|
|
@ -142,7 +142,7 @@ TShader<CCameraBlurFilter>::IDataBindingFactory* CCameraBlurFilter::Initialize(b
|
||||||
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
||||||
s_Pipeline = ctx.newShaderPipeline(VS, FS, s_VtxFmt, boo::BlendFactor::SrcAlpha,
|
s_Pipeline = ctx.newShaderPipeline(VS, FS, s_VtxFmt, boo::BlendFactor::SrcAlpha,
|
||||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips,
|
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips,
|
||||||
boo::ZTest::None, false, boo::CullMode::None);
|
boo::ZTest::None, false, true, false, boo::CullMode::None);
|
||||||
return new CCameraBlurFilterVulkanDataBindingFactory;
|
return new CCameraBlurFilterVulkanDataBindingFactory;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -102,7 +102,7 @@ struct CCameraBlurFilterD3DDataBindingFactory : TShader<CCameraBlurFilter>::IDat
|
||||||
boo::ITexture* texs[] = {CGraphics::g_SpareTexture};
|
boo::ITexture* texs[] = {CGraphics::g_SpareTexture};
|
||||||
return cctx.newShaderDataBinding(s_Pipeline, s_VtxFmt,
|
return cctx.newShaderDataBinding(s_Pipeline, s_VtxFmt,
|
||||||
filter.m_vbo, nullptr, nullptr, 1, bufs,
|
filter.m_vbo, nullptr, nullptr, 1, bufs,
|
||||||
nullptr, nullptr, nullptr, 1, texs);
|
nullptr, nullptr, nullptr, 1, texs, nullptr, nullptr);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -116,8 +116,8 @@ TShader<CCameraBlurFilter>::IDataBindingFactory* CCameraBlurFilter::Initialize(b
|
||||||
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
||||||
s_Pipeline = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, nullptr,
|
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,
|
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips,
|
||||||
boo::CullMode::None);
|
boo::ZTest::None, false, true, false, boo::CullMode::None);
|
||||||
return new CCameraBlurFilterD3DDataBindingFactory;
|
return new CCameraBlurFilterD3DDataBindingFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ struct CColoredQuadFilterD3DDataBindingFactory : TMultiBlendShader<CColoredQuadF
|
||||||
boo::IGraphicsBuffer* bufs[] = {filter.m_uniBuf};
|
boo::IGraphicsBuffer* bufs[] = {filter.m_uniBuf};
|
||||||
return cctx.newShaderDataBinding(SelectPipeline(type), s_VtxFmt,
|
return cctx.newShaderDataBinding(SelectPipeline(type), s_VtxFmt,
|
||||||
filter.m_vbo, nullptr, nullptr, 1, bufs,
|
filter.m_vbo, nullptr, nullptr, 1, bufs,
|
||||||
nullptr, nullptr, nullptr, 0, nullptr);
|
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -90,16 +90,16 @@ CColoredQuadFilter::Initialize(boo::ID3DDataFactory::Context& ctx)
|
||||||
s_VtxFmt = ctx.newVertexFormat(1, VtxVmt);
|
s_VtxFmt = ctx.newVertexFormat(1, VtxVmt);
|
||||||
s_AlphaPipeline = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, nullptr,
|
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,
|
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips,
|
||||||
boo::CullMode::None);
|
boo::ZTest::None, false, true, false, boo::CullMode::None);
|
||||||
s_AddPipeline = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, nullptr,
|
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,
|
boo::BlendFactor::One, boo::Primitive::TriStrips,
|
||||||
boo::CullMode::None);
|
boo::ZTest::None, false, true, false, boo::CullMode::None);
|
||||||
s_MultPipeline = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, nullptr,
|
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,
|
boo::BlendFactor::DstColor, boo::Primitive::TriStrips,
|
||||||
boo::CullMode::None);
|
boo::ZTest::None, false, true, false, boo::CullMode::None);
|
||||||
return new CColoredQuadFilterD3DDataBindingFactory;
|
return new CColoredQuadFilterD3DDataBindingFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ BOO_GLSL_BINDING_HEAD
|
||||||
"SBINDING(0) out VertToFrag vtf;\n"
|
"SBINDING(0) out VertToFrag vtf;\n"
|
||||||
"void main()\n"
|
"void main()\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" gl_Position = FLIPFROMGL(vec4(posIn.xy, 0.0, 1.0));\n"
|
" gl_Position = vec4(posIn.xy, 0.0, 1.0);\n"
|
||||||
" vtf.color = color;\n"
|
" vtf.color = color;\n"
|
||||||
" vtf.uv = uvIn;\n"
|
" vtf.uv = uvIn;\n"
|
||||||
"}\n";
|
"}\n";
|
||||||
|
@ -50,11 +50,7 @@ BOO_GLSL_BINDING_HEAD
|
||||||
"{\n"
|
"{\n"
|
||||||
" float y;\n"
|
" float y;\n"
|
||||||
" const float linScale = 65535.0 / 65536.0 * 256.0;\n"
|
" const float linScale = 65535.0 / 65536.0 * 256.0;\n"
|
||||||
"#ifdef VULKAN\n"
|
|
||||||
" float x = modf((1.0 - texture(zFrontfaceTex, vtf.uv).r) * linScale, y);\n"
|
|
||||||
"#else\n"
|
|
||||||
" float x = modf(texture(zFrontfaceTex, vtf.uv).r * linScale, y);\n"
|
" float x = modf(texture(zFrontfaceTex, vtf.uv).r * linScale, y);\n"
|
||||||
"#endif\n"
|
|
||||||
" const float uvBias = 0.5 / 256.0;\n"
|
" const float uvBias = 0.5 / 256.0;\n"
|
||||||
" float alpha = texture(zLinearizer, vec2(x * 255.0 / 256.0 + uvBias, y / 256.0 + uvBias)).r * 10.0;\n"
|
" float alpha = texture(zLinearizer, vec2(x * 255.0 / 256.0 + uvBias, y / 256.0 + uvBias)).r * 10.0;\n"
|
||||||
" colorOut = vtf.color * alpha;\n"
|
" colorOut = vtf.color * alpha;\n"
|
||||||
|
@ -80,13 +76,8 @@ BOO_GLSL_BINDING_HEAD
|
||||||
" float frontY;\n"
|
" float frontY;\n"
|
||||||
" float backY;\n"
|
" float backY;\n"
|
||||||
" const float linScale = 65535.0 / 65536.0 * 256.0;\n"
|
" const float linScale = 65535.0 / 65536.0 * 256.0;\n"
|
||||||
"#ifdef VULKAN\n"
|
|
||||||
" float frontX = modf((1.0 - texture(zFrontfaceTex, vtf.uv).r) * linScale, frontY);\n"
|
|
||||||
" float backX = modf((1.0 - texture(zBackfaceTex, vtf.uv).r) * linScale, backY);\n"
|
|
||||||
"#else\n"
|
|
||||||
" float frontX = modf(texture(zFrontfaceTex, vtf.uv).r * linScale, frontY);\n"
|
" float frontX = modf(texture(zFrontfaceTex, vtf.uv).r * linScale, frontY);\n"
|
||||||
" float backX = modf(texture(zBackfaceTex, vtf.uv).r * linScale, backY);\n"
|
" float backX = modf(texture(zBackfaceTex, vtf.uv).r * linScale, backY);\n"
|
||||||
"#endif\n"
|
|
||||||
" const float uvBias = 0.5 / 256.0;\n"
|
" const float uvBias = 0.5 / 256.0;\n"
|
||||||
" float frontLin = texture(zLinearizer, vec2(frontX * 255.0 / 256.0 + uvBias, frontY / 256.0 + uvBias)).r;\n"
|
" float frontLin = texture(zLinearizer, vec2(frontX * 255.0 / 256.0 + uvBias, frontY / 256.0 + uvBias)).r;\n"
|
||||||
" float backLin = texture(zLinearizer, vec2(backX * 255.0 / 256.0 + uvBias, backY / 256.0 + uvBias)).r;\n"
|
" float backLin = texture(zLinearizer, vec2(backX * 255.0 / 256.0 + uvBias, backY / 256.0 + uvBias)).r;\n"
|
||||||
|
|
|
@ -0,0 +1,130 @@
|
||||||
|
#include "CFogVolumeFilter.hpp"
|
||||||
|
#include "TShader.hpp"
|
||||||
|
#include "GameGlobalObjects.hpp"
|
||||||
|
#include "Graphics/CBooRenderer.hpp"
|
||||||
|
|
||||||
|
namespace urde
|
||||||
|
{
|
||||||
|
|
||||||
|
static const char* VS =
|
||||||
|
"struct VertData\n"
|
||||||
|
"{\n"
|
||||||
|
" float4 posIn : POSITION;\n"
|
||||||
|
" float2 uvIn : UV;\n"
|
||||||
|
"};\n"
|
||||||
|
"\n"
|
||||||
|
"cbuffer FogVolumeFilterUniform : register(b0)\n"
|
||||||
|
"{\n"
|
||||||
|
" float4 color;\n"
|
||||||
|
"};\n"
|
||||||
|
"\n"
|
||||||
|
"struct VertToFrag\n"
|
||||||
|
"{\n"
|
||||||
|
" float4 position : SV_Position;\n"
|
||||||
|
" float4 color : COLOR;\n"
|
||||||
|
" float2 uv : UV;\n"
|
||||||
|
"};\n"
|
||||||
|
"\n"
|
||||||
|
"VertToFrag main(in VertData v)\n"
|
||||||
|
"{\n"
|
||||||
|
" VertToFrag vtf;\n"
|
||||||
|
" vtf.position = float4(v.posIn.x, -v.posIn.y, 0.0, 1.0);\n"
|
||||||
|
" vtf.color = color;\n"
|
||||||
|
" vtf.uv = v.uvIn;\n"
|
||||||
|
" return vtf;\n"
|
||||||
|
"}\n";
|
||||||
|
|
||||||
|
static const char* FS1Way =
|
||||||
|
"struct VertToFrag\n"
|
||||||
|
"{\n"
|
||||||
|
" float4 position : SV_Position;\n"
|
||||||
|
" float4 color : COLOR;\n"
|
||||||
|
" float2 uv : UV;\n"
|
||||||
|
"};\n"
|
||||||
|
"\n"
|
||||||
|
"Texture2D zFrontfaceTex : register(t0);\n"
|
||||||
|
"Texture2D zBackfaceTex : register(t1);\n"
|
||||||
|
"Texture2D zLinearizer : register(t2);\n"
|
||||||
|
"SamplerState samp : register(s0);\n"
|
||||||
|
"float4 main(in VertToFrag vtf) : SV_Target0\n"
|
||||||
|
"{\n"
|
||||||
|
" float y;\n"
|
||||||
|
" const float linScale = 65535.0 / 65536.0 * 256.0;\n"
|
||||||
|
" float x = modf((1.0 - zFrontfaceTex.Sample(samp, vtf.uv).r) * linScale, y);\n"
|
||||||
|
" const float uvBias = 0.5 / 256.0;\n"
|
||||||
|
" float alpha = zLinearizer.Sample(samp, float2(x * 255.0 / 256.0 + uvBias, y / 256.0 + uvBias)).r * 10.0;\n"
|
||||||
|
" return vtf.color * alpha;\n"
|
||||||
|
"}\n";
|
||||||
|
|
||||||
|
static const char* FS2Way =
|
||||||
|
"struct VertToFrag\n"
|
||||||
|
"{\n"
|
||||||
|
" float4 position : SV_Position;\n"
|
||||||
|
" float4 color : COLOR;\n"
|
||||||
|
" float2 uv : UV;\n"
|
||||||
|
"};\n"
|
||||||
|
"\n"
|
||||||
|
"Texture2D zFrontfaceTex : register(t0);\n"
|
||||||
|
"Texture2D zBackfaceTex : register(t1);\n"
|
||||||
|
"Texture2D zLinearizer : register(t2);\n"
|
||||||
|
"SamplerState samp : register(s0);\n"
|
||||||
|
"float4 main(in VertToFrag vtf) : SV_Target0\n"
|
||||||
|
"{\n"
|
||||||
|
" float frontY;\n"
|
||||||
|
" float backY;\n"
|
||||||
|
" const float linScale = 65535.0 / 65536.0 * 256.0;\n"
|
||||||
|
" float frontX = modf((1.0 - zFrontfaceTex.Sample(samp, vtf.uv).r) * linScale, frontY);\n"
|
||||||
|
" float backX = modf((1.0 - zBackfaceTex.Sample(samp, vtf.uv).r) * linScale, backY);\n"
|
||||||
|
" const float uvBias = 0.5 / 256.0;\n"
|
||||||
|
" float frontLin = zLinearizer.Sample(samp, float2(frontX * 255.0 / 256.0 + uvBias, frontY / 256.0 + uvBias)).r;\n"
|
||||||
|
" float backLin = zLinearizer.Sample(samp, float2(backX * 255.0 / 256.0 + uvBias, backY / 256.0 + uvBias)).r;\n"
|
||||||
|
" return float4(vtf.color.rgb, (frontLin - backLin) * 10.0);\n"
|
||||||
|
"}\n";
|
||||||
|
|
||||||
|
URDE_DECL_SPECIALIZE_SHADER(CFogVolumeFilter)
|
||||||
|
|
||||||
|
static boo::IVertexFormat* s_VtxFmt = nullptr;
|
||||||
|
static boo::IShaderPipeline* s_1WayPipeline = nullptr;
|
||||||
|
static boo::IShaderPipeline* s_2WayPipeline = nullptr;
|
||||||
|
|
||||||
|
struct CFogVolumeFilterD3DDataBindingFactory : TShader<CFogVolumeFilter>::IDataBindingFactory
|
||||||
|
{
|
||||||
|
boo::IShaderDataBinding* BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx,
|
||||||
|
CFogVolumeFilter& filter)
|
||||||
|
{
|
||||||
|
boo::ID3DDataFactory::Context& cctx = static_cast<boo::ID3DDataFactory::Context&>(ctx);
|
||||||
|
boo::ITexture* texs[] = { CGraphics::g_SpareTexture, CGraphics::g_SpareTexture,
|
||||||
|
g_Renderer->GetFogRampTex() };
|
||||||
|
int bindIdxs[] = {0, 1, 0};
|
||||||
|
bool bindDepth[] = {true, true, false};
|
||||||
|
boo::IGraphicsBuffer* ubufs[] = {filter.m_uniBuf};
|
||||||
|
|
||||||
|
filter.m_dataBind1Way = cctx.newShaderDataBinding(s_1WayPipeline, s_VtxFmt,
|
||||||
|
filter.m_vbo, nullptr, nullptr, 1, ubufs,
|
||||||
|
nullptr, nullptr, nullptr, 3, texs, bindIdxs, bindDepth);
|
||||||
|
filter.m_dataBind2Way = cctx.newShaderDataBinding(s_2WayPipeline, s_VtxFmt,
|
||||||
|
filter.m_vbo, nullptr, nullptr, 1, ubufs,
|
||||||
|
nullptr, nullptr, nullptr, 3, texs, bindIdxs, bindDepth);
|
||||||
|
return filter.m_dataBind1Way;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
TShader<CFogVolumeFilter>::IDataBindingFactory*
|
||||||
|
CFogVolumeFilter::Initialize(boo::ID3DDataFactory::Context& ctx)
|
||||||
|
{
|
||||||
|
const boo::VertexElementDescriptor VtxVmt[] =
|
||||||
|
{
|
||||||
|
{nullptr, nullptr, boo::VertexSemantic::Position4},
|
||||||
|
{nullptr, nullptr, boo::VertexSemantic::UV4}
|
||||||
|
};
|
||||||
|
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
||||||
|
s_1WayPipeline = ctx.newShaderPipeline(VS, FS1Way, nullptr, nullptr, nullptr, s_VtxFmt, boo::BlendFactor::DstAlpha,
|
||||||
|
boo::BlendFactor::One, boo::Primitive::TriStrips,
|
||||||
|
boo::ZTest::None, false, true, false, boo::CullMode::None);
|
||||||
|
s_2WayPipeline = ctx.newShaderPipeline(VS, FS2Way, nullptr, nullptr, nullptr, s_VtxFmt, boo::BlendFactor::SrcAlpha,
|
||||||
|
boo::BlendFactor::One, boo::Primitive::TriStrips,
|
||||||
|
boo::ZTest::None, false, true, false, boo::CullMode::None);
|
||||||
|
return new CFogVolumeFilterD3DDataBindingFactory;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,67 @@
|
||||||
|
#include "CFogVolumePlaneShader.hpp"
|
||||||
|
#include "TShader.hpp"
|
||||||
|
|
||||||
|
namespace urde
|
||||||
|
{
|
||||||
|
|
||||||
|
static const char* VS =
|
||||||
|
"struct VertData\n"
|
||||||
|
"{\n"
|
||||||
|
" float4 posIn : POSITION;\n"
|
||||||
|
"};\n"
|
||||||
|
"\n"
|
||||||
|
"float4 main(in VertData v) : SV_Position\n"
|
||||||
|
"{\n"
|
||||||
|
" return v.posIn;\n"
|
||||||
|
"}\n";
|
||||||
|
|
||||||
|
static const char* FS =
|
||||||
|
"float4 main() : SV_Target0\n"
|
||||||
|
"{\n"
|
||||||
|
" return float4(1.0, 1.0, 1.0, 1.0);\n"
|
||||||
|
"}\n";
|
||||||
|
|
||||||
|
URDE_DECL_SPECIALIZE_SHADER(CFogVolumePlaneShader)
|
||||||
|
|
||||||
|
static boo::IVertexFormat* s_VtxFmt = nullptr;
|
||||||
|
static boo::IShaderPipeline* s_Pipelines[4] = {};
|
||||||
|
|
||||||
|
struct CFogVolumePlaneShaderD3DDataBindingFactory : TShader<CFogVolumePlaneShader>::IDataBindingFactory
|
||||||
|
{
|
||||||
|
boo::IShaderDataBinding* BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx,
|
||||||
|
CFogVolumePlaneShader& filter)
|
||||||
|
{
|
||||||
|
boo::ID3DDataFactory::Context& cctx = static_cast<boo::ID3DDataFactory::Context&>(ctx);
|
||||||
|
|
||||||
|
for (int i=0 ; i<4 ; ++i)
|
||||||
|
filter.m_dataBinds[i] = cctx.newShaderDataBinding(s_Pipelines[i], s_VtxFmt,
|
||||||
|
filter.m_vbo, nullptr, nullptr, 0, nullptr,
|
||||||
|
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr);
|
||||||
|
return filter.m_dataBinds[0];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
TShader<CFogVolumePlaneShader>::IDataBindingFactory*
|
||||||
|
CFogVolumePlaneShader::Initialize(boo::ID3DDataFactory::Context& ctx)
|
||||||
|
{
|
||||||
|
const boo::VertexElementDescriptor VtxVmt[] =
|
||||||
|
{
|
||||||
|
{nullptr, nullptr, boo::VertexSemantic::Position4}
|
||||||
|
};
|
||||||
|
s_VtxFmt = ctx.newVertexFormat(1, VtxVmt);
|
||||||
|
s_Pipelines[0] = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, nullptr, s_VtxFmt, boo::BlendFactor::Zero,
|
||||||
|
boo::BlendFactor::Zero, boo::Primitive::TriStrips,
|
||||||
|
boo::ZTest::LEqual, true, false, false, boo::CullMode::Frontface);
|
||||||
|
s_Pipelines[1] = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, nullptr, s_VtxFmt, boo::BlendFactor::Zero,
|
||||||
|
boo::BlendFactor::Zero, boo::Primitive::TriStrips,
|
||||||
|
boo::ZTest::None, false, false, false, boo::CullMode::Frontface);
|
||||||
|
s_Pipelines[2] = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, nullptr, s_VtxFmt, boo::BlendFactor::Zero,
|
||||||
|
boo::BlendFactor::Zero, boo::Primitive::TriStrips,
|
||||||
|
boo::ZTest::LEqual, true, false, false, boo::CullMode::Backface);
|
||||||
|
s_Pipelines[3] = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, nullptr, s_VtxFmt, boo::BlendFactor::Zero,
|
||||||
|
boo::BlendFactor::Zero, boo::Primitive::TriStrips,
|
||||||
|
boo::ZTest::Greater, false, false, false, boo::CullMode::Backface);
|
||||||
|
return new CFogVolumePlaneShaderD3DDataBindingFactory;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -131,16 +131,20 @@ CLineRendererShaders::IDataBindingFactory* CLineRendererShaders::Initialize(boo:
|
||||||
|
|
||||||
m_texAlpha = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, 1, TexNames, 1, UniNames,
|
m_texAlpha = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, 1, TexNames, 1, UniNames,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, boo::ZTest::None, true, true, false, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::None,
|
||||||
|
true, true, false, boo::CullMode::None);
|
||||||
m_texAdditive = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, 1, TexNames, 1, UniNames,
|
m_texAdditive = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, 1, TexNames, 1, UniNames,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||||
boo::Primitive::TriStrips, boo::ZTest::None, false, true, false, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::None,
|
||||||
|
false, true, false, boo::CullMode::None);
|
||||||
m_noTexAlpha = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, 1, nullptr, 1, UniNames,
|
m_noTexAlpha = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, 1, nullptr, 1, UniNames,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, boo::ZTest::None, true, true, false, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::None,
|
||||||
|
true, true, false, boo::CullMode::None);
|
||||||
m_noTexAdditive = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, 1, nullptr, 1, UniNames,
|
m_noTexAdditive = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, 1, nullptr, 1, UniNames,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||||
boo::Primitive::TriStrips, boo::ZTest::None, false, true, false, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::None,
|
||||||
|
false, true, false, boo::CullMode::None);
|
||||||
|
|
||||||
return new struct OGLLineDataBindingFactory;
|
return new struct OGLLineDataBindingFactory;
|
||||||
}
|
}
|
||||||
|
@ -164,7 +168,8 @@ struct VulkanLineDataBindingFactory : CLineRendererShaders::IDataBindingFactory
|
||||||
|
|
||||||
renderer.m_shaderBind = ctx.newShaderDataBinding(pipeline, nullptr, renderer.m_vertBuf,
|
renderer.m_shaderBind = ctx.newShaderDataBinding(pipeline, nullptr, renderer.m_vertBuf,
|
||||||
nullptr, nullptr, 1, uniforms,
|
nullptr, nullptr, 1, uniforms,
|
||||||
nullptr, texCount, textures);
|
nullptr, texCount, textures,
|
||||||
|
nullptr, nullptr);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -187,16 +192,20 @@ CLineRendererShaders::IDataBindingFactory* CLineRendererShaders::Initialize(boo:
|
||||||
|
|
||||||
m_texAlpha = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_texVtxFmt,
|
m_texAlpha = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_texVtxFmt,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, false, true, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::None,
|
||||||
|
true, true, false, boo::CullMode::None);
|
||||||
m_texAdditive = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_texVtxFmt,
|
m_texAdditive = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_texVtxFmt,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::None,
|
||||||
|
false, true, false, boo::CullMode::None);
|
||||||
m_noTexAlpha = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_noTexVtxFmt,
|
m_noTexAlpha = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_noTexVtxFmt,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, false, true, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::None,
|
||||||
|
true, true, false, boo::CullMode::None);
|
||||||
m_noTexAdditive = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_noTexVtxFmt,
|
m_noTexAdditive = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_noTexVtxFmt,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::None,
|
||||||
|
false, true, false, boo::CullMode::None);
|
||||||
|
|
||||||
return new struct VulkanLineDataBindingFactory;
|
return new struct VulkanLineDataBindingFactory;
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,7 @@ struct HLSLLineDataBindingFactory : CLineRendererShaders::IDataBindingFactory
|
||||||
|
|
||||||
renderer.m_shaderBind = ctx.newShaderDataBinding(pipeline, nullptr, renderer.m_vertBuf,
|
renderer.m_shaderBind = ctx.newShaderDataBinding(pipeline, nullptr, renderer.m_vertBuf,
|
||||||
nullptr, nullptr, 1, uniforms, nullptr,
|
nullptr, nullptr, 1, uniforms, nullptr,
|
||||||
texCount, textures);
|
texCount, textures, nullptr, nullptr);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -128,19 +128,23 @@ CLineRendererShaders::IDataBindingFactory* CLineRendererShaders::Initialize(boo:
|
||||||
m_texAlpha = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
|
m_texAlpha = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
|
||||||
nullptr, m_texVtxFmt,
|
nullptr, m_texVtxFmt,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips,false, true, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::None,
|
||||||
|
true, true, false, boo::CullMode::None);
|
||||||
m_texAdditive = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
|
m_texAdditive = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
|
||||||
nullptr, m_texVtxFmt,
|
nullptr, m_texVtxFmt,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||||
boo::Primitive::TriStrips,false, false, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::None,
|
||||||
|
false, true, false, boo::CullMode::None);
|
||||||
m_noTexAlpha = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
|
m_noTexAlpha = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
|
||||||
nullptr, m_noTexVtxFmt,
|
nullptr, m_noTexVtxFmt,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, false, true, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::None,
|
||||||
|
true, true, false, boo::CullMode::None);
|
||||||
m_noTexAdditive = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
|
m_noTexAdditive = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
|
||||||
nullptr, m_noTexVtxFmt,
|
nullptr, m_noTexVtxFmt,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::None,
|
||||||
|
false, true, false, boo::CullMode::None);
|
||||||
|
|
||||||
return new struct HLSLLineDataBindingFactory;
|
return new struct HLSLLineDataBindingFactory;
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,54 +108,64 @@ CModelShaders::GetShaderExtensionsHLSL(boo::IGraphicsDataFactory::Platform plat)
|
||||||
/* Normal lit shading */
|
/* Normal lit shading */
|
||||||
ext.registerExtensionSlot({LightingHLSL, "LightingFunc"}, {MainPostHLSL, "MainPostFunc"},
|
ext.registerExtensionSlot({LightingHLSL, "LightingFunc"}, {MainPostHLSL, "MainPostFunc"},
|
||||||
0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::Original,
|
0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::Original,
|
||||||
hecl::Backend::BlendFactor::Original);
|
hecl::Backend::BlendFactor::Original, hecl::Backend::ZTest::Original,
|
||||||
|
false, false, false, true);
|
||||||
|
|
||||||
/* Thermal Visor shading */
|
/* Thermal Visor shading */
|
||||||
ext.registerExtensionSlot({}, {ThermalPostHLSL, "ThermalPostFunc"}, 0, nullptr,
|
ext.registerExtensionSlot({}, {ThermalPostHLSL, "ThermalPostFunc"}, 0, nullptr,
|
||||||
1, ThermalTextures, hecl::Backend::BlendFactor::One,
|
1, ThermalTextures, hecl::Backend::BlendFactor::One,
|
||||||
hecl::Backend::BlendFactor::One);
|
hecl::Backend::BlendFactor::One, hecl::Backend::ZTest::Original,
|
||||||
|
false, false, false, true);
|
||||||
|
|
||||||
/* Forced alpha shading */
|
/* Forced alpha shading */
|
||||||
ext.registerExtensionSlot({LightingHLSL, "LightingFunc"}, {MainPostHLSL, "MainPostFunc"},
|
ext.registerExtensionSlot({LightingHLSL, "LightingFunc"}, {MainPostHLSL, "MainPostFunc"},
|
||||||
0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::SrcAlpha,
|
0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::SrcAlpha,
|
||||||
hecl::Backend::BlendFactor::InvSrcAlpha);
|
hecl::Backend::BlendFactor::InvSrcAlpha, hecl::Backend::ZTest::Original,
|
||||||
|
false, false, false, true);
|
||||||
|
|
||||||
/* Forced additive shading */
|
/* Forced additive shading */
|
||||||
ext.registerExtensionSlot({LightingHLSL, "LightingFunc"}, {MainPostHLSL, "MainPostFunc"},
|
ext.registerExtensionSlot({LightingHLSL, "LightingFunc"}, {MainPostHLSL, "MainPostFunc"},
|
||||||
0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::One,
|
0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::One,
|
||||||
hecl::Backend::BlendFactor::One);
|
hecl::Backend::BlendFactor::One, hecl::Backend::ZTest::Original,
|
||||||
|
false, false, false, true);
|
||||||
|
|
||||||
/* Solid color */
|
/* Solid color */
|
||||||
ext.registerExtensionSlot({}, {SolidPostHLSL, "SolidPostFunc"},
|
ext.registerExtensionSlot({}, {SolidPostHLSL, "SolidPostFunc"},
|
||||||
0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::One,
|
0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::One,
|
||||||
hecl::Backend::BlendFactor::Zero, hecl::Backend::ZTest::LEqual, false, false);
|
hecl::Backend::BlendFactor::Zero, hecl::Backend::ZTest::LEqual,
|
||||||
|
false, false, false, false);
|
||||||
/* Alpha-only Solid color backface cull, LEqual */
|
|
||||||
ext.registerExtensionSlot({}, {SolidPostHLSL, "SolidPostFunc"},
|
|
||||||
0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::Zero,
|
|
||||||
hecl::Backend::BlendFactor::One, hecl::Backend::ZTest::LEqual, false, false);
|
|
||||||
|
|
||||||
/* Alpha-only Solid color backface cull, Always, No Z-write */
|
|
||||||
ext.registerExtensionSlot({}, {SolidPostHLSL, "SolidPostFunc"},
|
|
||||||
0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::Zero,
|
|
||||||
hecl::Backend::BlendFactor::One, hecl::Backend::ZTest::None, false, true);
|
|
||||||
|
|
||||||
/* Alpha-only Solid color frontface cull, LEqual */
|
/* Alpha-only Solid color frontface cull, LEqual */
|
||||||
ext.registerExtensionSlot({}, {SolidPostHLSL, "SolidPostFunc"},
|
ext.registerExtensionSlot({}, {SolidPostHLSL, "SolidPostFunc"},
|
||||||
0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::Zero,
|
0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::One,
|
||||||
hecl::Backend::BlendFactor::One, hecl::Backend::ZTest::LEqual, true, false);
|
hecl::Backend::BlendFactor::Zero, hecl::Backend::ZTest::LEqual,
|
||||||
|
true, false, true, false);
|
||||||
|
|
||||||
/* Alpha-only Solid color frontface cull, Greater, No Z-write */
|
/* Alpha-only Solid color frontface cull, Always, No Z-write */
|
||||||
ext.registerExtensionSlot({}, {SolidPostHLSL, "SolidPostFunc"},
|
ext.registerExtensionSlot({}, {SolidPostHLSL, "SolidPostFunc"},
|
||||||
0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::Zero,
|
0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::One,
|
||||||
hecl::Backend::BlendFactor::One, hecl::Backend::ZTest::Greater, true, true);
|
hecl::Backend::BlendFactor::Zero, hecl::Backend::ZTest::None,
|
||||||
|
true, true, true, false);
|
||||||
|
|
||||||
|
/* Alpha-only Solid color backface cull, LEqual */
|
||||||
|
ext.registerExtensionSlot({}, {SolidPostHLSL, "SolidPostFunc"},
|
||||||
|
0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::One,
|
||||||
|
hecl::Backend::BlendFactor::Zero, hecl::Backend::ZTest::LEqual,
|
||||||
|
false, false, true, false);
|
||||||
|
|
||||||
|
/* Alpha-only Solid color backface cull, Greater, No Z-write */
|
||||||
|
ext.registerExtensionSlot({}, {SolidPostHLSL, "SolidPostFunc"},
|
||||||
|
0, nullptr, 0, nullptr, hecl::Backend::BlendFactor::One,
|
||||||
|
hecl::Backend::BlendFactor::Zero, hecl::Backend::ZTest::Greater,
|
||||||
|
false, true, true, false);
|
||||||
|
|
||||||
/* MorphBall shadow 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,
|
||||||
hecl::Backend::BlendFactor::InvSrcAlpha,
|
hecl::Backend::BlendFactor::InvSrcAlpha,
|
||||||
hecl::Backend::ZTest::Equal);
|
hecl::Backend::ZTest::Equal,
|
||||||
|
false, false, false, true);
|
||||||
|
|
||||||
return ext;
|
return ext;
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,7 @@ struct CSpaceWarpFilterD3DDataBindingFactory : TShader<CSpaceWarpFilter>::IDataB
|
||||||
boo::ITexture* texs[] = {CGraphics::g_SpareTexture, filter.m_warpTex};
|
boo::ITexture* texs[] = {CGraphics::g_SpareTexture, filter.m_warpTex};
|
||||||
return cctx.newShaderDataBinding(s_Pipeline, s_VtxFmt,
|
return cctx.newShaderDataBinding(s_Pipeline, s_VtxFmt,
|
||||||
filter.m_vbo, nullptr, nullptr, 1, bufs,
|
filter.m_vbo, nullptr, nullptr, 1, bufs,
|
||||||
nullptr, nullptr, nullptr, 2, texs);
|
nullptr, nullptr, nullptr, 2, texs, nullptr, nullptr);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -83,8 +83,8 @@ TShader<CSpaceWarpFilter>::IDataBindingFactory* CSpaceWarpFilter::Initialize(boo
|
||||||
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
||||||
s_Pipeline = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, nullptr,
|
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,
|
boo::BlendFactor::Zero, boo::Primitive::TriStrips,
|
||||||
boo::CullMode::None);
|
boo::ZTest::None, false, true, false, boo::CullMode::None);
|
||||||
return new CSpaceWarpFilterD3DDataBindingFactory;
|
return new CSpaceWarpFilterD3DDataBindingFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -128,12 +128,12 @@ CTextSupportShader::Initialize(boo::ID3DDataFactory::Context& ctx)
|
||||||
s_TextVtxFmt = ctx.newVertexFormat(11, TextVtxVmt);
|
s_TextVtxFmt = ctx.newVertexFormat(11, TextVtxVmt);
|
||||||
s_TextAlphaPipeline = ctx.newShaderPipeline(TextVS, TextFS, nullptr, nullptr, nullptr,
|
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,
|
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips,
|
||||||
boo::CullMode::None);
|
boo::ZTest::LEqual, false, true, false, boo::CullMode::None);
|
||||||
s_TextAddPipeline = ctx.newShaderPipeline(TextVS, TextFS, nullptr, nullptr, nullptr,
|
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,
|
boo::BlendFactor::One, boo::Primitive::TriStrips,
|
||||||
boo::CullMode::None);
|
boo::ZTest::LEqual, false, true, false, boo::CullMode::None);
|
||||||
|
|
||||||
boo::VertexElementDescriptor ImageVtxVmt[] =
|
boo::VertexElementDescriptor ImageVtxVmt[] =
|
||||||
{
|
{
|
||||||
|
@ -150,12 +150,12 @@ CTextSupportShader::Initialize(boo::ID3DDataFactory::Context& ctx)
|
||||||
s_ImageVtxFmt = ctx.newVertexFormat(9, ImageVtxVmt);
|
s_ImageVtxFmt = ctx.newVertexFormat(9, ImageVtxVmt);
|
||||||
s_ImageAlphaPipeline = ctx.newShaderPipeline(ImgVS, ImgFS, nullptr, nullptr, nullptr,
|
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,
|
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips,
|
||||||
boo::CullMode::None);
|
boo::ZTest::LEqual, false, true, false, boo::CullMode::None);
|
||||||
s_ImageAddPipeline = ctx.newShaderPipeline(ImgVS, ImgFS, nullptr, nullptr, nullptr,
|
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,
|
boo::BlendFactor::One, boo::Primitive::TriStrips,
|
||||||
boo::CullMode::None);
|
boo::ZTest::LEqual, false, true, false, boo::CullMode::None);
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -206,13 +206,13 @@ CTexturedQuadFilter::Initialize(boo::VulkanDataFactory::Context& ctx)
|
||||||
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
||||||
s_AlphaPipeline = ctx.newShaderPipeline(VSNoFlip, FS, s_VtxFmt, boo::BlendFactor::SrcAlpha,
|
s_AlphaPipeline = ctx.newShaderPipeline(VSNoFlip, FS, s_VtxFmt, boo::BlendFactor::SrcAlpha,
|
||||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips,
|
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips,
|
||||||
boo::ZTest::None, false, boo::CullMode::None);
|
boo::ZTest::None, false, true, false, boo::CullMode::None);
|
||||||
s_AddPipeline = ctx.newShaderPipeline(VSNoFlip, FS, s_VtxFmt, boo::BlendFactor::SrcAlpha,
|
s_AddPipeline = ctx.newShaderPipeline(VSNoFlip, FS, s_VtxFmt, boo::BlendFactor::SrcAlpha,
|
||||||
boo::BlendFactor::One, boo::Primitive::TriStrips,
|
boo::BlendFactor::One, boo::Primitive::TriStrips,
|
||||||
boo::ZTest::None, false, boo::CullMode::None);
|
boo::ZTest::None, false, true, false, boo::CullMode::None);
|
||||||
s_MultPipeline = ctx.newShaderPipeline(VSNoFlip, FS, s_VtxFmt, boo::BlendFactor::SrcColor,
|
s_MultPipeline = ctx.newShaderPipeline(VSNoFlip, FS, s_VtxFmt, boo::BlendFactor::SrcColor,
|
||||||
boo::BlendFactor::DstColor, boo::Primitive::TriStrips,
|
boo::BlendFactor::DstColor, boo::Primitive::TriStrips,
|
||||||
boo::ZTest::None, false, boo::CullMode::None);
|
boo::ZTest::None, false, true, false, boo::CullMode::None);
|
||||||
return new CTexturedQuadFilterVulkanDataBindingFactory;
|
return new CTexturedQuadFilterVulkanDataBindingFactory;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -130,7 +130,7 @@ struct CTexturedQuadFilterD3DDataBindingFactory : TMultiBlendShader<CTexturedQua
|
||||||
boo::ITexture* texs[] = {filter.m_booTex};
|
boo::ITexture* texs[] = {filter.m_booTex};
|
||||||
return cctx.newShaderDataBinding(SelectPipeline(type), s_VtxFmt,
|
return cctx.newShaderDataBinding(SelectPipeline(type), s_VtxFmt,
|
||||||
filter.m_vbo, nullptr, nullptr, 1, bufs,
|
filter.m_vbo, nullptr, nullptr, 1, bufs,
|
||||||
nullptr, nullptr, nullptr, 1, texs);
|
nullptr, nullptr, nullptr, 1, texs, nullptr, nullptr);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -145,16 +145,16 @@ CTexturedQuadFilter::Initialize(boo::ID3DDataFactory::Context& ctx)
|
||||||
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
||||||
s_AlphaPipeline = ctx.newShaderPipeline(VSNoFlip, FS, nullptr, nullptr, nullptr,
|
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,
|
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips,
|
||||||
boo::CullMode::None);
|
boo::ZTest::None, false, true, false, boo::CullMode::None);
|
||||||
s_AddPipeline = ctx.newShaderPipeline(VSNoFlip, FS, nullptr, nullptr, nullptr,
|
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,
|
boo::BlendFactor::One, boo::Primitive::TriStrips,
|
||||||
boo::CullMode::None);
|
boo::ZTest::None, false, true, false, boo::CullMode::None);
|
||||||
s_MultPipeline = ctx.newShaderPipeline(VSNoFlip, FS, nullptr, nullptr, nullptr,
|
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,
|
boo::BlendFactor::DstColor, boo::Primitive::TriStrips,
|
||||||
boo::CullMode::None);
|
boo::ZTest::None, false, true, false, boo::CullMode::None);
|
||||||
return new CTexturedQuadFilterD3DDataBindingFactory;
|
return new CTexturedQuadFilterD3DDataBindingFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ struct CTexturedQuadFilterAlphaD3DDataBindingFactory : TMultiBlendShader<CTextur
|
||||||
boo::ITexture* texs[] = {filter.m_booTex};
|
boo::ITexture* texs[] = {filter.m_booTex};
|
||||||
return cctx.newShaderDataBinding(SelectAlphaPipeline(type), s_AVtxFmt,
|
return cctx.newShaderDataBinding(SelectAlphaPipeline(type), s_AVtxFmt,
|
||||||
filter.m_vbo, nullptr, nullptr, 1, bufs,
|
filter.m_vbo, nullptr, nullptr, 1, bufs,
|
||||||
nullptr, nullptr, nullptr, 1, texs);
|
nullptr, nullptr, nullptr, 1, texs, nullptr, nullptr);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -205,16 +205,16 @@ CTexturedQuadFilterAlpha::Initialize(boo::ID3DDataFactory::Context& ctx)
|
||||||
s_AVtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
s_AVtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
||||||
s_AAlphaPipeline = ctx.newShaderPipeline(VSFlip, FSAlpha, nullptr, nullptr, nullptr,
|
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,
|
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips,
|
||||||
boo::CullMode::None);
|
boo::ZTest::None, false, true, false, boo::CullMode::None);
|
||||||
s_AAddPipeline = ctx.newShaderPipeline(VSFlip, FSAlpha, nullptr, nullptr, nullptr,
|
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,
|
boo::BlendFactor::One, boo::Primitive::TriStrips,
|
||||||
boo::CullMode::None);
|
boo::ZTest::None, false, true, false, boo::CullMode::None);
|
||||||
s_AMultPipeline = ctx.newShaderPipeline(VSFlip, FSAlpha, nullptr, nullptr, nullptr,
|
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,
|
boo::BlendFactor::DstColor, boo::Primitive::TriStrips,
|
||||||
boo::CullMode::None);
|
boo::ZTest::None, false, true, false, boo::CullMode::None);
|
||||||
return new CTexturedQuadFilterAlphaD3DDataBindingFactory;
|
return new CTexturedQuadFilterAlphaD3DDataBindingFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ struct CThermalColdFilterD3DDataBindingFactory : TShader<CThermalColdFilter>::ID
|
||||||
boo::ITexture* texs[] = {CGraphics::g_SpareTexture, filter.m_shiftTex};
|
boo::ITexture* texs[] = {CGraphics::g_SpareTexture, filter.m_shiftTex};
|
||||||
return cctx.newShaderDataBinding(s_Pipeline, s_VtxFmt,
|
return cctx.newShaderDataBinding(s_Pipeline, s_VtxFmt,
|
||||||
filter.m_vbo, nullptr, nullptr, 1, bufs,
|
filter.m_vbo, nullptr, nullptr, 1, bufs,
|
||||||
nullptr, nullptr, nullptr, 2, texs);
|
nullptr, nullptr, nullptr, 2, texs, nullptr, nullptr);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -105,8 +105,8 @@ TShader<CThermalColdFilter>::IDataBindingFactory* CThermalColdFilter::Initialize
|
||||||
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
||||||
s_Pipeline = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, nullptr,
|
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,
|
boo::BlendFactor::Zero, boo::Primitive::TriStrips,
|
||||||
boo::CullMode::None);
|
boo::ZTest::None, false, true, false, boo::CullMode::None);
|
||||||
return new CThermalColdFilterD3DDataBindingFactory;
|
return new CThermalColdFilterD3DDataBindingFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ struct CThermalHotFilterD3DDataBindingFactory : TShader<CThermalHotFilter>::IDat
|
||||||
boo::ITexture* texs[] = {CGraphics::g_SpareTexture, g_Renderer->GetThermoPalette()};
|
boo::ITexture* texs[] = {CGraphics::g_SpareTexture, g_Renderer->GetThermoPalette()};
|
||||||
return cctx.newShaderDataBinding(s_Pipeline, s_VtxFmt,
|
return cctx.newShaderDataBinding(s_Pipeline, s_VtxFmt,
|
||||||
filter.m_vbo, nullptr, nullptr, 1, bufs,
|
filter.m_vbo, nullptr, nullptr, 1, bufs,
|
||||||
nullptr, nullptr, nullptr, 2, texs);
|
nullptr, nullptr, nullptr, 2, texs, nullptr, nullptr);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -82,7 +82,8 @@ TShader<CThermalHotFilter>::IDataBindingFactory* CThermalHotFilter::Initialize(b
|
||||||
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
||||||
s_Pipeline = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, nullptr,
|
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, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::None,
|
||||||
|
false, true, false, boo::CullMode::None);
|
||||||
return new CThermalHotFilterD3DDataBindingFactory;
|
return new CThermalHotFilterD3DDataBindingFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ struct CXRayBlurFilterD3DDataBindingFactory : TShader<CXRayBlurFilter>::IDataBin
|
||||||
boo::ITexture* texs[] = {CGraphics::g_SpareTexture, filter.m_booTex};
|
boo::ITexture* texs[] = {CGraphics::g_SpareTexture, filter.m_booTex};
|
||||||
return cctx.newShaderDataBinding(s_Pipeline, s_VtxFmt,
|
return cctx.newShaderDataBinding(s_Pipeline, s_VtxFmt,
|
||||||
filter.m_vbo, nullptr, nullptr, 1, bufs,
|
filter.m_vbo, nullptr, nullptr, 1, bufs,
|
||||||
nullptr, nullptr, nullptr, 2, texs);
|
nullptr, nullptr, nullptr, 2, texs, nullptr, nullptr);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -97,8 +97,8 @@ TShader<CXRayBlurFilter>::IDataBindingFactory* CXRayBlurFilter::Initialize(boo::
|
||||||
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
||||||
s_Pipeline = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, nullptr,
|
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,
|
boo::BlendFactor::Zero, boo::Primitive::TriStrips,
|
||||||
boo::CullMode::None);
|
boo::ZTest::None, false, true, false, boo::CullMode::None);
|
||||||
return new CXRayBlurFilterD3DDataBindingFactory;
|
return new CXRayBlurFilterD3DDataBindingFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -401,11 +401,11 @@ struct VulkanElementDataBindingFactory : CElementGenShaders::IDataBindingFactory
|
||||||
if (regPipeline)
|
if (regPipeline)
|
||||||
gen.m_normalDataBind = ctx.newShaderDataBinding(regPipeline, nullptr, nullptr,
|
gen.m_normalDataBind = ctx.newShaderDataBinding(regPipeline, nullptr, nullptr,
|
||||||
gen.m_instBuf, nullptr, 1, uniforms,
|
gen.m_instBuf, nullptr, 1, uniforms,
|
||||||
nullptr, texCount, textures);
|
nullptr, texCount, textures, nullptr, nullptr);
|
||||||
if (redToAlphaPipeline)
|
if (redToAlphaPipeline)
|
||||||
gen.m_redToAlphaDataBind = ctx.newShaderDataBinding(redToAlphaPipeline, nullptr, nullptr,
|
gen.m_redToAlphaDataBind = ctx.newShaderDataBinding(redToAlphaPipeline, nullptr, nullptr,
|
||||||
gen.m_instBuf, nullptr, 1, uniforms,
|
gen.m_instBuf, nullptr, 1, uniforms,
|
||||||
nullptr, texCount, textures);
|
nullptr, texCount, textures, nullptr, nullptr);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -455,89 +455,89 @@ CElementGenShaders::IDataBindingFactory* CElementGenShaders::Initialize(boo::Vul
|
||||||
|
|
||||||
m_texZTestZWrite = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_vtxFormatTex,
|
m_texZTestZWrite = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_vtxFormatTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, true, true,
|
boo::Primitive::TriStrips, boo::ZTest::LEqual, true,
|
||||||
true, false, boo::CullMode::None);
|
true, false, boo::CullMode::None);
|
||||||
m_texNoZTestZWrite = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_vtxFormatTex,
|
m_texNoZTestZWrite = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_vtxFormatTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, false, true,
|
boo::Primitive::TriStrips, boo::ZTest::None, true,
|
||||||
true, false, boo::CullMode::None);
|
true, false, boo::CullMode::None);
|
||||||
m_texZTestNoZWrite = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_vtxFormatTex,
|
m_texZTestNoZWrite = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_vtxFormatTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, true, false,
|
boo::Primitive::TriStrips, boo::ZTest::LEqual, false,
|
||||||
true, false, boo::CullMode::None);
|
true, false, boo::CullMode::None);
|
||||||
m_texNoZTestNoZWrite = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_vtxFormatTex,
|
m_texNoZTestNoZWrite = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_vtxFormatTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, false, false,
|
boo::Primitive::TriStrips, boo::ZTest::None, false,
|
||||||
true, false, boo::CullMode::None);
|
true, false, boo::CullMode::None);
|
||||||
|
|
||||||
m_texAdditiveZTest = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_vtxFormatTex,
|
m_texAdditiveZTest = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_vtxFormatTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||||
boo::Primitive::TriStrips, true, false,
|
boo::Primitive::TriStrips, boo::ZTest::LEqual, false,
|
||||||
true, false, boo::CullMode::None);
|
true, false, boo::CullMode::None);
|
||||||
m_texAdditiveNoZTest = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_vtxFormatTex,
|
m_texAdditiveNoZTest = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_vtxFormatTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||||
boo::Primitive::TriStrips, false, false,
|
boo::Primitive::TriStrips, boo::ZTest::None, false,
|
||||||
true, false, boo::CullMode::None);
|
true, false, boo::CullMode::None);
|
||||||
|
|
||||||
m_texRedToAlphaZTest = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX_REDTOALPHA, m_vtxFormatTex,
|
m_texRedToAlphaZTest = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX_REDTOALPHA, m_vtxFormatTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, true, false,
|
boo::Primitive::TriStrips, boo::ZTest::LEqual, false,
|
||||||
true, false, boo::CullMode::None);
|
true, false, boo::CullMode::None);
|
||||||
m_texRedToAlphaNoZTest = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX_REDTOALPHA, m_vtxFormatTex,
|
m_texRedToAlphaNoZTest = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX_REDTOALPHA, m_vtxFormatTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, false, false,
|
boo::Primitive::TriStrips, boo::ZTest::None, false,
|
||||||
true, false, boo::CullMode::None);
|
true, false, boo::CullMode::None);
|
||||||
|
|
||||||
m_indTexZWrite = ctx.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_INDTEX, m_vtxFormatIndTex,
|
m_indTexZWrite = ctx.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_INDTEX, m_vtxFormatIndTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, true, true,
|
boo::Primitive::TriStrips, boo::ZTest::LEqual, true,
|
||||||
true, false, boo::CullMode::None);
|
true, false, boo::CullMode::None);
|
||||||
m_indTexNoZWrite = ctx.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_INDTEX, m_vtxFormatIndTex,
|
m_indTexNoZWrite = ctx.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_INDTEX, m_vtxFormatIndTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, true, false,
|
boo::Primitive::TriStrips, boo::ZTest::LEqual, false,
|
||||||
true, false, boo::CullMode::None);
|
true, false, boo::CullMode::None);
|
||||||
m_indTexAdditive = ctx.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_INDTEX, m_vtxFormatIndTex,
|
m_indTexAdditive = ctx.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_INDTEX, m_vtxFormatIndTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||||
boo::Primitive::TriStrips, true, true,
|
boo::Primitive::TriStrips, boo::ZTest::LEqual, true,
|
||||||
true, false, boo::CullMode::None);
|
true, false, boo::CullMode::None);
|
||||||
|
|
||||||
m_cindTexZWrite = ctx.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_CINDTEX, m_vtxFormatIndTex,
|
m_cindTexZWrite = ctx.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_CINDTEX, m_vtxFormatIndTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, true, true,
|
boo::Primitive::TriStrips, boo::ZTest::LEqual, true,
|
||||||
true, false, boo::CullMode::None);
|
true, false, boo::CullMode::None);
|
||||||
m_cindTexNoZWrite = ctx.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_CINDTEX, m_vtxFormatIndTex,
|
m_cindTexNoZWrite = ctx.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_CINDTEX, m_vtxFormatIndTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, true, false,
|
boo::Primitive::TriStrips, boo::ZTest::LEqual, false,
|
||||||
true, false, boo::CullMode::None);
|
true, false, boo::CullMode::None);
|
||||||
m_cindTexAdditive = ctx.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_CINDTEX, m_vtxFormatIndTex,
|
m_cindTexAdditive = ctx.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_CINDTEX, m_vtxFormatIndTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||||
boo::Primitive::TriStrips, true, true,
|
boo::Primitive::TriStrips, boo::ZTest::LEqual, true,
|
||||||
true, false, boo::CullMode::None);
|
true, false, boo::CullMode::None);
|
||||||
|
|
||||||
m_noTexZTestZWrite = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_vtxFormatNoTex,
|
m_noTexZTestZWrite = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_vtxFormatNoTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, true, true,
|
boo::Primitive::TriStrips, boo::ZTest::LEqual, true,
|
||||||
true, false, boo::CullMode::None);
|
true, false, boo::CullMode::None);
|
||||||
m_noTexNoZTestZWrite = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_vtxFormatNoTex,
|
m_noTexNoZTestZWrite = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_vtxFormatNoTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, false, true,
|
boo::Primitive::TriStrips, boo::ZTest::None, true,
|
||||||
true, false, boo::CullMode::None);
|
true, false, boo::CullMode::None);
|
||||||
m_noTexZTestNoZWrite = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_vtxFormatNoTex,
|
m_noTexZTestNoZWrite = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_vtxFormatNoTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, true, false,
|
boo::Primitive::TriStrips, boo::ZTest::LEqual, false,
|
||||||
true, false, boo::CullMode::None);
|
true, false, boo::CullMode::None);
|
||||||
m_noTexNoZTestNoZWrite = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_vtxFormatNoTex,
|
m_noTexNoZTestNoZWrite = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_vtxFormatNoTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, false, false,
|
boo::Primitive::TriStrips, boo::ZTest::None, false,
|
||||||
true, false, boo::CullMode::None);
|
true, false, boo::CullMode::None);
|
||||||
|
|
||||||
m_noTexAdditiveZTest = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_vtxFormatNoTex,
|
m_noTexAdditiveZTest = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_vtxFormatNoTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||||
boo::Primitive::TriStrips, true, false,
|
boo::Primitive::TriStrips, boo::ZTest::LEqual, false,
|
||||||
true, false, boo::CullMode::None);
|
true, false, boo::CullMode::None);
|
||||||
m_noTexAdditiveNoZTest = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_vtxFormatNoTex,
|
m_noTexAdditiveNoZTest = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_vtxFormatNoTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||||
boo::Primitive::TriStrips, false, false,
|
boo::Primitive::TriStrips, boo::ZTest::None, false,
|
||||||
true, false, boo::CullMode::None);
|
true, false, boo::CullMode::None);
|
||||||
|
|
||||||
return new struct VulkanElementDataBindingFactory;
|
return new struct VulkanElementDataBindingFactory;
|
||||||
|
|
|
@ -219,11 +219,13 @@ struct D3DElementDataBindingFactory : CElementGenShaders::IDataBindingFactory
|
||||||
if (regPipeline)
|
if (regPipeline)
|
||||||
gen.m_normalDataBind = ctx.newShaderDataBinding(regPipeline, nullptr, nullptr,
|
gen.m_normalDataBind = ctx.newShaderDataBinding(regPipeline, nullptr, nullptr,
|
||||||
gen.m_instBuf, nullptr, 1, uniforms,
|
gen.m_instBuf, nullptr, 1, uniforms,
|
||||||
nullptr, texCount, textures);
|
nullptr, texCount, textures,
|
||||||
|
nullptr, nullptr);
|
||||||
if (redToAlphaPipeline)
|
if (redToAlphaPipeline)
|
||||||
gen.m_redToAlphaDataBind = ctx.newShaderDataBinding(redToAlphaPipeline, nullptr, nullptr,
|
gen.m_redToAlphaDataBind = ctx.newShaderDataBinding(redToAlphaPipeline, nullptr, nullptr,
|
||||||
gen.m_instBuf, nullptr, 1, uniforms,
|
gen.m_instBuf, nullptr, 1, uniforms,
|
||||||
nullptr, texCount, textures);
|
nullptr, texCount, textures,
|
||||||
|
nullptr, nullptr);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -271,89 +273,109 @@ CElementGenShaders::IDataBindingFactory* CElementGenShaders::Initialize(boo::ID3
|
||||||
m_texZTestZWrite = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
|
m_texZTestZWrite = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
|
||||||
nullptr, m_vtxFormatTex,
|
nullptr, m_vtxFormatTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, true, true, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::LEqual, true,
|
||||||
|
true, false, boo::CullMode::None);
|
||||||
m_texNoZTestZWrite = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
|
m_texNoZTestZWrite = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
|
||||||
nullptr, m_vtxFormatTex,
|
nullptr, m_vtxFormatTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, false, true, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::None, true,
|
||||||
|
true, false, boo::CullMode::None);
|
||||||
m_texZTestNoZWrite = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
|
m_texZTestNoZWrite = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
|
||||||
nullptr, m_vtxFormatTex,
|
nullptr, m_vtxFormatTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, true, false, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::LEqual, false,
|
||||||
|
true, false, boo::CullMode::None);
|
||||||
m_texNoZTestNoZWrite = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
|
m_texNoZTestNoZWrite = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
|
||||||
nullptr, m_vtxFormatTex,
|
nullptr, m_vtxFormatTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::None, false,
|
||||||
|
true, false, boo::CullMode::None);
|
||||||
|
|
||||||
m_texAdditiveZTest = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
|
m_texAdditiveZTest = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
|
||||||
nullptr, m_vtxFormatTex,
|
nullptr, m_vtxFormatTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||||
boo::Primitive::TriStrips, true, false, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::LEqual, false,
|
||||||
|
true, false, boo::CullMode::None);
|
||||||
m_texAdditiveNoZTest = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
|
m_texAdditiveNoZTest = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
|
||||||
nullptr, m_vtxFormatTex,
|
nullptr, m_vtxFormatTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::None, false,
|
||||||
|
true, false, boo::CullMode::None);
|
||||||
|
|
||||||
m_texRedToAlphaZTest = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX_REDTOALPHA, nullptr, nullptr,
|
m_texRedToAlphaZTest = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX_REDTOALPHA, nullptr, nullptr,
|
||||||
nullptr, m_vtxFormatTex,
|
nullptr, m_vtxFormatTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, true, false, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::LEqual, false,
|
||||||
|
true, false, boo::CullMode::None);
|
||||||
m_texRedToAlphaNoZTest = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX_REDTOALPHA, nullptr, nullptr,
|
m_texRedToAlphaNoZTest = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX_REDTOALPHA, nullptr, nullptr,
|
||||||
nullptr, m_vtxFormatTex,
|
nullptr, m_vtxFormatTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::None, false,
|
||||||
|
true, false, boo::CullMode::None);
|
||||||
|
|
||||||
m_indTexZWrite = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_INDTEX, nullptr, nullptr,
|
m_indTexZWrite = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_INDTEX, nullptr, nullptr,
|
||||||
nullptr, m_vtxFormatIndTex,
|
nullptr, m_vtxFormatIndTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, false, true, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::None, true,
|
||||||
|
true, false, boo::CullMode::None);
|
||||||
m_indTexNoZWrite = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_INDTEX, nullptr, nullptr,
|
m_indTexNoZWrite = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_INDTEX, nullptr, nullptr,
|
||||||
nullptr, m_vtxFormatIndTex,
|
nullptr, m_vtxFormatIndTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::None, false,
|
||||||
|
true, false, boo::CullMode::None);
|
||||||
m_indTexAdditive = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_INDTEX, nullptr, nullptr,
|
m_indTexAdditive = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_INDTEX, nullptr, nullptr,
|
||||||
nullptr, m_vtxFormatIndTex,
|
nullptr, m_vtxFormatIndTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||||
boo::Primitive::TriStrips, false, true, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::None, true,
|
||||||
|
true, false, boo::CullMode::None);
|
||||||
|
|
||||||
m_cindTexZWrite = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_CINDTEX, nullptr, nullptr,
|
m_cindTexZWrite = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_CINDTEX, nullptr, nullptr,
|
||||||
nullptr, m_vtxFormatIndTex,
|
nullptr, m_vtxFormatIndTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, false, true, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::None, true,
|
||||||
|
true, false, boo::CullMode::None);
|
||||||
m_cindTexNoZWrite = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_CINDTEX, nullptr, nullptr,
|
m_cindTexNoZWrite = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_CINDTEX, nullptr, nullptr,
|
||||||
nullptr, m_vtxFormatIndTex,
|
nullptr, m_vtxFormatIndTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::None, false,
|
||||||
|
true, false, boo::CullMode::None);
|
||||||
m_cindTexAdditive = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_CINDTEX, nullptr, nullptr,
|
m_cindTexAdditive = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_CINDTEX, nullptr, nullptr,
|
||||||
nullptr, m_vtxFormatIndTex,
|
nullptr, m_vtxFormatIndTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||||
boo::Primitive::TriStrips, false, true, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::None, true,
|
||||||
|
true, false, boo::CullMode::None);
|
||||||
|
|
||||||
m_noTexZTestZWrite = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
|
m_noTexZTestZWrite = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
|
||||||
nullptr, m_vtxFormatNoTex,
|
nullptr, m_vtxFormatNoTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, true, true, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::LEqual, true,
|
||||||
|
true, false, boo::CullMode::None);
|
||||||
m_noTexNoZTestZWrite = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
|
m_noTexNoZTestZWrite = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
|
||||||
nullptr, m_vtxFormatNoTex,
|
nullptr, m_vtxFormatNoTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, false, true, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::None, true,
|
||||||
|
true, false, boo::CullMode::None);
|
||||||
m_noTexZTestNoZWrite = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
|
m_noTexZTestNoZWrite = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
|
||||||
nullptr, m_vtxFormatNoTex,
|
nullptr, m_vtxFormatNoTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, true, false, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::LEqual, false,
|
||||||
|
true, false, boo::CullMode::None);
|
||||||
m_noTexNoZTestNoZWrite = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
|
m_noTexNoZTestNoZWrite = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
|
||||||
nullptr, m_vtxFormatNoTex,
|
nullptr, m_vtxFormatNoTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::None, false,
|
||||||
|
true, false, boo::CullMode::None);
|
||||||
|
|
||||||
m_noTexAdditiveZTest = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
|
m_noTexAdditiveZTest = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
|
||||||
nullptr, m_vtxFormatNoTex,
|
nullptr, m_vtxFormatNoTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||||
boo::Primitive::TriStrips, true, false, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::LEqual, true,
|
||||||
|
true, false, boo::CullMode::None);
|
||||||
m_noTexAdditiveNoZTest = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
|
m_noTexAdditiveNoZTest = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
|
||||||
nullptr, m_vtxFormatNoTex,
|
nullptr, m_vtxFormatNoTex,
|
||||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
boo::Primitive::TriStrips, boo::ZTest::None, true,
|
||||||
|
true, false, boo::CullMode::None);
|
||||||
|
|
||||||
return new struct D3DElementDataBindingFactory;
|
return new struct D3DElementDataBindingFactory;
|
||||||
}
|
}
|
||||||
|
|
2
hecl
2
hecl
|
@ -1 +1 @@
|
||||||
Subproject commit 04330e966a6b393971c13902dff31b50a1228a71
|
Subproject commit 8e1bc5d94e83949e13fcb4c83071f8b195d9e23b
|
2
specter
2
specter
|
@ -1 +1 @@
|
||||||
Subproject commit 21a4040bd296b1999c2c1b75c3b82d500611a95a
|
Subproject commit 6b909b404061c98df1fd8320bcffe2ccb13c9bcb
|
Loading…
Reference in New Issue