In this release terrain mesh is split into chunks of configurable size and you can control how many chunks to render from the camera's position. Using this you can create larger terrains and draw just a portion of them to save on triangle count. The terrain now also supports a color map, which multiplies the base texture. Terrain material layers were reworked as a preparation for a deferred rendering pipeline. Please read the following changelog thoroughly before upgrading to this version.
BBMOD_Terrain, which is a texture to multiply the terrain colors with.
BBMOD_U_COLORMAP, which is the name of a fragment shader uniform of type
sampler2Dthat holds the color map texture.
BBMOD_Terrain, which is the width and height of a single terrain chunk. Terrain mesh is now split into chunks which consist of
_chunkSizeto the constructor of
BBMOD_Terrain. This is the width and height of a single terrain chunk. Defaults to 128.
BBMOD_Terrain, which is a grid of vertex buffers, each representing an individual terrain chunk.
ChunkRadius, which is the radius (in chunk size) within which terrain chunks are visible around the camera. Zero means only the chunk that the camera is on is visible. Use
infinityto make all chunks visible. Default value is
BBMOD_Terrainis now obsolete! It was replaced with the new
BBMOD_Terrain, which is the shader used when rendering the terrain. Default is
BBMOD_TerrainLayer, which describes a material of a single terrain layer.
BBMOD_Terrain.Layershould now be of
Struct.BBMOD_TerrainLayertype instead of
BBMOD_TerrainShader, which is the base class for BBMOD terrain shaders.
BBMOD_SHADER_TERRAIN_UNLITare now constructed from
BBMOD_TerrainMaterial, which is a material that can be used when rendering terrain.
BBMOD_MATERIAL_TERRAIN_UNLITare now constructed from
BBMOD_BaseCameranormalizing the resulting vector when it should not be normalized.
Copyright © 2023, BlueBurn. Built on September 11, 2023 using GMDoc.