server/dep/include/g3dlite/G3D/BumpMapPreprocess.h
Lynx3d ae3ad10bcf [10097] Update G3D up to v8.0b4
+ Got rid of zip lib requirement in G3D...
  Still can re-enable code by defining _HAVE_ZIP...

+ Remove silly X11 lib dependency from G3D
  Code doesn't seem to do anything yet anyway, and even if, we don't want it :p

+ Fix another weird G3D build problem...

+ Remove some __asm usage in g3d, which is not available on Win64
  My editor also decided to remove a ton of trailing white spaces...tss...

+ Reapply G3D fixes for 64bit VC

+ not use SSE specific header when SSE not enabled in *nix

+ Updated project files

+ New vmap_assembler VC90/VC80 Project

+ vmap assembler binaries updates

NOTE: Old vmap fikes expected work (as tests show) with new library version.
      But better use new generated versions. Its different in small parts to bad or good...

(based on Lynx3d's repo commit 44798d3)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-06-23 06:45:25 +04:00

61 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