mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 08:04:40 +00:00
Initial implementation of Custom Shader Features.
This commit is contained in:
parent
f9b7f66571
commit
dc5e502dec
12 changed files with 595 additions and 9 deletions
|
|
@ -47,6 +47,10 @@
|
|||
#include "materials/materialFeatureData.h"
|
||||
#endif
|
||||
|
||||
#ifndef CUSTOMSHADERFEATURE_H
|
||||
#include "shadergen/customShaderFeature.h"
|
||||
#endif
|
||||
|
||||
/// Base class used by shaderGen to be API agnostic. Subclasses implement the various methods
|
||||
/// in an API specific way.
|
||||
class ShaderGenPrinter
|
||||
|
|
@ -151,10 +155,11 @@ public:
|
|||
F32 *pixVersion,
|
||||
const GFXVertexFormat *vertexFormat,
|
||||
const char* cacheName,
|
||||
Vector<GFXShaderMacro> ¯os );
|
||||
Vector<GFXShaderMacro> ¯os,
|
||||
Vector<CustomShaderFeatureData*> &customFeatureData);
|
||||
|
||||
// Returns a shader that implements the features listed by dat.
|
||||
GFXShader* getShader( const MaterialFeatureData &dat, const GFXVertexFormat *vertexFormat, const Vector<GFXShaderMacro> *macros, const Vector<String> &samplers );
|
||||
GFXShader* getShader( const MaterialFeatureData &dat, Vector<CustomShaderFeatureData*> &customFeatureData, const GFXVertexFormat *vertexFormat, const Vector<GFXShaderMacro> *macros, const Vector<String> &samplers );
|
||||
|
||||
// This will delete all of the procedural shaders that we have. Used to regenerate shaders when
|
||||
// the ShaderFeatures have changed (due to lighting system change, or new plugin)
|
||||
|
|
@ -176,6 +181,8 @@ protected:
|
|||
|
||||
Vector< ShaderComponent *> mComponents;
|
||||
|
||||
Vector< CustomShaderFeatureData* > mCustomFeaturesData;
|
||||
|
||||
AutoPtr<ShaderGenPrinter> mPrinter;
|
||||
AutoPtr<ShaderGenComponentFactory> mComponentFactory;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue