mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 06:34:36 +00:00
Implementation of sRGB image support. Overhauls the linearization setup to utilize the sRGB image types, as well as refactors the use of ColorF and ColorI to be properly internally consistent. ColorIs are used only for front-facing/editing/UI settings, and ColorFs, now renamed to LinearColorF to reduce confusion of purpose, are used for color info in the engine itself. This avoids confusing and expensive conversions back and forth between types and avoids botches with linearity. Majority work done by @rextimmy
This commit is contained in:
parent
8780f83262
commit
25686ed4be
294 changed files with 3894 additions and 2813 deletions
|
|
@ -200,6 +200,7 @@ public:
|
|||
// Data
|
||||
//-----------------------------------------------------------------------
|
||||
FileName mDiffuseMapFilename[MAX_STAGES];
|
||||
bool mDiffuseMapSRGB[MAX_STAGES]; // SRGB diffuse
|
||||
bool mAccuEnabled[MAX_STAGES];
|
||||
F32 mAccuScale[MAX_STAGES];
|
||||
F32 mAccuDirection[MAX_STAGES];
|
||||
|
|
@ -224,9 +225,9 @@ public:
|
|||
/// This color is the diffuse color of the material
|
||||
/// or if it has a texture it is multiplied against
|
||||
/// the diffuse texture color.
|
||||
ColorF mDiffuse[MAX_STAGES];
|
||||
LinearColorF mDiffuse[MAX_STAGES];
|
||||
|
||||
ColorF mSpecular[MAX_STAGES];
|
||||
LinearColorF mSpecular[MAX_STAGES];
|
||||
|
||||
F32 mSpecularPower[MAX_STAGES];
|
||||
F32 mSpecularStrength[MAX_STAGES];
|
||||
|
|
@ -242,7 +243,7 @@ public:
|
|||
|
||||
F32 mMinnaertConstant[MAX_STAGES];
|
||||
bool mSubSurface[MAX_STAGES];
|
||||
ColorF mSubSurfaceColor[MAX_STAGES];
|
||||
LinearColorF mSubSurfaceColor[MAX_STAGES];
|
||||
F32 mSubSurfaceRolloff[MAX_STAGES];
|
||||
|
||||
/// The repetition scale of the detail texture
|
||||
|
|
@ -321,7 +322,7 @@ public:
|
|||
bool mShowDust; ///< If true, show dust emitters (footpuffs, hover trails, etc) when on surface with this material. Defaults to false.
|
||||
|
||||
/// Color to use for particle effects and such when located on this material.
|
||||
ColorF mEffectColor[ NUM_EFFECT_COLOR_STAGES ];
|
||||
LinearColorF mEffectColor[ NUM_EFFECT_COLOR_STAGES ];
|
||||
|
||||
/// Footstep sound to play when walking on surface with this material.
|
||||
/// Numeric ID of footstep sound defined on player datablock (0 == soft,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue