Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit44fd9e59bd

README.md

parallax_cube

Brick wall material using @builtin::shaders.pbr_parallax_occlusion with the parallax march enabled (parallax_depth_scale = 0.08, 48 ray-march layers). Pair with parallax_cube_flat for a same-textures, no-POM A/B comparison.

Shader

@builtin::shaders.pbr_parallax_occlusion — see that shader's README for the full parameter list.

Textures

All from @builtin::textures.parallax_bricks (height/normal derived from three.js's MIT-licensed brick_bump + brick_diffuse):

  • base_color_texture → bricks_albedo
  • normal_texture → bricks_normal
  • roughness_metallic_texture → bricks_roughness
  • occlusion_texture → bricks_ao
  • height_texture → bricks_height

Usage

Material.Apply(entityId, "parallax_cube")
-- Override at runtime:
Material.SetProperty("parallax_cube", "parallax_depth_scale", 0.12)

Pair it with parallax_cube_flat (same textures, parallax_depth_scale = 0) to compare the ray-marched surface against a flat-mapped baseline.

Notes

  • Material.SetProperty mutations are global — every entity using parallax_cube sees the change. If you need per-entity variation, derive a new material name and override the property there.
  • Use under any standard camera (forward path). The deferred path is not yet POM-aware; materials applied to a deferred camera will render as plain textured PBR.