mirror of https://github.com/AxioDL/metaforce.git
Frontface culling support boo sync
This commit is contained in:
parent
55867616c8
commit
ce723d5505
|
@ -298,7 +298,7 @@ void CModelData::RenderThermal(const zeus::CTransform& xf,
|
|||
CGraphics::SetModelMatrix(xf * zeus::CTransform::Scale(x0_scale));
|
||||
CGraphics::DisableAllLights();
|
||||
CModelFlags drawFlags;
|
||||
drawFlags.m_extendedShaderIdx = 3;
|
||||
drawFlags.m_extendedShader = EExtendedShader::ForcedAlpha;
|
||||
|
||||
if (x10_animData)
|
||||
{
|
||||
|
|
|
@ -220,7 +220,7 @@ void CBooRenderer::ActivateLightsForModel(CAreaListItem* item, CBooModel& model)
|
|||
void CBooRenderer::RenderBucketItems(CAreaListItem* item)
|
||||
{
|
||||
CModelFlags flags;
|
||||
flags.m_extendedShaderIdx = 1;
|
||||
flags.m_extendedShader = EExtendedShader::Lighting;
|
||||
|
||||
for (u16 idx : Buckets::sBucketIndex)
|
||||
{
|
||||
|
@ -264,7 +264,7 @@ void CBooRenderer::HandleUnsortedModel(CAreaListItem* item, CBooModel& model)
|
|||
ActivateLightsForModel(item, model);
|
||||
CBooSurface* surf = model.x38_firstUnsortedSurface;
|
||||
CModelFlags flags;
|
||||
flags.m_extendedShaderIdx = 1;
|
||||
flags.m_extendedShader = EExtendedShader::Lighting;
|
||||
while (surf)
|
||||
{
|
||||
model.DrawSurface(*surf, flags);
|
||||
|
@ -333,7 +333,7 @@ void CBooRenderer::RenderFogVolumeModel(const zeus::CAABox& aabb, const CModel*
|
|||
else
|
||||
{
|
||||
CModelFlags flags;
|
||||
flags.m_extendedShaderIdx = 5;
|
||||
flags.m_extendedShader = EExtendedShader::SolidColor;
|
||||
if (sModel)
|
||||
{
|
||||
sModel->Draw(flags);
|
||||
|
@ -858,7 +858,7 @@ void CBooRenderer::DrawSpaceWarp(const zeus::CVector3f& pt, float strength)
|
|||
void CBooRenderer::DrawThermalModel(const CModel& model, const zeus::CColor& mulCol, const zeus::CColor& addCol)
|
||||
{
|
||||
CModelFlags flags;
|
||||
flags.m_extendedShaderIdx = 2;
|
||||
flags.m_extendedShader = EExtendedShader::Thermal;
|
||||
flags.color = mulCol;
|
||||
flags.addColor = addCol;
|
||||
model.UpdateLastFrame();
|
||||
|
@ -868,7 +868,7 @@ void CBooRenderer::DrawThermalModel(const CModel& model, const zeus::CColor& mul
|
|||
void CBooRenderer::DrawXRayOutline(const zeus::CAABox& aabb)
|
||||
{
|
||||
CModelFlags flags;
|
||||
flags.m_extendedShaderIdx = 3;
|
||||
flags.m_extendedShader = EExtendedShader::ForcedAlpha;
|
||||
|
||||
for (CAreaListItem& item : x1c_areaListItems)
|
||||
{
|
||||
|
@ -1040,7 +1040,7 @@ int CBooRenderer::DrawOverlappingWorldModelIDs(int alphaVal, const std::vector<u
|
|||
const zeus::CAABox& aabb) const
|
||||
{
|
||||
CModelFlags flags;
|
||||
flags.m_extendedShaderIdx = 5; // Do solid color draw
|
||||
flags.m_extendedShader = EExtendedShader::SolidColor; // Do solid color draw
|
||||
|
||||
u32 curWord = 0;
|
||||
for (const CAreaListItem& item : x1c_areaListItems)
|
||||
|
@ -1083,7 +1083,7 @@ void CBooRenderer::DrawOverlappingWorldModelShadows(int alphaVal, const std::vec
|
|||
{
|
||||
CModelFlags flags;
|
||||
flags.color.a = alpha;
|
||||
flags.m_extendedShaderIdx = 6; // Do shadow draw
|
||||
flags.m_extendedShader = EExtendedShader::MorphBallShadow; // Do shadow draw
|
||||
|
||||
u32 curWord = 0;
|
||||
for (const CAreaListItem& item : x1c_areaListItems)
|
||||
|
|
|
@ -25,7 +25,7 @@ struct CModelFlags
|
|||
{
|
||||
u8 m_blendMode = 0; /* Blend state 3/5 enable additive */
|
||||
u8 m_matSetIdx = 0;
|
||||
u8 m_extendedShaderIdx = 0; /* 0 for shadeless, 1 for lighting, others defined in CModelShaders */
|
||||
EExtendedShader m_extendedShader = EExtendedShader::Flat;
|
||||
u16 m_flags = 0; /* Flags */
|
||||
zeus::CColor color; /* Set into kcolor slot specified by material */
|
||||
zeus::CColor addColor = zeus::CColor::skClear;
|
||||
|
|
|
@ -400,8 +400,8 @@ void CBooModel::DrawSurface(const CBooSurface& surf, const CModelFlags& flags) c
|
|||
|
||||
const std::vector<boo::IShaderDataBinding*>& extendeds = inst.m_shaderDataBindings[surf.selfIdx];
|
||||
boo::IShaderDataBinding* binding = extendeds[0];
|
||||
if (flags.m_extendedShaderIdx < extendeds.size())
|
||||
binding = extendeds[flags.m_extendedShaderIdx];
|
||||
if (flags.m_extendedShader < extendeds.size())
|
||||
binding = extendeds[flags.m_extendedShader];
|
||||
|
||||
CGraphics::SetShaderDataBinding(binding);
|
||||
CGraphics::DrawArrayIndexed(surf.m_data.idxStart, surf.m_data.idxCount);
|
||||
|
@ -521,7 +521,7 @@ void CBooModel::UVAnimationBuffer::Update(u8*& bufOut, const MaterialSet* matSet
|
|||
u8* start = bufOut;
|
||||
|
||||
/* Special matrices for MorphBall shadow rendering */
|
||||
if (flags.m_extendedShaderIdx == 6)
|
||||
if (flags.m_extendedShader == EExtendedShader::MorphBallShadow)
|
||||
{
|
||||
zeus::CMatrix4f texMtx =
|
||||
(zeus::CTransform::Scale(1.f / (flags.mbShadowBox.max.x - flags.mbShadowBox.min.x),
|
||||
|
@ -545,7 +545,7 @@ void CBooModel::UVAnimationBuffer::Update(u8*& bufOut, const MaterialSet* matSet
|
|||
|
||||
/* Special Mode0 matrix for exclusive Thermal Visor use */
|
||||
std::experimental::optional<std::array<zeus::CMatrix4f, 2>> thermalMtxOut;
|
||||
if (flags.m_extendedShaderIdx == 2)
|
||||
if (flags.m_extendedShader == EExtendedShader::Thermal)
|
||||
{
|
||||
thermalMtxOut.emplace();
|
||||
|
||||
|
@ -675,18 +675,18 @@ void CBooModel::UpdateUniformData(const CModelFlags& flags,
|
|||
|
||||
UVAnimationBuffer::Update(dataCur, x4_matSet, flags);
|
||||
|
||||
if (flags.m_extendedShaderIdx == 2) /* Thermal Model (same as UV Mode 0) */
|
||||
if (flags.m_extendedShader == EExtendedShader::Thermal) /* Thermal Model (same as UV Mode 0) */
|
||||
{
|
||||
CModelShaders::ThermalUniform& thermalOut = *reinterpret_cast<CModelShaders::ThermalUniform*>(dataCur);
|
||||
thermalOut.mulColor = flags.color;
|
||||
thermalOut.addColor = flags.addColor;
|
||||
}
|
||||
else if (flags.m_extendedShaderIdx == 5) /* Solid color render */
|
||||
else if (flags.m_extendedShader == EExtendedShader::SolidColor) /* Solid color render */
|
||||
{
|
||||
CModelShaders::SolidUniform& solidOut = *reinterpret_cast<CModelShaders::SolidUniform*>(dataCur);
|
||||
solidOut.solidColor = flags.color;
|
||||
}
|
||||
else if (flags.m_extendedShaderIdx == 6) /* MorphBall shadow render */
|
||||
else if (flags.m_extendedShader == EExtendedShader::MorphBallShadow) /* MorphBall shadow render */
|
||||
{
|
||||
CModelShaders::MBShadowUniform& shadowOut = *reinterpret_cast<CModelShaders::MBShadowUniform*>(dataCur);
|
||||
shadowOut.shadowUp = CGraphics::g_GXModelView * zeus::CVector3f::skUp;
|
||||
|
|
|
@ -217,7 +217,7 @@ void CMoviePlayer::Initialize()
|
|||
YUVShaderPipeline = static_cast<boo::GLDataFactory::Context&>(ctx).newShaderPipeline
|
||||
(VS_GLSL_YUV, FS_GLSL_YUV, 3, TexNames, 1, BlockNames,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
||||
break;
|
||||
#if _WIN32
|
||||
case boo::IGraphicsDataFactory::Platform::D3D11:
|
||||
|
@ -225,7 +225,7 @@ void CMoviePlayer::Initialize()
|
|||
YUVShaderPipeline = static_cast<boo::ID3DDataFactory::Context&>(ctx).newShaderPipeline
|
||||
(VS_HLSL_YUV, FS_HLSL_YUV, nullptr, nullptr, nullptr, YUVVTXFmt,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
||||
break;
|
||||
#endif
|
||||
#if BOO_HAS_METAL
|
||||
|
@ -233,7 +233,7 @@ void CMoviePlayer::Initialize()
|
|||
YUVShaderPipeline = static_cast<boo::MetalDataFactory::Context&>(ctx).newShaderPipeline
|
||||
(VS_METAL_YUV, FS_METAL_YUV, YUVVTXFmt, 1,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
||||
break;
|
||||
#endif
|
||||
#if BOO_HAS_VULKAN
|
||||
|
@ -241,7 +241,7 @@ void CMoviePlayer::Initialize()
|
|||
YUVShaderPipeline = static_cast<boo::VulkanDataFactory::Context&>(ctx).newShaderPipeline
|
||||
(VS_GLSL_YUV, FS_GLSL_YUV, YUVVTXFmt,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
||||
break;
|
||||
#endif
|
||||
default: break;
|
||||
|
|
|
@ -126,7 +126,8 @@ TShader<CCameraBlurFilter>::IDataBindingFactory* CCameraBlurFilter::Initialize(b
|
|||
const char* texNames[] = {"sceneTex"};
|
||||
const char* uniNames[] = {"CameraBlurUniform"};
|
||||
s_Pipeline = ctx.newShaderPipeline(VS, FS, 1, texNames, 1, uniNames, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
return new CCameraBlurFilterGLDataBindingFactory;
|
||||
}
|
||||
|
||||
|
@ -140,7 +141,8 @@ TShader<CCameraBlurFilter>::IDataBindingFactory* CCameraBlurFilter::Initialize(b
|
|||
};
|
||||
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
||||
s_Pipeline = ctx.newShaderPipeline(VS, FS, s_VtxFmt, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
return new CCameraBlurFilterVulkanDataBindingFactory;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -116,7 +116,8 @@ TShader<CCameraBlurFilter>::IDataBindingFactory* CCameraBlurFilter::Initialize(b
|
|||
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
||||
s_Pipeline = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, nullptr,
|
||||
s_VtxFmt, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
return new CCameraBlurFilterD3DDataBindingFactory;
|
||||
}
|
||||
|
||||
|
|
|
@ -107,11 +107,14 @@ CColoredQuadFilter::Initialize(boo::GLDataFactory::Context& ctx)
|
|||
{
|
||||
const char* uniNames[] = {"ColoredQuadUniform"};
|
||||
s_AlphaPipeline = ctx.newShaderPipeline(VS, FS, 0, nullptr, 1, uniNames, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
s_AddPipeline = ctx.newShaderPipeline(VS, FS, 0, nullptr, 1, uniNames, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
s_MultPipeline = ctx.newShaderPipeline(VS, FS, 0, nullptr, 1, uniNames, boo::BlendFactor::SrcColor,
|
||||
boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
return new CColoredQuadFilterGLDataBindingFactory;
|
||||
}
|
||||
|
||||
|
@ -125,11 +128,14 @@ CColoredQuadFilter::Initialize(boo::VulkanDataFactory::Context& ctx)
|
|||
};
|
||||
s_VtxFmt = ctx.newVertexFormat(1, VtxVmt);
|
||||
s_AlphaPipeline = ctx.newShaderPipeline(VS, FS, s_VtxFmt, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
s_AddPipeline = ctx.newShaderPipeline(VS, FS, s_VtxFmt, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
s_MultPipeline = ctx.newShaderPipeline(VS, FS, s_VtxFmt, boo::BlendFactor::SrcColor,
|
||||
boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
return new CColoredQuadFilterVulkanDataBindingFactory;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -90,13 +90,16 @@ CColoredQuadFilter::Initialize(boo::ID3DDataFactory::Context& ctx)
|
|||
s_VtxFmt = ctx.newVertexFormat(1, VtxVmt);
|
||||
s_AlphaPipeline = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, nullptr,
|
||||
s_VtxFmt, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
s_AddPipeline = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, nullptr,
|
||||
s_VtxFmt, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
s_MultPipeline = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, nullptr,
|
||||
s_VtxFmt, boo::BlendFactor::SrcColor,
|
||||
boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
return new CColoredQuadFilterD3DDataBindingFactory;
|
||||
}
|
||||
|
||||
|
|
|
@ -131,16 +131,16 @@ CLineRendererShaders::IDataBindingFactory* CLineRendererShaders::Initialize(boo:
|
|||
|
||||
m_texAlpha = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, 1, TexNames, 1, UniNames,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, true, false);
|
||||
boo::Primitive::TriStrips, false, true, boo::CullMode::None);
|
||||
m_texAdditive = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, 1, TexNames, 1, UniNames,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
||||
m_noTexAlpha = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, 1, nullptr, 1, UniNames,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, true, false);
|
||||
boo::Primitive::TriStrips, false, true, boo::CullMode::None);
|
||||
m_noTexAdditive = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, 1, nullptr, 1, UniNames,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
||||
|
||||
return new struct OGLLineDataBindingFactory;
|
||||
}
|
||||
|
@ -187,16 +187,16 @@ CLineRendererShaders::IDataBindingFactory* CLineRendererShaders::Initialize(boo:
|
|||
|
||||
m_texAlpha = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_texVtxFmt,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, true, false);
|
||||
boo::Primitive::TriStrips, false, true, boo::CullMode::None);
|
||||
m_texAdditive = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_texVtxFmt,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
||||
m_noTexAlpha = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_noTexVtxFmt,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, true, false);
|
||||
boo::Primitive::TriStrips, false, true, boo::CullMode::None);
|
||||
m_noTexAdditive = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_noTexVtxFmt,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
||||
|
||||
return new struct VulkanLineDataBindingFactory;
|
||||
}
|
||||
|
|
|
@ -128,19 +128,19 @@ CLineRendererShaders::IDataBindingFactory* CLineRendererShaders::Initialize(boo:
|
|||
m_texAlpha = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
|
||||
nullptr, m_texVtxFmt,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips,false, true, false);
|
||||
boo::Primitive::TriStrips,false, true, boo::CullMode::None);
|
||||
m_texAdditive = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
|
||||
nullptr, m_texVtxFmt,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
boo::Primitive::TriStrips,false, false, false);
|
||||
boo::Primitive::TriStrips,false, false, boo::CullMode::None);
|
||||
m_noTexAlpha = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
|
||||
nullptr, m_noTexVtxFmt,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, true, false);
|
||||
boo::Primitive::TriStrips, false, true, boo::CullMode::None);
|
||||
m_noTexAdditive = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
|
||||
nullptr, m_noTexVtxFmt,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
||||
|
||||
return new struct HLSLLineDataBindingFactory;
|
||||
}
|
||||
|
|
|
@ -12,6 +12,17 @@
|
|||
namespace urde
|
||||
{
|
||||
|
||||
enum EExtendedShader : uint8_t
|
||||
{
|
||||
Flat,
|
||||
Lighting,
|
||||
Thermal,
|
||||
ForcedAlpha,
|
||||
ForcedAdditive,
|
||||
SolidColor,
|
||||
MorphBallShadow
|
||||
};
|
||||
|
||||
class CModelShaders
|
||||
{
|
||||
friend class CModel;
|
||||
|
|
|
@ -99,7 +99,8 @@ TShader<CSpaceWarpFilter>::IDataBindingFactory* CSpaceWarpFilter::Initialize(boo
|
|||
const char* texNames[] = {"sceneTex", "indTex"};
|
||||
const char* uniNames[] = {"SpaceWarpUniform"};
|
||||
s_Pipeline = ctx.newShaderPipeline(VS, FS, 2, texNames, 1, uniNames, boo::BlendFactor::One,
|
||||
boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
return new CSpaceWarpFilterGLDataBindingFactory;
|
||||
}
|
||||
|
||||
|
@ -113,7 +114,8 @@ TShader<CSpaceWarpFilter>::IDataBindingFactory* CSpaceWarpFilter::Initialize(boo
|
|||
};
|
||||
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
||||
s_Pipeline = ctx.newShaderPipeline(VS, FS, s_VtxFmt, boo::BlendFactor::One,
|
||||
boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
return new CSpaceWarpFilterVulkanDataBindingFactory;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -83,7 +83,8 @@ TShader<CSpaceWarpFilter>::IDataBindingFactory* CSpaceWarpFilter::Initialize(boo
|
|||
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
||||
s_Pipeline = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, nullptr,
|
||||
s_VtxFmt, boo::BlendFactor::One,
|
||||
boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
return new CSpaceWarpFilterD3DDataBindingFactory;
|
||||
}
|
||||
|
||||
|
|
|
@ -111,14 +111,18 @@ CTextSupportShader::Initialize(boo::GLDataFactory::Context& ctx)
|
|||
const char* uniNames[] = {"TextSupportUniform"};
|
||||
|
||||
s_TextAlphaPipeline = ctx.newShaderPipeline(TextVS, TextFS, 1, texNames, 1, uniNames, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, true, false, false);
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, true, false,
|
||||
boo::CullMode::None);
|
||||
s_TextAddPipeline = ctx.newShaderPipeline(TextVS, TextFS, 1, texNames, 1, uniNames, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, true, false, false);
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, true, false,
|
||||
boo::CullMode::None);
|
||||
|
||||
s_ImageAlphaPipeline = ctx.newShaderPipeline(ImgVS, ImgFS, 1, texNames, 1, uniNames, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, true, false, false);
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, true, false,
|
||||
boo::CullMode::None);
|
||||
s_ImageAddPipeline = ctx.newShaderPipeline(ImgVS, ImgFS, 1, texNames, 1, uniNames, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, true, false, false);
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, true, false,
|
||||
boo::CullMode::None);
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -143,9 +147,11 @@ CTextSupportShader::Initialize(boo::VulkanDataFactory::Context& ctx)
|
|||
};
|
||||
s_TextVtxFmt = ctx.newVertexFormat(11, TextVtxVmt);
|
||||
s_TextAlphaPipeline = ctx.newShaderPipeline(TextVS, TextFS, s_TextVtxFmt, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, true, false, false);
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, true, false,
|
||||
boo::CullMode::None);
|
||||
s_TextAddPipeline = ctx.newShaderPipeline(TextVS, TextFS, s_TextVtxFmt, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, true, false, false);
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, true, false,
|
||||
boo::CullMode::None);
|
||||
|
||||
boo::VertexElementDescriptor ImageVtxVmt[] =
|
||||
{
|
||||
|
@ -161,9 +167,11 @@ CTextSupportShader::Initialize(boo::VulkanDataFactory::Context& ctx)
|
|||
};
|
||||
s_ImageVtxFmt = ctx.newVertexFormat(9, ImageVtxVmt);
|
||||
s_ImageAlphaPipeline = ctx.newShaderPipeline(ImgVS, ImgFS, s_ImageVtxFmt, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, true, false, false);
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, true, false,
|
||||
boo::CullMode::None);
|
||||
s_ImageAddPipeline = ctx.newShaderPipeline(ImgVS, ImgFS, s_ImageVtxFmt, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, true, false, false);
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, true, false,
|
||||
boo::CullMode::None);
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -128,10 +128,12 @@ CTextSupportShader::Initialize(boo::ID3DDataFactory::Context& ctx)
|
|||
s_TextVtxFmt = ctx.newVertexFormat(11, TextVtxVmt);
|
||||
s_TextAlphaPipeline = ctx.newShaderPipeline(TextVS, TextFS, nullptr, nullptr, nullptr,
|
||||
s_TextVtxFmt, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, true, false, false);
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, true, false,
|
||||
boo::CullMode::None);
|
||||
s_TextAddPipeline = ctx.newShaderPipeline(TextVS, TextFS, nullptr, nullptr, nullptr,
|
||||
s_TextVtxFmt, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, true, false, false);
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, true, false,
|
||||
boo::CullMode::None);
|
||||
|
||||
boo::VertexElementDescriptor ImageVtxVmt[] =
|
||||
{
|
||||
|
@ -148,10 +150,12 @@ CTextSupportShader::Initialize(boo::ID3DDataFactory::Context& ctx)
|
|||
s_ImageVtxFmt = ctx.newVertexFormat(9, ImageVtxVmt);
|
||||
s_ImageAlphaPipeline = ctx.newShaderPipeline(ImgVS, ImgFS, nullptr, nullptr, nullptr,
|
||||
s_ImageVtxFmt, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, true, false, false);
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, true, false,
|
||||
boo::CullMode::None);
|
||||
s_ImageAddPipeline = ctx.newShaderPipeline(ImgVS, ImgFS, nullptr, nullptr, nullptr,
|
||||
s_ImageVtxFmt, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, true, false, false);
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, true, false,
|
||||
boo::CullMode::None);
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -183,11 +183,14 @@ CTexturedQuadFilter::Initialize(boo::GLDataFactory::Context& ctx)
|
|||
const char* texNames[] = {"tex"};
|
||||
const char* uniNames[] = {"TexuredQuadUniform"};
|
||||
s_AlphaPipeline = ctx.newShaderPipeline(VSNoFlip, FS, 1, texNames, 1, uniNames, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
s_AddPipeline = ctx.newShaderPipeline(VSNoFlip, FS, 1, texNames, 1, uniNames, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
s_MultPipeline = ctx.newShaderPipeline(VSNoFlip, FS, 1, texNames, 1, uniNames, boo::BlendFactor::SrcColor,
|
||||
boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
return new CTexturedQuadFilterGLDataBindingFactory;
|
||||
}
|
||||
|
||||
|
@ -202,11 +205,14 @@ CTexturedQuadFilter::Initialize(boo::VulkanDataFactory::Context& ctx)
|
|||
};
|
||||
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
||||
s_AlphaPipeline = ctx.newShaderPipeline(VSNoFlip, FS, s_VtxFmt, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
s_AddPipeline = ctx.newShaderPipeline(VSNoFlip, FS, s_VtxFmt, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
s_MultPipeline = ctx.newShaderPipeline(VSNoFlip, FS, s_VtxFmt, boo::BlendFactor::SrcColor,
|
||||
boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
return new CTexturedQuadFilterVulkanDataBindingFactory;
|
||||
}
|
||||
#endif
|
||||
|
@ -259,11 +265,14 @@ CTexturedQuadFilterAlpha::Initialize(boo::GLDataFactory::Context& ctx)
|
|||
const char* texNames[] = {"tex"};
|
||||
const char* uniNames[] = {"TexuredQuadUniform"};
|
||||
s_AAlphaPipeline = ctx.newShaderPipeline(VSFlip, FSAlpha, 1, texNames, 1, uniNames, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
s_AAddPipeline = ctx.newShaderPipeline(VSFlip, FSAlpha, 1, texNames, 1, uniNames, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
s_AMultPipeline = ctx.newShaderPipeline(VSFlip, FSAlpha, 1, texNames, 1, uniNames, boo::BlendFactor::SrcColor,
|
||||
boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
return new CTexturedQuadFilterAlphaGLDataBindingFactory;
|
||||
}
|
||||
|
||||
|
@ -278,11 +287,14 @@ CTexturedQuadFilterAlpha::Initialize(boo::VulkanDataFactory::Context& ctx)
|
|||
};
|
||||
s_AVtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
||||
s_AAlphaPipeline = ctx.newShaderPipeline(VSFlip, FSAlpha, s_AVtxFmt, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
s_AAddPipeline = ctx.newShaderPipeline(VSFlip, FSAlpha, s_AVtxFmt, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
s_AMultPipeline = ctx.newShaderPipeline(VSFlip, FSAlpha, s_AVtxFmt, boo::BlendFactor::SrcColor,
|
||||
boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
return new CTexturedQuadFilterAlphaVulkanDataBindingFactory;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -145,13 +145,16 @@ CTexturedQuadFilter::Initialize(boo::ID3DDataFactory::Context& ctx)
|
|||
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
||||
s_AlphaPipeline = ctx.newShaderPipeline(VSNoFlip, FS, nullptr, nullptr, nullptr,
|
||||
s_VtxFmt, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
s_AddPipeline = ctx.newShaderPipeline(VSNoFlip, FS, nullptr, nullptr, nullptr,
|
||||
s_VtxFmt, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
s_MultPipeline = ctx.newShaderPipeline(VSNoFlip, FS, nullptr, nullptr, nullptr,
|
||||
s_VtxFmt, boo::BlendFactor::SrcColor,
|
||||
boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
return new CTexturedQuadFilterD3DDataBindingFactory;
|
||||
}
|
||||
|
||||
|
@ -202,13 +205,16 @@ CTexturedQuadFilterAlpha::Initialize(boo::ID3DDataFactory::Context& ctx)
|
|||
s_AVtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
||||
s_AAlphaPipeline = ctx.newShaderPipeline(VSFlip, FSAlpha, nullptr, nullptr, nullptr,
|
||||
s_AVtxFmt, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::InvSrcAlpha, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
s_AAddPipeline = ctx.newShaderPipeline(VSFlip, FSAlpha, nullptr, nullptr, nullptr,
|
||||
s_AVtxFmt, boo::BlendFactor::SrcAlpha,
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::One, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
s_AMultPipeline = ctx.newShaderPipeline(VSFlip, FSAlpha, nullptr, nullptr, nullptr,
|
||||
s_AVtxFmt, boo::BlendFactor::SrcColor,
|
||||
boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::DstColor, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
return new CTexturedQuadFilterAlphaD3DDataBindingFactory;
|
||||
}
|
||||
|
||||
|
|
|
@ -121,7 +121,8 @@ TShader<CThermalColdFilter>::IDataBindingFactory* CThermalColdFilter::Initialize
|
|||
const char* texNames[] = {"sceneTex", "shiftTex"};
|
||||
const char* uniNames[] = {"ThermalColdUniform"};
|
||||
s_Pipeline = ctx.newShaderPipeline(VS, FS, 2, texNames, 1, uniNames, boo::BlendFactor::One,
|
||||
boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
return new CThermalColdFilterGLDataBindingFactory;
|
||||
}
|
||||
|
||||
|
@ -135,7 +136,8 @@ TShader<CThermalColdFilter>::IDataBindingFactory* CThermalColdFilter::Initialize
|
|||
};
|
||||
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
||||
s_Pipeline = ctx.newShaderPipeline(VS, FS, s_VtxFmt, boo::BlendFactor::One,
|
||||
boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
return new CThermalColdFilterVulkanDataBindingFactory;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -105,7 +105,8 @@ TShader<CThermalColdFilter>::IDataBindingFactory* CThermalColdFilter::Initialize
|
|||
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
||||
s_Pipeline = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, nullptr,
|
||||
s_VtxFmt, boo::BlendFactor::One,
|
||||
boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
return new CThermalColdFilterD3DDataBindingFactory;
|
||||
}
|
||||
|
||||
|
|
|
@ -98,7 +98,8 @@ TShader<CThermalHotFilter>::IDataBindingFactory* CThermalHotFilter::Initialize(b
|
|||
const char* texNames[] = {"sceneTex", "paletteTex"};
|
||||
const char* uniNames[] = {"ThermalHotUniform"};
|
||||
s_Pipeline = ctx.newShaderPipeline(VS, FS, 2, texNames, 1, uniNames, boo::BlendFactor::DstAlpha,
|
||||
boo::BlendFactor::InvDstAlpha, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::InvDstAlpha, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
return new CThermalHotFilterGLDataBindingFactory;
|
||||
}
|
||||
|
||||
|
@ -112,7 +113,8 @@ TShader<CThermalHotFilter>::IDataBindingFactory* CThermalHotFilter::Initialize(b
|
|||
};
|
||||
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
||||
s_Pipeline = ctx.newShaderPipeline(VS, FS, s_VtxFmt, boo::BlendFactor::DstAlpha,
|
||||
boo::BlendFactor::InvDstAlpha, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::InvDstAlpha, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
return new CThermalHotFilterVulkanDataBindingFactory;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -82,7 +82,7 @@ TShader<CThermalHotFilter>::IDataBindingFactory* CThermalHotFilter::Initialize(b
|
|||
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
||||
s_Pipeline = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, nullptr,
|
||||
s_VtxFmt, boo::BlendFactor::DstAlpha, boo::BlendFactor::InvDstAlpha,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
||||
return new CThermalHotFilterD3DDataBindingFactory;
|
||||
}
|
||||
|
||||
|
|
|
@ -110,7 +110,8 @@ TShader<CXRayBlurFilter>::IDataBindingFactory* CXRayBlurFilter::Initialize(boo::
|
|||
const char* texNames[] = {"sceneTex", "paletteTex"};
|
||||
const char* uniNames[] = {"XRayBlurUniform"};
|
||||
s_Pipeline = ctx.newShaderPipeline(VS, FS, 2, texNames, 1, uniNames, boo::BlendFactor::One,
|
||||
boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
return new CXRayBlurFilterGLDataBindingFactory;
|
||||
}
|
||||
|
||||
|
@ -124,7 +125,8 @@ TShader<CXRayBlurFilter>::IDataBindingFactory* CXRayBlurFilter::Initialize(boo::
|
|||
};
|
||||
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
||||
s_Pipeline = ctx.newShaderPipeline(VS, FS, s_VtxFmt, boo::BlendFactor::One,
|
||||
boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
return new CXRayBlurFilterVulkanDataBindingFactory;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -97,7 +97,8 @@ TShader<CXRayBlurFilter>::IDataBindingFactory* CXRayBlurFilter::Initialize(boo::
|
|||
s_VtxFmt = ctx.newVertexFormat(2, VtxVmt);
|
||||
s_Pipeline = ctx.newShaderPipeline(VS, FS, nullptr, nullptr, nullptr,
|
||||
s_VtxFmt, boo::BlendFactor::One,
|
||||
boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false, false);
|
||||
boo::BlendFactor::Zero, boo::Primitive::TriStrips, false, false,
|
||||
boo::CullMode::None);
|
||||
return new CXRayBlurFilterD3DDataBindingFactory;
|
||||
}
|
||||
|
||||
|
|
|
@ -65,42 +65,42 @@ void CGuiModel::Draw(const CGuiWidgetDrawParms& parms) const
|
|||
case EGuiModelDrawFlags::Shadeless:
|
||||
{
|
||||
CModelFlags flags(0, 0, 3, zeus::CColor::skWhite);
|
||||
flags.m_extendedShaderIdx = 0;
|
||||
flags.m_extendedShader = EExtendedShader::Flat;
|
||||
model->Draw(flags);
|
||||
break;
|
||||
}
|
||||
case EGuiModelDrawFlags::Opaque:
|
||||
{
|
||||
CModelFlags flags(1, 0, 3, moduCol);
|
||||
flags.m_extendedShaderIdx = 1;
|
||||
flags.m_extendedShader = EExtendedShader::Lighting;
|
||||
model->Draw(flags);
|
||||
break;
|
||||
}
|
||||
case EGuiModelDrawFlags::Alpha:
|
||||
{
|
||||
CModelFlags flags(4, 0, (u32(xb7_24_depthWrite) << 1) | u32(xb6_31_depthTest), moduCol);
|
||||
flags.m_extendedShaderIdx = 3;
|
||||
flags.m_extendedShader = EExtendedShader::ForcedAlpha;
|
||||
model->Draw(flags);
|
||||
break;
|
||||
}
|
||||
case EGuiModelDrawFlags::Additive:
|
||||
{
|
||||
CModelFlags flags(3, 0, (u32(xb7_24_depthWrite) << 1) | u32(xb6_31_depthTest), moduCol);
|
||||
flags.m_extendedShaderIdx = 4;
|
||||
flags.m_extendedShader = EExtendedShader::ForcedAdditive;
|
||||
model->Draw(flags);
|
||||
break;
|
||||
}
|
||||
case EGuiModelDrawFlags::AlphaAdditiveOverdraw:
|
||||
{
|
||||
CModelFlags flags(4, 0, xb6_31_depthTest, moduCol);
|
||||
flags.m_extendedShaderIdx = 3;
|
||||
flags.m_extendedShader = EExtendedShader::ForcedAlpha;
|
||||
model->Draw(flags);
|
||||
|
||||
flags.m_blendMode = 5;
|
||||
flags.m_matSetIdx = 0;
|
||||
flags.m_flags = (u32(xb7_24_depthWrite) << 1) | u32(xb6_31_depthTest);
|
||||
flags.color = moduCol;
|
||||
flags.m_extendedShaderIdx = 4;
|
||||
flags.m_extendedShader = EExtendedShader::ForcedAdditive;
|
||||
model->Draw(flags);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -281,70 +281,70 @@ CElementGenShaders::IDataBindingFactory* CElementGenShaders::Initialize(boo::GLD
|
|||
{
|
||||
m_texZTestZWrite = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, 1, TexNames, 1, UniNames,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, true, true, false);
|
||||
boo::Primitive::TriStrips, true, true, boo::CullMode::None);
|
||||
m_texNoZTestZWrite = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, 1, TexNames, 1, UniNames,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, true, false);
|
||||
boo::Primitive::TriStrips, false, true, boo::CullMode::None);
|
||||
m_texZTestNoZWrite = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, 1, TexNames, 1, UniNames,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, true, false, false);
|
||||
boo::Primitive::TriStrips, true, false, boo::CullMode::None);
|
||||
m_texNoZTestNoZWrite = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, 1, TexNames, 1, UniNames,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
||||
|
||||
m_texAdditiveZTest = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, 1, TexNames, 1, UniNames,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
boo::Primitive::TriStrips, true, false, false);
|
||||
boo::Primitive::TriStrips, true, false, boo::CullMode::None);
|
||||
m_texAdditiveNoZTest = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, 1, TexNames, 1, UniNames,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
||||
|
||||
m_texRedToAlphaZTest = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX_REDTOALPHA, 1, TexNames, 1, UniNames,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, true, false, false);
|
||||
boo::Primitive::TriStrips, true, false, boo::CullMode::None);
|
||||
m_texRedToAlphaNoZTest = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX_REDTOALPHA, 1, TexNames, 1, UniNames,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
||||
|
||||
m_indTexZWrite = ctx.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_INDTEX, 3, TindTexNames, 1, UniNames,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, true, false);
|
||||
boo::Primitive::TriStrips, false, true, boo::CullMode::None);
|
||||
m_indTexNoZWrite = ctx.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_INDTEX, 3, TindTexNames, 1, UniNames,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
||||
m_indTexAdditive = ctx.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_INDTEX, 3, TindTexNames, 1, UniNames,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
boo::Primitive::TriStrips, false, true, false);
|
||||
boo::Primitive::TriStrips, false, true, boo::CullMode::None);
|
||||
|
||||
m_cindTexZWrite = ctx.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_CINDTEX, 3, TindTexNames, 1, UniNames,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, true, false);
|
||||
boo::Primitive::TriStrips, false, true, boo::CullMode::None);
|
||||
m_cindTexNoZWrite = ctx.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_CINDTEX, 3, TindTexNames, 1, UniNames,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
||||
m_cindTexAdditive = ctx.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_CINDTEX, 3, TindTexNames, 1, UniNames,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
boo::Primitive::TriStrips, false, true, false);
|
||||
boo::Primitive::TriStrips, false, true, boo::CullMode::None);
|
||||
|
||||
m_noTexZTestZWrite = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, 0, nullptr, 1, UniNames,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, true, true, false);
|
||||
boo::Primitive::TriStrips, true, true, boo::CullMode::None);
|
||||
m_noTexNoZTestZWrite = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, 0, nullptr, 1, UniNames,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, true, false);
|
||||
boo::Primitive::TriStrips, false, true, boo::CullMode::None);
|
||||
m_noTexZTestNoZWrite = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, 0, nullptr, 1, UniNames,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, true, false, false);
|
||||
boo::Primitive::TriStrips, true, false, boo::CullMode::None);
|
||||
m_noTexNoZTestNoZWrite = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, 0, nullptr, 1, UniNames,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
||||
|
||||
m_noTexAdditiveZTest = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, 0, nullptr, 1, UniNames,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
boo::Primitive::TriStrips, true, false, false);
|
||||
boo::Primitive::TriStrips, true, false, boo::CullMode::None);
|
||||
m_noTexAdditiveNoZTest = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, 0, nullptr, 1, UniNames,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
||||
|
||||
return new struct OGLElementDataBindingFactory;
|
||||
}
|
||||
|
@ -435,70 +435,70 @@ CElementGenShaders::IDataBindingFactory* CElementGenShaders::Initialize(boo::Vul
|
|||
|
||||
m_texZTestZWrite = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_vtxFormatTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, true, true, false);
|
||||
boo::Primitive::TriStrips, true, true, boo::CullMode::None);
|
||||
m_texNoZTestZWrite = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_vtxFormatTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, true, false);
|
||||
boo::Primitive::TriStrips, false, true, boo::CullMode::None);
|
||||
m_texZTestNoZWrite = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_vtxFormatTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, true, false, false);
|
||||
boo::Primitive::TriStrips, true, false, boo::CullMode::None);
|
||||
m_texNoZTestNoZWrite = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_vtxFormatTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
||||
|
||||
m_texAdditiveZTest = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_vtxFormatTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
boo::Primitive::TriStrips, true, false, false);
|
||||
boo::Primitive::TriStrips, true, false, boo::CullMode::None);
|
||||
m_texAdditiveNoZTest = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_vtxFormatTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
||||
|
||||
m_texRedToAlphaZTest = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX_REDTOALPHA, m_vtxFormatTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, true, false, false);
|
||||
boo::Primitive::TriStrips, true, false, boo::CullMode::None);
|
||||
m_texRedToAlphaNoZTest = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX_REDTOALPHA, m_vtxFormatTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
||||
|
||||
m_indTexZWrite = ctx.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_INDTEX, m_vtxFormatIndTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, true, true, false);
|
||||
boo::Primitive::TriStrips, true, true, boo::CullMode::None);
|
||||
m_indTexNoZWrite = ctx.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_INDTEX, m_vtxFormatIndTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, true, false, false);
|
||||
boo::Primitive::TriStrips, true, false, boo::CullMode::None);
|
||||
m_indTexAdditive = ctx.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_INDTEX, m_vtxFormatIndTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
boo::Primitive::TriStrips, true, true, false);
|
||||
boo::Primitive::TriStrips, true, true, boo::CullMode::None);
|
||||
|
||||
m_cindTexZWrite = ctx.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_CINDTEX, m_vtxFormatIndTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, true, true, false);
|
||||
boo::Primitive::TriStrips, true, true, boo::CullMode::None);
|
||||
m_cindTexNoZWrite = ctx.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_CINDTEX, m_vtxFormatIndTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, true, false, false);
|
||||
boo::Primitive::TriStrips, true, false, boo::CullMode::None);
|
||||
m_cindTexAdditive = ctx.newShaderPipeline(VS_GLSL_INDTEX, FS_GLSL_CINDTEX, m_vtxFormatIndTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
boo::Primitive::TriStrips, true, true, false);
|
||||
boo::Primitive::TriStrips, true, true, boo::CullMode::None);
|
||||
|
||||
m_noTexZTestZWrite = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_vtxFormatNoTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, true, true, false);
|
||||
boo::Primitive::TriStrips, true, true, boo::CullMode::None);
|
||||
m_noTexNoZTestZWrite = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_vtxFormatNoTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, true, false);
|
||||
boo::Primitive::TriStrips, false, true, boo::CullMode::None);
|
||||
m_noTexZTestNoZWrite = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_vtxFormatNoTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, true, false, false);
|
||||
boo::Primitive::TriStrips, true, false, boo::CullMode::None);
|
||||
m_noTexNoZTestNoZWrite = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_vtxFormatNoTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
||||
|
||||
m_noTexAdditiveZTest = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_vtxFormatNoTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
boo::Primitive::TriStrips, true, false, false);
|
||||
boo::Primitive::TriStrips, true, false, boo::CullMode::None);
|
||||
m_noTexAdditiveNoZTest = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_vtxFormatNoTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
||||
|
||||
return new struct VulkanElementDataBindingFactory;
|
||||
}
|
||||
|
|
|
@ -271,89 +271,89 @@ CElementGenShaders::IDataBindingFactory* CElementGenShaders::Initialize(boo::ID3
|
|||
m_texZTestZWrite = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
|
||||
nullptr, m_vtxFormatTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, true, true, false);
|
||||
boo::Primitive::TriStrips, true, true, boo::CullMode::None);
|
||||
m_texNoZTestZWrite = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
|
||||
nullptr, m_vtxFormatTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, true, false);
|
||||
boo::Primitive::TriStrips, false, true, boo::CullMode::None);
|
||||
m_texZTestNoZWrite = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
|
||||
nullptr, m_vtxFormatTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, true, false, false);
|
||||
boo::Primitive::TriStrips, true, false, boo::CullMode::None);
|
||||
m_texNoZTestNoZWrite = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
|
||||
nullptr, m_vtxFormatTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
||||
|
||||
m_texAdditiveZTest = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
|
||||
nullptr, m_vtxFormatTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
boo::Primitive::TriStrips, true, false, false);
|
||||
boo::Primitive::TriStrips, true, false, boo::CullMode::None);
|
||||
m_texAdditiveNoZTest = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
|
||||
nullptr, m_vtxFormatTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
||||
|
||||
m_texRedToAlphaZTest = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX_REDTOALPHA, nullptr, nullptr,
|
||||
nullptr, m_vtxFormatTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, true, false, false);
|
||||
boo::Primitive::TriStrips, true, false, boo::CullMode::None);
|
||||
m_texRedToAlphaNoZTest = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX_REDTOALPHA, nullptr, nullptr,
|
||||
nullptr, m_vtxFormatTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
||||
|
||||
m_indTexZWrite = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_INDTEX, nullptr, nullptr,
|
||||
nullptr, m_vtxFormatIndTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, true, false);
|
||||
boo::Primitive::TriStrips, false, true, boo::CullMode::None);
|
||||
m_indTexNoZWrite = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_INDTEX, nullptr, nullptr,
|
||||
nullptr, m_vtxFormatIndTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
||||
m_indTexAdditive = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_INDTEX, nullptr, nullptr,
|
||||
nullptr, m_vtxFormatIndTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
boo::Primitive::TriStrips, false, true, false);
|
||||
boo::Primitive::TriStrips, false, true, boo::CullMode::None);
|
||||
|
||||
m_cindTexZWrite = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_CINDTEX, nullptr, nullptr,
|
||||
nullptr, m_vtxFormatIndTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, true, false);
|
||||
boo::Primitive::TriStrips, false, true, boo::CullMode::None);
|
||||
m_cindTexNoZWrite = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_CINDTEX, nullptr, nullptr,
|
||||
nullptr, m_vtxFormatIndTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
||||
m_cindTexAdditive = ctx.newShaderPipeline(VS_HLSL_INDTEX, FS_HLSL_CINDTEX, nullptr, nullptr,
|
||||
nullptr, m_vtxFormatIndTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
boo::Primitive::TriStrips, false, true, false);
|
||||
boo::Primitive::TriStrips, false, true, boo::CullMode::None);
|
||||
|
||||
m_noTexZTestZWrite = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
|
||||
nullptr, m_vtxFormatNoTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, true, true, false);
|
||||
boo::Primitive::TriStrips, true, true, boo::CullMode::None);
|
||||
m_noTexNoZTestZWrite = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
|
||||
nullptr, m_vtxFormatNoTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, true, false);
|
||||
boo::Primitive::TriStrips, false, true, boo::CullMode::None);
|
||||
m_noTexZTestNoZWrite = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
|
||||
nullptr, m_vtxFormatNoTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, true, false, false);
|
||||
boo::Primitive::TriStrips, true, false, boo::CullMode::None);
|
||||
m_noTexNoZTestNoZWrite = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
|
||||
nullptr, m_vtxFormatNoTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
||||
|
||||
m_noTexAdditiveZTest = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
|
||||
nullptr, m_vtxFormatNoTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
boo::Primitive::TriStrips, true, false, false);
|
||||
boo::Primitive::TriStrips, true, false, boo::CullMode::None);
|
||||
m_noTexAdditiveNoZTest = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
|
||||
nullptr, m_vtxFormatNoTex,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
boo::Primitive::TriStrips, false, false, false);
|
||||
boo::Primitive::TriStrips, false, false, boo::CullMode::None);
|
||||
|
||||
return new struct D3DElementDataBindingFactory;
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ void CMorphBallShadow::RenderIdBuffer(const zeus::CAABox& aabb, const CStateMana
|
|||
CGraphics::SetModelMatrix(modelXf);
|
||||
|
||||
CModelFlags flags(0, 0, 3, zeus::CColor{1.f, 1.f, 1.f, alphaVal / 255.f});
|
||||
flags.m_extendedShaderIdx = 5; // Do solid color draw
|
||||
flags.m_extendedShader = EExtendedShader::SolidColor; // Do solid color draw
|
||||
const CBooModel& model = *modelData->PickStaticModel(CModelData::EWhichModel::Normal);
|
||||
const_cast<CBooModel&>(model).VerifyCurrentShader(flags.m_matSetIdx);
|
||||
model.DrawNormal(flags, nullptr, nullptr);
|
||||
|
@ -129,7 +129,7 @@ void CMorphBallShadow::Render(const CStateManager& mgr, float alpha)
|
|||
|
||||
CModelFlags flags;
|
||||
flags.color.a = alpha;
|
||||
flags.m_extendedShaderIdx = 6;
|
||||
flags.m_extendedShader = EExtendedShader::MorphBallShadow;
|
||||
|
||||
int alphaVal = 4;
|
||||
for (const CActor* actor : x0_actors)
|
||||
|
|
|
@ -197,7 +197,7 @@ void CWorldTransManager::DrawAllModels()
|
|||
lights.BuildFakeLightList(x4_modelData->x1a0_lights, zeus::CColor{0.1f, 0.1f, 0.1f, 1.0f});
|
||||
|
||||
CModelFlags flags = {};
|
||||
flags.m_extendedShaderIdx = 1;
|
||||
flags.m_extendedShader = EExtendedShader::Lighting;
|
||||
|
||||
if (!x4_modelData->x100_bgModelData[0].IsNull())
|
||||
{
|
||||
|
|
2
hecl
2
hecl
|
@ -1 +1 @@
|
|||
Subproject commit c193e52b49ffa43b5cf5fe5d12994f6e273b0166
|
||||
Subproject commit 325a91981f12d5b633c3a47238aa451523831d97
|
2
specter
2
specter
|
@ -1 +1 @@
|
|||
Subproject commit 7ea8e20e0310c4f45da0c0c8396b6f6c00a70b85
|
||||
Subproject commit 3dc1c3bae0cb3f8549ea696db389ee04e1352020
|
Loading…
Reference in New Issue