mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 19:53:48 +00:00
Merge branch 'CustomShaderFeaturesPR' of https://github.com/Areloch/Torque3D into alpha40Macwork
# Conflicts: # Engine/source/materials/materialDefinition.cpp # Engine/source/materials/processedFFMaterial.h # Engine/source/materials/processedShaderMaterial.cpp # Engine/source/renderInstance/renderBinManager.cpp # Engine/source/renderInstance/renderGlowMgr.cpp # Engine/source/renderInstance/renderMeshMgr.cpp # Engine/source/renderInstance/renderPassManager.h # Engine/source/renderInstance/renderTranslucentMgr.cpp # Engine/source/shaderGen/customShaderFeature.cpp # Engine/source/shaderGen/customShaderFeature.h
This commit is contained in:
commit
afa52850c3
12 changed files with 110 additions and 72 deletions
|
|
@ -31,8 +31,12 @@
|
|||
#include "core/memVolume.h"
|
||||
#include "core/module.h"
|
||||
|
||||
#ifdef TORQUE_D3D11
|
||||
#include "shaderGen/HLSL/customFeatureHLSL.h"
|
||||
#endif
|
||||
#ifdef TORQUE_OPENGL
|
||||
#include "shaderGen/GLSL/customFeatureGLSL.h"
|
||||
#endif
|
||||
|
||||
MODULE_BEGIN( ShaderGen )
|
||||
|
||||
|
|
@ -291,6 +295,7 @@ void ShaderGen::_processVertFeatures( Vector<GFXShaderMacro> ¯os, bool macro
|
|||
{
|
||||
for (U32 i = 0; i < mCustomFeaturesData.size(); ++i)
|
||||
{
|
||||
#ifdef TORQUE_D3D11
|
||||
if (GFX->getAdapterType() == GFXAdapterType::Direct3D11)
|
||||
{
|
||||
mCustomFeaturesData[i]->mFeatureHLSL->processVert(mComponents, mFeatureData);
|
||||
|
|
@ -304,7 +309,9 @@ void ShaderGen::_processVertFeatures( Vector<GFXShaderMacro> ¯os, bool macro
|
|||
mCustomFeaturesData[i]->mFeatureHLSL->reset();
|
||||
mOutput->addStatement(new GenOp(" \r\n"));
|
||||
}
|
||||
else if (GFX->getAdapterType() == GFXAdapterType::OpenGL)
|
||||
#endif
|
||||
#ifdef TORQUE_OPENGL
|
||||
if (GFX->getAdapterType() == GFXAdapterType::OpenGL)
|
||||
{
|
||||
mCustomFeaturesData[i]->mFeatureGLSL->processVert(mComponents, mFeatureData);
|
||||
|
||||
|
|
@ -317,6 +324,7 @@ void ShaderGen::_processVertFeatures( Vector<GFXShaderMacro> ¯os, bool macro
|
|||
mCustomFeaturesData[i]->mFeatureGLSL->reset();
|
||||
mOutput->addStatement(new GenOp(" \r\n"));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -365,6 +373,7 @@ void ShaderGen::_processPixFeatures( Vector<GFXShaderMacro> ¯os, bool macros
|
|||
{
|
||||
for (U32 i = 0; i < mCustomFeaturesData.size(); ++i)
|
||||
{
|
||||
#ifdef TORQUE_D3D11
|
||||
if (GFX->getAdapterType() == GFXAdapterType::Direct3D11)
|
||||
{
|
||||
mCustomFeaturesData[i]->mFeatureHLSL->processPix(mComponents, mFeatureData);
|
||||
|
|
@ -378,7 +387,9 @@ void ShaderGen::_processPixFeatures( Vector<GFXShaderMacro> ¯os, bool macros
|
|||
mCustomFeaturesData[i]->mFeatureHLSL->reset();
|
||||
mOutput->addStatement(new GenOp(" \r\n"));
|
||||
}
|
||||
else if (GFX->getAdapterType() == GFXAdapterType::OpenGL)
|
||||
#endif
|
||||
#ifdef TORQUE_OPENGL
|
||||
if (GFX->getAdapterType() == GFXAdapterType::OpenGL)
|
||||
{
|
||||
mCustomFeaturesData[i]->mFeatureGLSL->processPix(mComponents, mFeatureData);
|
||||
|
||||
|
|
@ -391,6 +402,7 @@ void ShaderGen::_processPixFeatures( Vector<GFXShaderMacro> ¯os, bool macros
|
|||
mCustomFeaturesData[i]->mFeatureGLSL->reset();
|
||||
mOutput->addStatement(new GenOp(" \r\n"));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue