mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 06:44:06 +02:00
Merge pull request #663 from ZappoMan/occlusion_culling
tweaks to low res moving, made monochrome off by default
This commit is contained in:
commit
ec48c6bf28
3 changed files with 4 additions and 2 deletions
|
@ -20,6 +20,8 @@ const glm::vec3 IDENTITY_RIGHT = glm::vec3( 1.0f, 0.0f, 0.0f);
|
|||
const glm::vec3 IDENTITY_UP = glm::vec3( 0.0f, 1.0f, 0.0f);
|
||||
const glm::vec3 IDENTITY_FRONT = glm::vec3( 0.0f, 0.0f,-1.0f);
|
||||
|
||||
const bool LOW_RES_MONO = false; // while in "low res mode" do voxels switch to monochrome
|
||||
|
||||
const int TREE_SCALE = 128;
|
||||
|
||||
const int NUMBER_OF_CHILDREN = 8;
|
||||
|
|
|
@ -31,7 +31,7 @@ VoxelNodeData::VoxelNodeData(Node* owningNode) :
|
|||
void VoxelNodeData::resetVoxelPacket() {
|
||||
// If we're moving, and the client asked for low res, then we force monochrome, otherwise, use
|
||||
// the clients requested color state.
|
||||
_currentPacketIsColor = (getWantLowResMoving() && _viewFrustumChanging) ? false : getWantColor();
|
||||
_currentPacketIsColor = (LOW_RES_MONO && getWantLowResMoving() && _viewFrustumChanging) ? false : getWantColor();
|
||||
PACKET_TYPE voxelPacketType = _currentPacketIsColor ? PACKET_TYPE_VOXEL_DATA : PACKET_TYPE_VOXEL_DATA_MONOCHROME;
|
||||
int numBytesPacketHeader = populateTypeAndVersion(_voxelPacket, voxelPacketType);
|
||||
_voxelPacketAt = _voxelPacket + numBytesPacketHeader;
|
||||
|
|
|
@ -133,7 +133,7 @@ void deepestLevelVoxelDistributor(NodeList* nodeList,
|
|||
// If we're starting a fresh packet, then...
|
||||
// If we're moving, and the client asked for low res, then we force monochrome, otherwise, use
|
||||
// the clients requested color state.
|
||||
bool wantColor = ((nodeData->getWantLowResMoving() && viewFrustumChanged) ? false : nodeData->getWantColor());
|
||||
bool wantColor = LOW_RES_MONO && nodeData->getWantLowResMoving() && viewFrustumChanged ? false : nodeData->getWantColor();
|
||||
|
||||
// If we have a packet waiting, and our desired want color, doesn't match the current waiting packets color
|
||||
// then let's just send that waiting packet.
|
||||
|
|
Loading…
Reference in a new issue