mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 21:07:42 +00:00
More CAutoMapper fixes
This commit is contained in:
@@ -113,7 +113,7 @@ struct OGLLineDataBindingFactory : CLineRendererShaders::IDataBindingFactory
|
||||
{vbufInfo.first.get(), nullptr, boo::VertexSemantic::Color},
|
||||
{vbufInfo.first.get(), nullptr, boo::VertexSemantic::UV4}
|
||||
};
|
||||
vtxFmt = ctx.newVertexFormat(3, TexFmtTex);
|
||||
vtxFmt = ctx.newVertexFormat(3, TexFmtTex, vbufInfo.second);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -123,7 +123,7 @@ struct OGLLineDataBindingFactory : CLineRendererShaders::IDataBindingFactory
|
||||
{vbufInfo.first.get(), nullptr, boo::VertexSemantic::Position4},
|
||||
{vbufInfo.first.get(), nullptr, boo::VertexSemantic::Color}
|
||||
};
|
||||
vtxFmt = ctx.newVertexFormat(2, TexFmtNoTex);
|
||||
vtxFmt = ctx.newVertexFormat(2, TexFmtNoTex, vbufInfo.second);
|
||||
}
|
||||
|
||||
boo::ObjToken<boo::IGraphicsBuffer> uniforms[] = {ubufInfo.first.get()};
|
||||
@@ -221,7 +221,7 @@ 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, boo::ZTest::None,
|
||||
true, true, false, boo::CullMode::None);
|
||||
false, true, false, boo::CullMode::None);
|
||||
m_texAdditive = ctx.newShaderPipeline(VS_GLSL_TEX, FS_GLSL_TEX, m_texVtxFmt,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
boo::Primitive::TriStrips, boo::ZTest::None,
|
||||
@@ -229,7 +229,7 @@ CLineRendererShaders::IDataBindingFactory* CLineRendererShaders::Initialize(boo:
|
||||
m_noTexAlpha = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_noTexVtxFmt,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, boo::ZTest::None,
|
||||
true, true, false, boo::CullMode::None);
|
||||
false, true, false, boo::CullMode::None);
|
||||
m_noTexAdditive = ctx.newShaderPipeline(VS_GLSL_NOTEX, FS_GLSL_NOTEX, m_noTexVtxFmt,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
boo::Primitive::TriStrips, boo::ZTest::None,
|
||||
|
||||
@@ -144,7 +144,7 @@ CLineRendererShaders::IDataBindingFactory* CLineRendererShaders::Initialize(boo:
|
||||
nullptr, m_texVtxFmt,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, boo::ZTest::None,
|
||||
true, true, false, boo::CullMode::None);
|
||||
false, true, false, boo::CullMode::None);
|
||||
m_texAdditive = ctx.newShaderPipeline(VS_HLSL_TEX, FS_HLSL_TEX, nullptr, nullptr,
|
||||
nullptr, m_texVtxFmt,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
@@ -154,7 +154,7 @@ CLineRendererShaders::IDataBindingFactory* CLineRendererShaders::Initialize(boo:
|
||||
nullptr, m_noTexVtxFmt,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, boo::ZTest::None,
|
||||
true, true, false, boo::CullMode::None);
|
||||
false, true, false, boo::CullMode::None);
|
||||
m_noTexAdditive = ctx.newShaderPipeline(VS_HLSL_NOTEX, FS_HLSL_NOTEX, nullptr, nullptr,
|
||||
nullptr, m_noTexVtxFmt,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
|
||||
@@ -159,19 +159,23 @@ CLineRendererShaders::IDataBindingFactory* CLineRendererShaders::Initialize(boo:
|
||||
m_texAlpha = ctx.newShaderPipeline(VS_METAL_TEX, FS_METAL_TEX, nullptr, nullptr, m_texVtxFmt,
|
||||
CGraphics::g_ViewportSamples,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, boo::ZTest::None, true, true, true, boo::CullMode::None);
|
||||
boo::Primitive::TriStrips, boo::ZTest::None,
|
||||
false, true, false, boo::CullMode::None);
|
||||
m_texAdditive = ctx.newShaderPipeline(VS_METAL_TEX, FS_METAL_TEX, nullptr, nullptr, m_texVtxFmt,
|
||||
CGraphics::g_ViewportSamples,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
boo::Primitive::TriStrips, boo::ZTest::None, false, true, true, boo::CullMode::None);
|
||||
boo::Primitive::TriStrips, boo::ZTest::None,
|
||||
false, true, false, boo::CullMode::None);
|
||||
m_noTexAlpha = ctx.newShaderPipeline(VS_METAL_NOTEX, FS_METAL_NOTEX, nullptr, nullptr, m_noTexVtxFmt,
|
||||
CGraphics::g_ViewportSamples,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::InvSrcAlpha,
|
||||
boo::Primitive::TriStrips, boo::ZTest::None, true, true, true, boo::CullMode::None);
|
||||
boo::Primitive::TriStrips, boo::ZTest::None,
|
||||
false, true, false, boo::CullMode::None);
|
||||
m_noTexAdditive = ctx.newShaderPipeline(VS_METAL_NOTEX, FS_METAL_NOTEX, nullptr, nullptr, m_noTexVtxFmt,
|
||||
CGraphics::g_ViewportSamples,
|
||||
boo::BlendFactor::SrcAlpha, boo::BlendFactor::One,
|
||||
boo::Primitive::TriStrips, boo::ZTest::None, false, true, true, boo::CullMode::None);
|
||||
boo::Primitive::TriStrips, boo::ZTest::None,
|
||||
false, true, false, boo::CullMode::None);
|
||||
|
||||
return new struct MetalLineDataBindingFactory;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ static const char* TextFS =
|
||||
"};\n"
|
||||
"\n"
|
||||
"Texture2DArray tex : register(t0);\n"
|
||||
"SamplerState samp : register(s0);\n"
|
||||
"SamplerState samp : register(s2);\n"
|
||||
"\n"
|
||||
"float4 main(in VertToFrag vtf) : SV_Target0\n"
|
||||
"{\n"
|
||||
@@ -100,7 +100,7 @@ static const char* ImgFS =
|
||||
"};\n"
|
||||
"\n"
|
||||
"Texture2D tex : register(t0);\n"
|
||||
"SamplerState samp : register(s0);\n"
|
||||
"SamplerState samp : register(s2);\n"
|
||||
"\n"
|
||||
"float4 main(in VertToFrag vtf) : SV_Target0\n"
|
||||
"{\n"
|
||||
|
||||
@@ -50,7 +50,7 @@ static const char* TextVS =
|
||||
static const char* TextFS =
|
||||
"#include <metal_stdlib>\n"
|
||||
"using namespace metal;\n"
|
||||
"constexpr sampler samp(address::repeat, filter::linear);\n"
|
||||
"constexpr sampler samp(address::clamp_to_edge, filter::linear);\n"
|
||||
"struct VertToFrag\n"
|
||||
"{\n"
|
||||
" float4 pos [[ position ]];\n"
|
||||
@@ -105,7 +105,7 @@ static const char* ImgVS =
|
||||
static const char* ImgFS =
|
||||
"#include <metal_stdlib>\n"
|
||||
"using namespace metal;\n"
|
||||
"constexpr sampler samp(address::repeat, filter::linear);\n"
|
||||
"constexpr sampler samp(address::clamp_to_edge, filter::linear);\n"
|
||||
"struct VertToFrag\n"
|
||||
"{\n"
|
||||
" float4 pos [[ position ]];\n"
|
||||
|
||||
Reference in New Issue
Block a user