You're breathtaking!
This commit is contained in:
27
Source/Engine/Content/Assets/IESProfile.cpp
Normal file
27
Source/Engine/Content/Assets/IESProfile.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
|
||||
|
||||
#include "IESProfile.h"
|
||||
#include "Engine/Content/Factories/BinaryAssetFactory.h"
|
||||
#include "Engine/Content/Upgraders/TextureAssetUpgrader.h"
|
||||
|
||||
REGISTER_BINARY_ASSET(IESProfile, "FlaxEngine.IESProfile", ::New<TextureAssetUpgrader>(), false);
|
||||
|
||||
IESProfile::IESProfile(const SpawnParams& params, const AssetInfo* info)
|
||||
: TextureBase(params, info)
|
||||
, Brightness(0)
|
||||
, TextureMultiplier(1)
|
||||
{
|
||||
}
|
||||
|
||||
bool IESProfile::init(AssetInitData& initData)
|
||||
{
|
||||
// Base
|
||||
if (TextureBase::init(initData))
|
||||
return true;
|
||||
|
||||
// Get settings from texture header mini-storage
|
||||
auto data = (CustomDataLayout*)_texture.GetHeader()->CustomData;
|
||||
Brightness = data->Brightness;
|
||||
TextureMultiplier = data->TextureMultiplier;
|
||||
return false;
|
||||
}
|
||||
Reference in New Issue
Block a user