Voxel Plugin
2.0p-304
2.0p-304
  • Home
    • Roadmap
    • Release Notes
  • Getting Started
    • Installing Voxel Plugin
    • Using MetaGraphs
      • Using the MetaGraph Preview
      • Finding the Right Nodes
      • Variables and Parameters
    • Step-by-Step Guides
      • Getting Started with Smooth Terrains
      • Getting Started with Blocky Terrains
      • Getting Started with Foliage
      • Getting Started with Materials
  • Landmass & MetaGraphs
    • Design Philosophy
      • What are Landmass & MetaGraphs
      • A Technical Exploration of MetaGraphs
    • Deep Dives into MetaGraphs
      • Passing Data to Materials
      • Working with Curves
      • Working with Landmass
        • Using Landmass Height Brushes
        • Scale and Resolution for Landmass Brushes
        • Complex Usecases for Landmass Brushes
      • Choosing the right Chunk Spawner
      • Using Height Canvases
      • MetaGraph Macros
      • Floats and Density
      • Buffers and Uniforms
    • Optimizing MetaGraphs
      • Utilities for Performant Graphs
      • Memory Usage & Render Performance
      • Profiling Generation Times
    • Extending MetaGraphs through C++
Powered by GitBook
On this page

Was this helpful?

  1. Landmass & MetaGraphs
  2. Deep Dives into MetaGraphs

Buffers and Uniforms

This page is a stub. This means that the information on this topic will be significantly expanded in the future. What is currently on this page is an incomplete picture.

Buffers and Uniforms can be distinguished by their pin visual. Uniform pins have standard round pins, whereas Buffer pins are represented by a square pin.

Buffers can only be used as an input for Buffer pins specifically. Uniforms can be used as an input for both Buffer and Uniform pins.

A single-length Buffer is functionally identical to a Uniform, and using one will not have any impact on performance. Performance considerations only change if the Buffer contains multiple values.

The most straight-forward rule of thumb for whether a given value should be a Bufferor a uniform is this:

  • If a value changes based on position, it is almost always a Buffer.

  • If a value is the same for every position, it is almost always a Uniform.

On a technical level, a Buffer is simply a stack of data: a single Buffer pin represents the data for every point within a chunk at the same time, rather than just being a single value. Having this data in a stack allows it to be operated on in bulk, i.e. by calculating many values at once using ISPC on the CPU, or GPU compute.

Uniform values are constant throughout all of a chunk's positions. If needed, a Uniform value can change from once chunk to the next. For example, the Get LOD node returns a uniform. It reports the current LOD, which varies from one chunk to the next. Because the LOD value will never change within a chunk, however, it can still be a uniform.

PreviousFloats and DensityNextOptimizing MetaGraphs

Last updated 2 years ago

Was this helpful?