Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commita26cdab9a3

README.md

Polished floor

A polished stone floor with three coloured pillars standing on it, under an afternoon sky, with screen-space reflections listed on the scene's RenderFeatures entity — so the floor reflects the pillars, and a player walking across it, rather than the sky alone.

Load @builtin::systems.reflections.demo.polished_floor with the scene.load tool. Players arrive facing the pillars from floor height, which is the grazing angle a polished dielectric reflects at most strongly.

What it shows

  • The feature on one entity. render_features carries a RenderFeatures list with @builtin::systems.reflections.ssr at intensity = 1, maxDistance = 60, quality = "high". Delete the entity and the floor mirrors the sky alone; put it back and the pillars stand in the floor.
  • Only what the camera sees. A pillar's reflection comes from the frame the camera drew, so turning away from a pillar takes its reflection with it, and the reflection fades toward the screen edge rather than cutting off.
  • The environment underneath. Where a ray finds nothing the floor keeps the sky reflection the environment gives it, at the same mip and Fresnel weight, so the seam between the two is a change of content and not of brightness.
  • Roughness decides how they look. The floor sits at roughness 0.06 and reflects as a mirror. The pillars sit at 0.55, under the feature's roughnessCutoff, and reflect glossily: soft and stretched along the lobe their roughness describes.

Contents

  • floor — a 60 m slab of PolishedStone, a near-black dielectric at roughness 0.06, with a collider.
  • pillar_1..3 — 1.6 × 5 × 1.6 m boxes in PillarRed, PillarGreen, PillarBlue, sunk into the slab.
  • sun, ambient, sky — a side-lit afternoon under a ProceduralSky.
  • render_features — the RenderFeatures entity this scene exists for.
  • PlayerSetups / Spawns — the humanoid player on an orbital-follow camera, spawning in front of the pillars. The scene's player intent is "spawns".

Entry point

  • entrypoint.luau — nothing to set up: the reflections run from the RenderFeatures entity the moment the scene loads.