|
@@ -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:
|