qbsp: _phong_angle_concave support
This commit is contained in:
parent
c3183429fb
commit
6690006a49
|
|
@ -339,6 +339,8 @@ typedef struct {
|
|||
#define TEX_MINLIGHT_COLOR_B_SHIFT 36
|
||||
#define TEX_MINLIGHT_COLOR_B_MASK (255ULL << TEX_MINLIGHT_COLOR_B_SHIFT) /* 8 bit value, blue minlight color for this face. */
|
||||
#define TEX_NOSHADOW (1ULL << 44) /* don't cast a shadow */
|
||||
#define TEX_PHONG_ANGLE_CONCAVE_SHIFT 45
|
||||
#define TEX_PHONG_ANGLE_CONCAVE_MASK (255ULL << TEX_PHONG_ANGLE_CONCAVE_SHIFT) /* 8 bit value. if non zero, overrides _phong_angle for concave joints. */
|
||||
|
||||
// Q2 Texture flags.
|
||||
#define Q2_SURF_LIGHT 0x1 // value will hold the light strength
|
||||
|
|
|
|||
|
|
@ -134,8 +134,9 @@
|
|||
#define TEX_MINLIGHT_COLOR_G_MASK (255ULL << TEX_MINLIGHT_COLOR_G_SHIFT) /* 8 bit value, green minlight color for this face. */
|
||||
#define TEX_MINLIGHT_COLOR_B_SHIFT 36
|
||||
#define TEX_MINLIGHT_COLOR_B_MASK (255ULL << TEX_MINLIGHT_COLOR_B_SHIFT) /* 8 bit value, blue minlight color for this face. */
|
||||
|
||||
#define TEX_NOSHADOW (1ULL << 44) /* don't cast a shadow */
|
||||
#define TEX_PHONG_ANGLE_CONCAVE_SHIFT 45
|
||||
#define TEX_PHONG_ANGLE_CONCAVE_MASK (255ULL << TEX_PHONG_ANGLE_CONCAVE_SHIFT) /* 8 bit value. if non zero, overrides _phong_angle for concave joints. */
|
||||
|
||||
/*
|
||||
* The quality of the bsp output is highly sensitive to these epsilon values.
|
||||
|
|
|
|||
10
qbsp/map.cc
10
qbsp/map.cc
|
|
@ -295,7 +295,7 @@ FindTexinfoEnt(mtexinfo_t *texinfo, const mapentity_t *entity)
|
|||
}
|
||||
}
|
||||
|
||||
// handle "_phong" and "_phong_angle"
|
||||
// handle "_phong" and "_phong_angle" and "_phong_angle_concave"
|
||||
vec_t phongangle = atof(ValueForKey(entity, "_phong_angle"));
|
||||
const int phong = atoi(ValueForKey(entity, "_phong"));
|
||||
|
||||
|
|
@ -304,10 +304,16 @@ FindTexinfoEnt(mtexinfo_t *texinfo, const mapentity_t *entity)
|
|||
}
|
||||
|
||||
if (phongangle) {
|
||||
const uint8_t phongangle_byte = (uint8_t) qmax(0, qmin(255, (int)rint(phongangle)));
|
||||
const uint64_t phongangle_byte = (uint64_t) qmax(0, qmin(255, (int)rint(phongangle)));
|
||||
flags |= (phongangle_byte << TEX_PHONG_ANGLE_SHIFT);
|
||||
}
|
||||
|
||||
const vec_t phong_angle_concave = atof(ValueForKey(entity, "_phong_angle_concave"));
|
||||
{
|
||||
const uint64_t phong_angle_concave_byte = (uint64_t) qmax(0, qmin(255, (int)rint(phong_angle_concave)));
|
||||
flags |= (phong_angle_concave_byte << TEX_PHONG_ANGLE_CONCAVE_SHIFT);
|
||||
}
|
||||
|
||||
// handle "_minlight"
|
||||
const vec_t minlight = atof(ValueForKey(entity, "_minlight"));
|
||||
if (minlight > 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue