mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-20 20:05:33 +00:00
correct imageassetarrays having a singular texture profile as oposed to a type per.
while that certainly works for most cases it falls apart when dealing with postfx where it's an unnamed array of variable types of inputs. shifted the profile assignment to #define INIT_IMAGEASSET_ARRAY(name, profile, index) so there's still a really obvious point where you can see the default setting, even if it's not in the more desireable OG definition spot for postfx in particular, given we can swap that, provided an example of how to do just that
This commit is contained in:
parent
a0e0e1f220
commit
e45b959d7d
15 changed files with 66 additions and 48 deletions
|
|
@ -142,18 +142,18 @@ Material::Material()
|
|||
mAccuCoverage[i] = 0.9f;
|
||||
mAccuSpecular[i] = 16.0f;
|
||||
|
||||
INIT_ASSET_ARRAY(DiffuseMap, i);
|
||||
INIT_ASSET_ARRAY(OverlayMap, i);
|
||||
INIT_ASSET_ARRAY(LightMap, i);
|
||||
INIT_ASSET_ARRAY(ToneMap, i);
|
||||
INIT_ASSET_ARRAY(DetailMap, i);
|
||||
INIT_ASSET_ARRAY(NormalMap, i);
|
||||
INIT_ASSET_ARRAY(ORMConfigMap, i);
|
||||
INIT_ASSET_ARRAY(RoughMap, i);
|
||||
INIT_ASSET_ARRAY(AOMap, i);
|
||||
INIT_ASSET_ARRAY(MetalMap, i);
|
||||
INIT_ASSET_ARRAY(GlowMap, i);
|
||||
INIT_ASSET_ARRAY(DetailNormalMap, i);
|
||||
INIT_IMAGEASSET_ARRAY(DiffuseMap, GFXStaticTextureSRGBProfile, i);
|
||||
INIT_IMAGEASSET_ARRAY(OverlayMap, GFXStaticTextureProfile, i);
|
||||
INIT_IMAGEASSET_ARRAY(LightMap, GFXStaticTextureProfile, i);
|
||||
INIT_IMAGEASSET_ARRAY(ToneMap, GFXStaticTextureProfile, i);
|
||||
INIT_IMAGEASSET_ARRAY(DetailMap, GFXStaticTextureProfile, i);
|
||||
INIT_IMAGEASSET_ARRAY(NormalMap, GFXNormalMapProfile, i);
|
||||
INIT_IMAGEASSET_ARRAY(ORMConfigMap, GFXStaticTextureProfile, i);
|
||||
INIT_IMAGEASSET_ARRAY(RoughMap, GFXStaticTextureProfile, i);
|
||||
INIT_IMAGEASSET_ARRAY(AOMap, GFXStaticTextureProfile, i);
|
||||
INIT_IMAGEASSET_ARRAY(MetalMap, GFXStaticTextureProfile, i);
|
||||
INIT_IMAGEASSET_ARRAY(GlowMap, GFXStaticTextureProfile, i);
|
||||
INIT_IMAGEASSET_ARRAY(DetailNormalMap, GFXNormalMapProfile, i);
|
||||
|
||||
mParallaxScale[i] = 0.0f;
|
||||
|
||||
|
|
|
|||
|
|
@ -207,49 +207,49 @@ public:
|
|||
//-----------------------------------------------------------------------
|
||||
// Data
|
||||
//-----------------------------------------------------------------------
|
||||
DECLARE_IMAGEASSET_ARRAY(Material, DiffuseMap, GFXStaticTextureSRGBProfile, MAX_STAGES);
|
||||
DECLARE_IMAGEASSET_ARRAY(Material, DiffuseMap, MAX_STAGES);
|
||||
DECLARE_IMAGEASSET_ARRAY_SETGET(Material, DiffuseMap);
|
||||
|
||||
bool mDiffuseMapSRGB[MAX_STAGES]; // SRGB diffuse
|
||||
DECLARE_IMAGEASSET_ARRAY(Material, OverlayMap, GFXStaticTextureProfile, MAX_STAGES);
|
||||
DECLARE_IMAGEASSET_ARRAY(Material, OverlayMap, MAX_STAGES);
|
||||
DECLARE_IMAGEASSET_ARRAY_SETGET(Material, OverlayMap);
|
||||
|
||||
DECLARE_IMAGEASSET_ARRAY(Material, LightMap, GFXStaticTextureProfile, MAX_STAGES);
|
||||
DECLARE_IMAGEASSET_ARRAY(Material, LightMap, MAX_STAGES);
|
||||
DECLARE_IMAGEASSET_ARRAY_SETGET(Material, LightMap);
|
||||
|
||||
DECLARE_IMAGEASSET_ARRAY(Material, ToneMap, GFXStaticTextureProfile, MAX_STAGES);
|
||||
DECLARE_IMAGEASSET_ARRAY(Material, ToneMap, MAX_STAGES);
|
||||
DECLARE_IMAGEASSET_ARRAY_SETGET(Material, ToneMap);
|
||||
|
||||
DECLARE_IMAGEASSET_ARRAY(Material, DetailMap, GFXStaticTextureProfile, MAX_STAGES);
|
||||
DECLARE_IMAGEASSET_ARRAY(Material, DetailMap, MAX_STAGES);
|
||||
DECLARE_IMAGEASSET_ARRAY_SETGET(Material, DetailMap);
|
||||
|
||||
DECLARE_IMAGEASSET_ARRAY(Material, NormalMap, GFXNormalMapProfile, MAX_STAGES);
|
||||
DECLARE_IMAGEASSET_ARRAY(Material, NormalMap, MAX_STAGES);
|
||||
DECLARE_IMAGEASSET_ARRAY_SETGET(Material, NormalMap);
|
||||
|
||||
DECLARE_IMAGEASSET_ARRAY(Material, ORMConfigMap, GFXStaticTextureProfile, MAX_STAGES);
|
||||
DECLARE_IMAGEASSET_ARRAY(Material, ORMConfigMap, MAX_STAGES);
|
||||
DECLARE_IMAGEASSET_ARRAY_SETGET(Material, ORMConfigMap);
|
||||
|
||||
bool mIsSRGb[MAX_STAGES];
|
||||
DECLARE_IMAGEASSET_ARRAY(Material, RoughMap, GFXStaticTextureProfile, MAX_STAGES);
|
||||
DECLARE_IMAGEASSET_ARRAY(Material, RoughMap, MAX_STAGES);
|
||||
DECLARE_IMAGEASSET_ARRAY_SETGET(Material, RoughMap);
|
||||
|
||||
bool mInvertRoughness[MAX_STAGES];
|
||||
F32 mRoughnessChan[MAX_STAGES];
|
||||
DECLARE_IMAGEASSET_ARRAY(Material, AOMap, GFXStaticTextureProfile, MAX_STAGES);
|
||||
DECLARE_IMAGEASSET_ARRAY(Material, AOMap, MAX_STAGES);
|
||||
DECLARE_IMAGEASSET_ARRAY_SETGET(Material, AOMap);
|
||||
|
||||
F32 mAOChan[MAX_STAGES];
|
||||
DECLARE_IMAGEASSET_ARRAY(Material, MetalMap, GFXStaticTextureProfile, MAX_STAGES);
|
||||
DECLARE_IMAGEASSET_ARRAY(Material, MetalMap, MAX_STAGES);
|
||||
DECLARE_IMAGEASSET_ARRAY_SETGET(Material, MetalMap);
|
||||
|
||||
F32 mMetalChan[MAX_STAGES];
|
||||
DECLARE_IMAGEASSET_ARRAY(Material, GlowMap, GFXStaticTextureProfile, MAX_STAGES);
|
||||
DECLARE_IMAGEASSET_ARRAY(Material, GlowMap, MAX_STAGES);
|
||||
DECLARE_IMAGEASSET_ARRAY_SETGET(Material, GlowMap);
|
||||
|
||||
F32 mGlowMul[MAX_STAGES];
|
||||
/// A second normal map which repeats at the detail map
|
||||
/// scale and blended with the base normal map.
|
||||
DECLARE_IMAGEASSET_ARRAY(Material, DetailNormalMap, GFXNormalMapProfile, MAX_STAGES);
|
||||
DECLARE_IMAGEASSET_ARRAY(Material, DetailNormalMap, MAX_STAGES);
|
||||
DECLARE_IMAGEASSET_ARRAY_SETGET(Material, DetailNormalMap);
|
||||
|
||||
/// The strength scalar for the detail normal map.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue