GPUHeightmapRenderer
in package
Table of Contents
Properties
- $ppu : float
- The number of pixels per unit in the heightmap
- $framebuffer : Framebuffer
- $gl : GLState
- $height : int
- $width : int
Methods
- __construct() : mixed
- Constructor
- caputreHeightmap() : Heightmap
- Captures the heightmap from the given height geometry producers
- initalizeFramebuffer() : void
Properties
$ppu
The number of pixels per unit in the heightmap
public
float
$ppu
= 1.0
1.0 means 1 pixel equals one unit in the heightmap if you want to have a higher resolution heightmap, set this to a higher value
Example: resolution: 1024x1024 with ppu = 1.0, will capture the are in world space of -512 to 512 on the x and z axis resolution: 1024x1024 with ppu = 2.0, will capture the are in world space of -256 to 256 on the x and z axis resolution: 2048x2048 with ppu = 2.0, will capture the are in world space of -512 to 512 on the x and z axis <- double res
$framebuffer
private
Framebuffer
$framebuffer
$gl
private
GLState
$gl
$height
private
int
$height
$width
private
int
$width
Methods
__construct()
Constructor
public
__construct(GLState $gl, int $width, int $height) : mixed
Parameters
- $gl : GLState
- $width : int
- $height : int
caputreHeightmap()
Captures the heightmap from the given height geometry producers
public
caputreHeightmap(EntitiesInterface $entities, array<string|int, GPUHeightmapGeometryPassInterface> $heightGeometryProducers) : Heightmap
Parameters
- $entities : EntitiesInterface
- $heightGeometryProducers : array<string|int, GPUHeightmapGeometryPassInterface>
Return values
HeightmapinitalizeFramebuffer()
private
initalizeFramebuffer() : void