openmw/components/nif/texture.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

69 lines
1.6 KiB
C++
Raw Normal View History

2023-08-31 18:59:33 +03:00
#ifndef OPENMW_COMPONENTS_NIF_TEXTURE_HPP
#define OPENMW_COMPONENTS_NIF_TEXTURE_HPP
2010-01-06 12:28:37 +01:00
#include "base.hpp"
2010-01-06 12:28:37 +01:00
namespace Nif
{
2023-08-31 18:59:33 +03:00
struct NiTexture : public Named
{
};
struct NiSourceTexture : public NiTexture
{
// Is this an external (references a separate texture file) or
// internal (data is inside the nif itself) texture?
bool external;
2022-09-22 21:26:05 +03:00
std::string filename; // In case of external textures
NiPixelDataPtr data; // In case of internal textures
2022-09-22 21:26:05 +03:00
/* Pixel layout
0 - Palettised
1 - High color 16
2 - True color 32
3 - Compressed
4 - Bumpmap
5 - Default */
2020-02-02 17:08:17 +03:00
unsigned int pixel;
2022-09-22 21:26:05 +03:00
/* Mipmap format
0 - no
2022-09-22 21:26:05 +03:00
1 - yes
2 - default */
2020-02-02 17:08:17 +03:00
unsigned int mipmap;
2022-09-22 21:26:05 +03:00
/* Alpha
0 - none
1 - binary
2 - smooth
3 - default (use material alpha, or multiply material with texture if present)
2022-09-22 21:26:05 +03:00
*/
unsigned int alpha;
2022-09-22 21:26:05 +03:00
void read(NIFStream* nif) override;
void post(Reader& nif) override;
};
struct BSShaderTextureSet : public Record
2022-09-22 21:26:05 +03:00
{
enum TextureType
2022-09-22 21:26:05 +03:00
{
TextureType_Base = 0,
TextureType_Normal = 1,
TextureType_Glow = 2,
TextureType_Parallax = 3,
TextureType_Env = 4,
TextureType_EnvMask = 5,
TextureType_Subsurface = 6,
TextureType_BackLighting = 7
2022-09-22 21:26:05 +03:00
};
std::vector<std::string> textures;
2022-09-22 21:26:05 +03:00
void read(NIFStream* nif) override;
};
}
2010-01-06 12:28:37 +01:00
#endif