mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-18 06:03:48 +00:00
Shifted to the static-list arrangement for probe instance tracking to help performance as well as drastically streamline the data submission/material instance flow for probe rendering.
This commit is contained in:
parent
4efcb567b0
commit
1966d348e4
22 changed files with 901 additions and 1250 deletions
|
|
@ -477,86 +477,4 @@ struct OccluderRenderInst : public RenderInst
|
|||
void clear();
|
||||
};
|
||||
|
||||
struct ProbeRenderInst : public RenderInst
|
||||
{
|
||||
LinearColorF mAmbient;
|
||||
|
||||
MatrixF mTransform;
|
||||
|
||||
F32 mRadius;
|
||||
F32 mIntensity;
|
||||
|
||||
Box3F mBounds;
|
||||
Point3F mProbePosOffset;
|
||||
|
||||
GFXCubemapHandle *mCubemap;
|
||||
|
||||
GFXCubemapHandle *mIrradianceCubemap;
|
||||
|
||||
GFXTexHandle *mBRDFTexture;
|
||||
|
||||
/// The priority of this light used for
|
||||
/// light and shadow scoring.
|
||||
F32 mPriority;
|
||||
|
||||
/// A temporary which holds the score used
|
||||
/// when prioritizing lights for rendering.
|
||||
F32 mScore;
|
||||
|
||||
bool mIsSkylight;
|
||||
|
||||
/// Whether to render debugging visualizations
|
||||
/// for this light.
|
||||
bool mDebugRender;
|
||||
|
||||
GFXPrimitiveBufferHandle primBuffer;
|
||||
GFXVertexBufferHandle<GFXVertexPC> vertBuffer;
|
||||
U32 numPrims;
|
||||
U32 numVerts;
|
||||
Vector< U32 > numIndicesForPoly;
|
||||
|
||||
ProbeInfo::ProbeShapeType mProbeShapeType;
|
||||
|
||||
//Spherical Harmonics data
|
||||
LinearColorF mSHTerms[9];
|
||||
F32 mSHConstants[5];
|
||||
|
||||
public:
|
||||
|
||||
ProbeRenderInst();
|
||||
~ProbeRenderInst();
|
||||
|
||||
// Copies data passed in from light
|
||||
void set(const ProbeRenderInst *probeInfo);
|
||||
void set(const ProbeInfo *probeInfo);
|
||||
|
||||
// Accessors
|
||||
const MatrixF& getTransform() const { return mTransform; }
|
||||
void setTransform(const MatrixF &xfm) { mTransform = xfm; }
|
||||
|
||||
Point3F getPosition() const { return mTransform.getPosition(); }
|
||||
void setPosition(const Point3F &pos) { mTransform.setPosition(pos); }
|
||||
|
||||
VectorF getDirection() const { return mTransform.getForwardVector(); }
|
||||
void setDirection(const VectorF &val);
|
||||
|
||||
const LinearColorF& getAmbient() const { return mAmbient; }
|
||||
void setAmbient(const LinearColorF &val) { mAmbient = val; }
|
||||
|
||||
void setPriority(F32 priority) { mPriority = priority; }
|
||||
F32 getPriority() const { return mPriority; }
|
||||
|
||||
void setScore(F32 score) { mScore = score; }
|
||||
F32 getScore() const { return mScore; }
|
||||
|
||||
bool isDebugRenderingEnabled() const { return mDebugRender; }
|
||||
void enableDebugRendering(bool value) { mDebugRender = value; }
|
||||
|
||||
// Builds the world to light view projection used for
|
||||
// shadow texture and cookie lookups.
|
||||
void getWorldToLightProj(MatrixF *outMatrix) const;
|
||||
|
||||
void clear();
|
||||
};
|
||||
|
||||
#endif // _RENDERPASSMANAGER_H_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue