2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-20 14:59:12 +00:00

backface culling support

This commit is contained in:
Jack Andersen
2017-03-10 10:38:34 -10:00
parent e698a27d1c
commit 56aacdacde
3 changed files with 15 additions and 13 deletions

View File

@@ -323,7 +323,7 @@ struct HLSLBackendFactory : IShaderBackendFactory
boo::BlendFactor(m_backend.m_blendDst),
tag.getPrimType(),
tag.getDepthTest(), tag.getDepthWrite(),
tag.getBackfaceCulling());
tag.getBackfaceCulling() ? boo::CullMode::Backface : boo::CullMode::None);
if (!objOut)
Log.report(logvisor::Fatal, "unable to build shader");
@@ -416,7 +416,7 @@ struct HLSLBackendFactory : IShaderBackendFactory
tag.newVertexFormat(ctx),
blendSrc, blendDst, tag.getPrimType(),
tag.getDepthTest(), tag.getDepthWrite(),
tag.getBackfaceCulling());
tag.getBackfaceCulling() ? boo::CullMode::Backface : boo::CullMode::None);
if (!ret)
Log.report(logvisor::Fatal, "unable to build shader");
return ret;
@@ -460,7 +460,7 @@ struct HLSLBackendFactory : IShaderBackendFactory
boo::BlendFactor((slot.dstFactor == hecl::Backend::BlendFactor::Original) ? m_backend.m_blendDst : slot.dstFactor),
tag.getPrimType(),
tag.getDepthTest(), tag.getDepthWrite(),
tag.getBackfaceCulling());
tag.getBackfaceCulling() ? boo::CullMode::Backface : boo::CullMode::None);
if (!ret)
Log.report(logvisor::Fatal, "unable to build shader");
if (thisPipeBlobs.vert)
@@ -558,7 +558,7 @@ struct HLSLBackendFactory : IShaderBackendFactory
boo::BlendFactor((slot.dstFactor == hecl::Backend::BlendFactor::Original) ? blendDst : slot.dstFactor),
tag.getPrimType(),
tag.getDepthTest(), tag.getDepthWrite(),
tag.getBackfaceCulling());
tag.getBackfaceCulling() ? boo::CullMode::Backface : boo::CullMode::None);
if (!ret)
Log.report(logvisor::Fatal, "unable to build shader");
returnFunc(ret);