88 3D: Lighting inspection
3D reference map · First 3D picture
struct
(struct material-inspection3d (material fields) #:transparent) material : material3d? fields : immutable-hash?
procedure
(material3d-inspection material) → material-inspection3d?
material : material3d?
struct
(struct light-inspection3d (light fields) #:transparent) light : light3d? fields : immutable-hash?
procedure
(light3d-inspection light) → light-inspection3d?
light : light3d?
struct
(struct fragment-light-sample3d ( id kind direction distance attenuation cone facing shadow-factor shadow-state diffuse-energy specular-energy diffuse-linear specular-linear) #:transparent) id : symbol? kind : symbol? direction : any/c distance : any/c attenuation : any/c cone : any/c facing : any/c shadow-factor : real? shadow-state : symbol? diffuse-energy : real? specular-energy : real? diffuse-linear : any/c specular-linear : any/c
struct
(struct fragment-lighting-report3d ( world-point normal view-direction material light-samples pre-tone-map final-srgb diagnostics authored-lights theme-id appearance-fingerprint resolved-material resolved-lights) #:transparent) world-point : vec3? normal : vec3? view-direction : vec3? material : material3d? light-samples : list? pre-tone-map : any/c final-srgb : rgba-color? diagnostics : list? authored-lights : list? theme-id : symbol? appearance-fingerprint : bytes? resolved-material : material3d? resolved-lights : list?
procedure
(fragment-lighting-inspection3d material lights world-point normal camera-position [ #:tone-map tone-map #:shadow-factors shadow-factors #:theme theme]) → fragment-lighting-report3d? material : material3d? lights : (listof light3d?) world-point : vec3? normal : vec3? camera-position : vec3? tone-map : tone-map3d? = default-tone-map3d shadow-factors : immutable-hash? = #hasheq() theme : color-theme? = animate-light-theme
Current limitation. A pure probe does not read a private software or OpenGL depth map: when a light declares a shadow but its factor has not been explicitly supplied, the report uses a numerically unshadowed factor of one, marks it 'not-sampled, and returns a diagnostic. This prevents the inspector from guessing hidden renderer state or changing the rendered Scene. It is not a per-pixel GPU debugger; the preview probe reports the exact CPU pick and authored equations, while actual shadow-map sampling remains backend owned.
procedure
(ambient-light3d [ #:id id #:intensity intensity #:color color #:shadow shadow]) → ambient-light3d? id : symbol? = 'ambient intensity : nonnegative-real? = 1 color : color-spec? = "white" shadow : #f = #f
procedure
(directional-light3d direction [ #:id id #:intensity intensity #:color color #:shadow shadow]) → directional-light3d? direction : vec3? id : symbol? = 'key intensity : nonnegative-real? = 1 color : color-spec? = "white" shadow : (or/c #f directional-shadow3d?) = #f
procedure
(point-light3d position [ #:id id #:intensity intensity #:color color #:attenuation attenuation #:range range #:shadow shadow]) → point-light3d? position : vec3? id : symbol? = 'point intensity : nonnegative-real? = 1 color : color-spec? = "white"
attenuation : light-attenuation3d? = (inverse-square-attenuation3d) range : (or/c #f positive-real?) = #f shadow : #f = #f
procedure
(spot-light3d position direction [ #:id id #:intensity intensity #:color color #:inner-angle inner-angle #:outer-angle outer-angle #:attenuation attenuation #:range range #:shadow shadow]) → spot-light3d? position : vec3? direction : vec3? id : symbol? = 'spot intensity : nonnegative-real? = 1 color : color-spec? = "white" inner-angle : nonnegative-real? = 0 outer-angle : positive-real? = (math "pi/4")
attenuation : light-attenuation3d? = (inverse-square-attenuation3d) range : (or/c #f positive-real?) = #f shadow : (or/c #f spot-shadow3d?) = #f
procedure
(ambient-light3d? value) → boolean?
value : any/c
procedure
(ambient-light3d-id light) → symbol?
light : ambient-light3d?
procedure
(ambient-light3d-intensity light) → nonnegative-real?
light : ambient-light3d?
procedure
(ambient-light3d-color light) → color-spec?
light : ambient-light3d?
procedure
(ambient-light3d-shadow light) → #f
light : ambient-light3d?
procedure
(directional-light3d? value) → boolean?
value : any/c
procedure
(directional-light3d-id light) → symbol?
light : directional-light3d?
procedure
(directional-light3d-direction light) → vec3?
light : directional-light3d?
procedure
(directional-light3d-intensity light) → nonnegative-real?
light : directional-light3d?
procedure
(directional-light3d-color light) → color-spec?
light : directional-light3d?
procedure
(directional-light3d-shadow light)
→ (or/c #f directional-shadow3d?) light : directional-light3d?
procedure
(point-light3d? value) → boolean?
value : any/c
procedure
(point-light3d-id light) → symbol?
light : point-light3d?
procedure
(point-light3d-position light) → vec3?
light : point-light3d?
procedure
(point-light3d-intensity light) → nonnegative-real?
light : point-light3d?
procedure
(point-light3d-color light) → color-spec?
light : point-light3d?
procedure
light : point-light3d?
procedure
(point-light3d-range light) → (or/c #f positive-real?)
light : point-light3d?
procedure
(point-light3d-shadow light) → #f
light : point-light3d?
procedure
(spot-light3d? value) → boolean?
value : any/c
procedure
(spot-light3d-id light) → symbol?
light : spot-light3d?
procedure
(spot-light3d-position light) → vec3?
light : spot-light3d?
procedure
(spot-light3d-direction light) → vec3?
light : spot-light3d?
procedure
(spot-light3d-intensity light) → nonnegative-real?
light : spot-light3d?
procedure
(spot-light3d-color light) → color-spec?
light : spot-light3d?
procedure
(spot-light3d-inner-angle light) → nonnegative-real?
light : spot-light3d?
procedure
(spot-light3d-outer-angle light) → positive-real?
light : spot-light3d?
procedure
(spot-light3d-attenuation light) → light-attenuation3d?
light : spot-light3d?
procedure
(spot-light3d-range light) → (or/c #f positive-real?)
light : spot-light3d?
procedure
(spot-light3d-shadow light) → (or/c #f spot-shadow3d?)
light : spot-light3d?
procedure
(light3d-id light) → symbol?
light : light3d?
procedure
(light3d-kind light)
→ (or/c 'ambient 'directional 'point 'spot) light : light3d?
procedure
(light3d-color light) → color-spec?
light : light3d?
procedure
(light3d-intensity light) → nonnegative-real?
light : light3d?
procedure
(light3d-shadow light) → (or/c #f shadow3d?)
light : light3d?