mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 22:54:34 +00:00
Updates and fixes to probe and lighting logic.
This commit is contained in:
parent
b19a4b22c8
commit
f31445751f
23 changed files with 568 additions and 1466 deletions
|
|
@ -78,7 +78,7 @@ public:
|
|||
DynamicCubemap = 5,
|
||||
};
|
||||
|
||||
private:
|
||||
protected:
|
||||
|
||||
// Networking masks
|
||||
// We need to implement a mask specifically to handle
|
||||
|
|
@ -115,24 +115,24 @@ private:
|
|||
|
||||
//Indirect Lighting Contribution stuff
|
||||
IndrectLightingModeType mIndrectLightingModeType;
|
||||
LinearColorF mAmbientColor;
|
||||
LinearColorF mSphericalHarmonics;
|
||||
|
||||
//Reflection Contribution stuff
|
||||
ReflectionModeType mReflectionModeType;
|
||||
|
||||
F32 mRadius;
|
||||
Point3F mProbePosOffset;
|
||||
bool mEditPosOffset;
|
||||
|
||||
String mCubemapName;
|
||||
CubemapData *mCubemap;
|
||||
CubemapData *mStaticCubemap;
|
||||
GFXCubemapHandle mDynamicCubemap;
|
||||
bool mUseCubemap;
|
||||
|
||||
//irridiance resources
|
||||
GFXCubemapHandle mIrridianceMap;
|
||||
CubemapData *mIrridianceMap;
|
||||
|
||||
//prefilter resources
|
||||
GFXCubemapHandle mPrefilterMap;
|
||||
CubemapData *mPrefilterMap;
|
||||
U32 mPrefilterMipLevels;
|
||||
U32 mPrefilterSize;
|
||||
|
||||
|
|
@ -190,17 +190,12 @@ public:
|
|||
|
||||
static bool _setEnabled(void *object, const char *index, const char *data);
|
||||
static bool _doBake(void *object, const char *index, const char *data);
|
||||
|
||||
static bool protectedSetSHTerms(void *object, const char *index, const char *data);
|
||||
static bool protectedSetSHConsts(void *object, const char *index, const char *data);
|
||||
static bool _toggleEditPosOffset(void *object, const char *index, const char *data);
|
||||
|
||||
// Handle when we are added to the scene and removed from the scene
|
||||
bool onAdd();
|
||||
void onRemove();
|
||||
|
||||
virtual void writeFields(Stream &stream, U32 tabStop);
|
||||
virtual bool writeField(StringTableEntry fieldname, const char *value);
|
||||
|
||||
// Override this so that we can dirty the network flag when it is called
|
||||
void setTransform(const MatrixF &mat);
|
||||
|
||||
|
|
@ -240,29 +235,9 @@ public:
|
|||
|
||||
void setPreviewMatParameters(SceneRenderState* renderState, BaseMatInstance* mat);
|
||||
|
||||
//Spherical Harmonics
|
||||
void calculateSHTerms();
|
||||
F32 texelSolidAngle(F32 aU, F32 aV, U32 width, U32 height);
|
||||
F32 areaElement(F32 x, F32 y);
|
||||
|
||||
//
|
||||
MatrixF getSideMatrix(U32 side);
|
||||
LinearColorF decodeSH(Point3F normal);
|
||||
|
||||
//
|
||||
void calcDirectionVector(U32 face, U32 face_x, U32 face_y, F32& out_x, F32& out_y, F32& out_z) const;
|
||||
F32 calcSolidAngle(U32 face, U32 x, U32 y) const;
|
||||
LinearColorF sampleFace(U32 face, F32 s, F32 t);
|
||||
LinearColorF readTexelClamped(U32 face, U32 x, U32 y);
|
||||
void computeTexCoords(F32 x, F32 y, F32 z, U32& out_face, F32& out_s, F32& out_t);
|
||||
LinearColorF readTexel(U32 face, U32 x, U32 y) const;
|
||||
|
||||
//
|
||||
LinearColorF sampleSide(U32 termindex, U32 sideIndex);
|
||||
F32 harmonics(U32 termId, Point3F normal);
|
||||
|
||||
|
||||
//Baking
|
||||
String getPrefilterMapPath();
|
||||
String getIrradianceMapPath();
|
||||
void bake(String outputPath, S32 resolution);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue