mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 07:04:36 +00:00
cubemap baking fix
the key part of this issue was to invert the order we were baking the faces. Not much of a fix but it works better than before need to get a proper fix implement the way the issue is copying X+ into every other face but isnt doing it in the reverse order means the rtv for face 0 must be being replicated into all other faces.
This commit is contained in:
parent
49c76cc486
commit
f288ffccba
6 changed files with 94 additions and 72 deletions
|
|
@ -190,12 +190,12 @@ void GFXD3D11TextureTarget::attachTexture( RenderSlot slot, GFXCubemap *tex, U32
|
|||
// Mark state as dirty so device can know to update.
|
||||
invalidateState();
|
||||
|
||||
// Release what we had, it's definitely going to change.
|
||||
SAFE_RELEASE(mTargetViews[slot]);
|
||||
SAFE_RELEASE(mTargets[slot]);
|
||||
SAFE_RELEASE(mTargetSRViews[slot]);
|
||||
|
||||
mResolveTargets[slot] = NULL;
|
||||
mGenMips = false;
|
||||
|
||||
// Cast the texture object to D3D...
|
||||
AssertFatal(!tex || static_cast<GFXD3D11Cubemap*>(tex), "GFXD3DTextureTarget::attachTexture - invalid cubemap object.");
|
||||
|
|
@ -214,14 +214,14 @@ void GFXD3D11TextureTarget::attachTexture( RenderSlot slot, GFXCubemap *tex, U32
|
|||
}
|
||||
|
||||
GFXD3D11Cubemap *cube = static_cast<GFXD3D11Cubemap*>(tex);
|
||||
|
||||
// Grab the surface level.
|
||||
mTargets[slot] = cube->get2DTex();
|
||||
mTargets[slot]->AddRef();
|
||||
mTargetViews[slot] = cube->getRTView(face);
|
||||
mTargetViews[slot]->AddRef();
|
||||
mTargetSRViews[slot] = cube->getSRView();
|
||||
mTargetSRViews[slot]->AddRef();
|
||||
|
||||
/*mTargetSRViews[slot] = cube->getSRView();
|
||||
mTargetSRViews[slot]->AddRef();*/
|
||||
|
||||
// Update surface size
|
||||
if(slot == Color0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue