Builtin Library
- ..
- .metadata230 B
- README.md1.4 KB
- mat.yaml1.3 KB
- preview.png81.1 KB
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_albedonormal_texture→bricks_normalroughness_metallic_texture→bricks_roughnessocclusion_texture→bricks_aoheight_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.SetPropertymutations are global — every entity usingparallax_cubesees 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.