Panda3D
Macros | Functions | Variables
shaderTerrainMesh.cxx File Reference

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University. More...

#include "shaderTerrainMesh.h"
#include "geom.h"
#include "geomVertexFormat.h"
#include "geomVertexData.h"
#include "geomVertexWriter.h"
#include "geomNode.h"
#include "geomTriangles.h"
#include "geomPatches.h"
#include "omniBoundingVolume.h"
#include "cullableObject.h"
#include "cullTraverser.h"
#include "cullHandler.h"
#include "cullTraverserData.h"
#include "clockObject.h"
#include "shaderAttrib.h"
#include "renderAttrib.h"
#include "shaderInput.h"
#include "boundingBox.h"
#include "samplerState.h"
#include "config_grutil.h"
#include "typeHandle.h"

Go to the source code of this file.

Macros

#define get_point_index(x, y)   (((x) + 1) + (size + 3) * ((y) + 1))
 
#define get_xel(x, y)   (data[(x) + (_size - 1 - (y)) * _size].b / (PN_stdfloat)PGM_MAXMAXVAL)
 

Functions

int check_power_of_two (size_t x)
 Helper function to check for a power of two. More...
 
 NotifyCategoryDef (shader_terrain, "")
 

Variables

ConfigVariableEnum< SamplerState::FilterType > stm_heightfield_magfilter ("stm-heightfield-magfilter", SamplerState::FT_linear, PRC_DESC("This specifies the magfilter that is applied for a heightfield texture. This " "can be used to create heightfield that is visual correct with collision " "geometry (for example bullet terrain mesh) by changing it to nearest"))
 
ConfigVariableEnum< SamplerState::FilterType > stm_heightfield_minfilter ("stm-heightfield-minfilter", SamplerState::FT_linear, PRC_DESC("This specifies the minfilter that is applied for a heightfield texture. This " "can be used to create heightfield that is visual correct with collision " "geometry (for example bullet terrain mesh) by changing it to nearest"))
 
ConfigVariableInt stm_max_chunk_count ("stm-max-chunk-count", 2048, PRC_DESC("Controls the maximum amount of chunks the Terrain can display. If you use " "a high LOD, you might have to increment this value. The lower this value is " "the less data has to be transferred to the GPU."))
 
ConfigVariableInt stm_max_views ("stm-max-views", 8, PRC_DESC("Controls the maximum amount of different views the Terrain can be rendered " "with. Each camera rendering the terrain corresponds to a view. Lowering this " "value will reduce the data that has to be transferred to the GPU."))
 
ConfigVariableBool stm_use_hexagonal_layout ("stm-use-hexagonal-layout", false, PRC_DESC("Set this to true to use a hexagonal vertex layout. This approximates " "the heightfield in a better way, however the CLOD transitions might be " "visible due to the vertices not matching exactly."))
 

Detailed Description

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.

All rights reserved.

All use of this software is subject to the terms of the revised BSD license. You should have received a copy of this license along with this source code in a file named "LICENSE."

Author
tobspr
Date
2016-02-16

Definition in file shaderTerrainMesh.cxx.

Function Documentation

◆ check_power_of_two()

int check_power_of_two ( size_t  x)

Helper function to check for a power of two.

This method checks for a power of two by using bitmasks

Parameters
xNumber to check
Returns
true if x is a power of two, false otherwise

Definition at line 85 of file shaderTerrainMesh.cxx.

Referenced by ShaderTerrainMesh::generate().