mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Fix for Issue #124 for CustomMaterial Refraction
This commit is contained in:
parent
aa3a6d52ff
commit
0047842b33
3 changed files with 11 additions and 4 deletions
|
|
@ -39,6 +39,7 @@
|
|||
#include "console/simFieldDictionary.h"
|
||||
#include "console/propertyParsing.h"
|
||||
#include "gfx/util/screenspace.h"
|
||||
#include "scene/reflectionManager.h"
|
||||
|
||||
|
||||
ProcessedCustomMaterial::ProcessedCustomMaterial(Material &mat)
|
||||
|
|
@ -346,7 +347,13 @@ void ProcessedCustomMaterial::setTextureStages( SceneRenderState *state, const S
|
|||
}
|
||||
case Material::BackBuff:
|
||||
{
|
||||
GFX->setTexture( samplerRegister, sgData.backBuffTex );
|
||||
if ( sgData.reflectTex )
|
||||
GFX->setTexture( samplerRegister, sgData.reflectTex );
|
||||
else
|
||||
{
|
||||
GFXTextureObject *refractTex = REFLECTMGR->getRefractTex( true );
|
||||
GFX->setTexture( samplerRegister, refractTex );
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Material::ReflectBuff:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue