2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 05:47:42 +00:00

Add perspective division to texture matrix processing

This commit is contained in:
Jack Andersen
2017-09-30 18:25:49 -10:00
parent 8b952894b1
commit 7c3bac2951
5 changed files with 55 additions and 27 deletions

View File

@@ -98,7 +98,8 @@ struct HECLApplicationCallback : boo::IApplicationCallback
gfxF->commitTransaction([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
{
boo::SWindowRect mainWindowRect = m_mainWindow->getWindowFrame();
renderTex = ctx.newRenderTexture(mainWindowRect.size[0], mainWindowRect.size[1], false, false);
renderTex = ctx.newRenderTexture(mainWindowRect.size[0], mainWindowRect.size[1],
boo::TextureClampMode::Repeat, 0, 0);
/* Generate meta structure (usually statically serialized) */
hecl::HMDLMeta testMeta;
@@ -149,7 +150,7 @@ struct HECLApplicationCallback : boo::IApplicationCallback
tex[i][j][3] = 0xff;
}
boo::ITexture* texture =
ctx.newStaticTexture(256, 256, 1, boo::TextureFormat::RGBA8, tex, 256*256*4);
ctx.newStaticTexture(256, 256, 1, boo::TextureFormat::RGBA8, boo::TextureClampMode::Repeat, tex, 256*256*4);
/* Make vertex uniform buffer */
vubo = ctx.newDynamicBuffer(boo::BufferUse::Uniform, sizeof(VertexUBO), 1);