mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
Implement the use of the new vmap3-format by Lynx3d (mad props to you for this, and thanks for the talks earlier) + reduced Vmap size to less than one third, and improve precision + indoor/outdoor check which allows automatic unmounting of players + additional area information from WMOAreaTable.dbc, removed existing "hacks" + WMO liquid information for swimming and fishing correctly in buildings/cities/caves/instances (lava and slime WILL hurt from now on!) - buildfiles for windows are not properly done, and will need to be sorted out NOTE: Do NOT annoy Lynx3d about this, any issues with this "port" is entirely our fault ! THIS REVISION IS CONSIDERED UNSTABLE AND CONTAINS WORK IN PROGRESS - USE AT YOUR OWN RISK! --HG-- branch : trunk
62 lines
1.7 KiB
C++
62 lines
1.7 KiB
C++
/**
|
|
\file BumpMapPreprocess.h
|
|
|
|
\maintainer Morgan McGuire, http://graphics.cs.williams.edu
|
|
|
|
\created 2010-01-28
|
|
\edited 2010-01-28
|
|
|
|
Copyright 2000-2010, Morgan McGuire.
|
|
All rights reserved.
|
|
*/
|
|
|
|
#ifndef G3D_BumpMapPreprocess_h
|
|
#define G3D_BumpMapPreprocess_h
|
|
|
|
#include "G3D/platform.h"
|
|
|
|
namespace G3D {
|
|
class Any;
|
|
|
|
/**
|
|
Not in the BumpMap class to avoid a circular dependency between Texture and BumpMap.
|
|
G3D::GImage::computeNormalMap().
|
|
*/
|
|
class BumpMapPreprocess {
|
|
public:
|
|
|
|
/** If true, the elevations are box filtered after computing normals
|
|
and before uploading, which produces better results for parallax offset mapping
|
|
Defaults to false. */
|
|
bool lowPassFilter;
|
|
|
|
/** Height of the maximum ("white") value, in pixels, for the purpose of computing normals.
|
|
A value of 255 means that a 255 x 255 bump image with a full black-to-white gradient
|
|
will produce a 45-degree ramp (this also results in "cubic" voxels).
|
|
A negative value means to set zExtentPixels to -zExtentPixels * max(width, height).
|
|
The default is -0.02.
|
|
*/
|
|
float zExtentPixels;
|
|
|
|
/** After computing normals, scale the height by |N.z|, a trick that reduces texture swim in steep areas for parallax offset
|
|
mapping. Defaults to false.*/
|
|
bool scaleZByNz;
|
|
|
|
BumpMapPreprocess() : lowPassFilter(false), zExtentPixels(-0.02f), scaleZByNz(false) {}
|
|
|
|
BumpMapPreprocess(const Any& any);
|
|
|
|
operator Any() const;
|
|
|
|
bool operator==(const BumpMapPreprocess& other) const {
|
|
return
|
|
(lowPassFilter == other.lowPassFilter) &&
|
|
(zExtentPixels == other.zExtentPixels) &&
|
|
(scaleZByNz == other.scaleZByNz);
|
|
}
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|