Documentation
¶
Overview ¶
Code generated by internal/codegen/binary; DO NOT EDIT.
Package worldlightmap defines the independently versioned, build-generated static receiver layout. It has no renderer or private engine dependencies.
Index ¶
- Constants
- Variables
- func ApplySurfaceSelection(surfaces []Surface, selection *SurfaceSelection) error
- func ClipSurfacePolygon(polygon []world.Vec3, rectangle [4]float64) []world.Vec3
- func Encode(layout Layout, document *world.Document) ([]byte, error)
- func EncodeEnvironmentVariants(catalog EnvironmentVariants, layout Layout, document *world.Document) ([]byte, error)
- func EncodeFixedLighting(lighting FixedLighting) ([]byte, error)
- func EncodePrebake(pair PrebakePair, layout Layout, document *world.Document) ([]byte, error)
- func EncodeSurfaceSelection(selection SurfaceSelection) ([]byte, error)
- func EnvironmentRGBMRange(environment *world.Environment, settings world.EnvironmentSettings, ...) (float64, error)
- func EnvironmentSurfaceDigest(document *world.Document) (string, error)
- func EqualSurfaceSelections(a, b *SurfaceSelection) bool
- func FixedLightingBytes(lighting *FixedLighting) uint64
- func GeometryDigest(document *world.Document) (string, error)
- func LayoutDigest(layout *Layout) (string, error)
- func LightIDsInReceiverScope(document *world.Document, selection *ReceiverSelection, ids []string) ([]string, error)
- func OfflineDenoiseMode(producer string) (string, error)
- func OfflineDenoiseProducer(mode string) (string, error)
- func OfflineProducer(mode string, maxRayDistance float64) (string, error)
- func OfflineRGBMRange(layout Layout, document *world.Document, bounces int) (float64, error)
- func OfflineRGBMRangeBounded(layout Layout, document *world.Document, bounces int, maxRayDistance float64) (float64, error)
- func OfflineSurfaceDigest(document *world.Document) (string, error)
- func ReceiverScope(document *world.Document, selection *ReceiverSelection) ([]bool, []bool, error)
- func SelectEnvironmentVariants(catalog *EnvironmentVariants, settings world.EnvironmentSettings) (int, int, float64, error)
- func StaticLightIDs(document *world.Document) ([]string, error)
- func SurfaceSelected(binding Binding, selection *SurfaceSelection) bool
- func TerrainLightingBasis(normal world.Vec3) (world.Vec3, world.Vec3)
- func Validate(layout *Layout, document *world.Document) error
- func ValidateEnvironmentImage(variant EnvironmentVariant, encoded []byte, layout Layout) error
- func ValidateEnvironmentVariants(catalog *EnvironmentVariants, layout Layout, document *world.Document) error
- func ValidateEnvironmentVariantsArtifact(catalog *EnvironmentVariants, layout Layout) error
- func ValidateFixedLighting(lighting FixedLighting, layout Layout, document *world.Document) error
- func ValidateFixedLightingArtifact(lighting FixedLighting, image []byte, layout Layout) error
- func ValidateFixedTerrainBinding(lighting FixedLighting, terrain *worldterrain.Document) error
- func ValidateLayoutArtifact(layout *Layout, admission LayoutAdmission) error
- func ValidatePrebakeArtifact(pair PrebakePair, layout Layout) error
- func ValidateSurfaceSelection(selection *SurfaceSelection, admission LayoutAdmission) error
- type Binding
- type Chart
- type ChartRNM
- type CompiledLight
- type EnvironmentVariant
- type EnvironmentVariants
- type FixedLighting
- type InfluenceScope
- type Layout
- func Compile(document world.Document, options Options) (Layout, error)
- func CompileReceivers(document world.Document, options Options, sectors, solids []int) (Layout, error)
- func CompileSelectedReceivers(document world.Document, options Options, sectors, solids []int, ...) (Layout, error)
- func Decode(encoded []byte, document *world.Document) (Layout, error)
- func DecodeLayoutArtifact(encoded []byte, admission LayoutAdmission) (Layout, error)
- type LayoutAdmission
- type LightingProbe
- type LiquidTile
- type OfflineBakeInputs
- type Options
- type Page
- type PrebakeManifest
- type PrebakePair
- func DecodePrebake(encoded, image []byte, layout Layout, document *world.Document) (PrebakePair, error)
- func DecodePrebakeArtifact(encoded, image []byte, layout Layout) (PrebakePair, error)
- func NewOfflinePrebake(layout Layout, document *world.Document, image []byte, ...) (PrebakePair, error)
- func NewPrebake(layout Layout, document *world.Document, image []byte) (PrebakePair, error)
- type ProbeDirect
- type ReceiverSelection
- type RuntimeBake
- type Surface
- type SurfaceSelection
- type TerrainPatchLighting
Constants ¶
const ( EnvironmentVariantsSchema = "karty.world-lightmap-environment-variants@1" EnvironmentVariantsEntryName = "@world/lightmaps/environment-variants" EnvironmentImageEntryName = "@world/lightmaps/environment-image" EnvironmentVariantsMetadataKey = "kartyWorldLightmapEnvironmentVariants" EnvironmentVariantMetadataKey = "kartyWorldLightmapEnvironmentVariant" EnvironmentVariantsFeature = cartridge.FeatureWorldLightmapsEnvironmentVariantsV1 EnvironmentPrebakeProducer = "cpu-environment-rnm3@2" MaxEnvironmentVariants = 32 MaxEnvironmentCatalogSize = 32 * 1024 )
const ( FixedSchema = "karty.world-fixed-lighting@1" FixedCompactSchema = "karty.world-fixed-lighting@2" FixedEntryName = "@world/lightmaps/fixed" FixedImageEntryName = "@world/lightmaps/fixed-rnm3" FixedMetadataKey = "kartyWorldFixedLighting" FixedFeature = cartridge.FeatureWorldFixedLightingV1 FixedCompactFeature = cartridge.FeatureWorldFixedCompactLightingV1 FixedProducer = "cpu-fixed-rnm3@3" FixedSpatialProducer = "cpu-fixed-spatial-rnm3@1" MaxFixedLightingSize = 2 << 20 MaxLightingProbes = 4096 MaxCompiledLights = world.MaxLights + 1 )
const ( Schema = "karty.world-lightmaps@1" Algorithm = uint32(1) ReceiverAlgorithm = uint32(2) EntryName = "@world/lightmaps/layout" MetadataKey = "kartyWorldLightmaps" Feature = cartridge.FeatureWorldLightmapsV1 MaxEncodedSize = 8 * 1024 * 1024 MaxCharts = 8192 MaxTexels = 1024 * 1024 MaxBakeLights = world.MaxLights PointVisibilityEncoding = "point-visibility@1" DirectRNMEncoding = "direct-rnm3@1" BinaryMagic = "KLM1" )
const ( OfflinePrebakeAlgorithm = 2 OfflinePrebakeProducer = "cpu-rnm3-pathtrace@4" BoundedOfflinePrebakeProducer = "cpu-rnm3-pathtrace@5" LegacyOfflinePrebakeProducer = "cpu-rnm3-pathtrace@1" MaxOfflineSamples = 256 MaxOfflineBounces = 4 MaxDiffuseReflectance = .95 MaxBakeRayDistance = world.MaxCoordinate )
const ( PrebakeSchema = "karty.world-lightmap-prebake@1" PrebakeAlgorithm = 1 PrebakeEntryName = "@world/lightmaps/prebake" PrebakeImageEntryName = "@world/lightmaps/prebake-rnm3" PrebakeMetadataKey = "kartyWorldLightmapPrebake" PrebakeFeature = cartridge.FeatureWorldLightmapsPrebakedV1 MaxPrebakeManifestSize = 16 * 1024 MaxPrebakeImageSize = level.MaxEntrySize PrebakeBinaryMagic = "KPB1" )
const MaxLiquidTiles = 64
const SelectedAlgorithm = uint32(4)
const SelectedSchema = "karty.world-lightmaps@3"
Variables ¶
var ( ErrLayout = errors.New("world lightmap layout is invalid") // ErrPageCapacity identifies finite receiver charts that cannot fit the // requested page. Capacity errors also wrap ErrLayout. Invalid geometry, // options and lighting recipes do not wrap ErrPageCapacity. ErrPageCapacity = errors.New("world lightmap page capacity is exhausted") )
Functions ¶
func ApplySurfaceSelection ¶ added in v0.0.19
func ApplySurfaceSelection(surfaces []Surface, selection *SurfaceSelection) error
ApplySurfaceSelection preserves global surface indexing while selecting and clipping convex source polygons. Input polygon backing arrays are not changed.
func ClipSurfacePolygon ¶ added in v0.0.19
ClipSurfacePolygon retains stable authored world coordinates on shared edges.
func EncodeEnvironmentVariants ¶ added in v0.0.14
func EncodeFixedLighting ¶ added in v0.0.19
func EncodeFixedLighting(lighting FixedLighting) ([]byte, error)
func EncodePrebake ¶
EncodePrebake returns a canonical manifest only after complete pair validation.
func EncodeSurfaceSelection ¶ added in v0.0.19
func EncodeSurfaceSelection(selection SurfaceSelection) ([]byte, error)
EncodeSurfaceSelection exposes the bounded typed face selector to mesh envelopes. Its bytes participate in both layout and mesh content identities.
func EnvironmentRGBMRange ¶ added in v0.0.14
func EnvironmentRGBMRange(environment *world.Environment, settings world.EnvironmentSettings, bounces int) (float64, error)
func EnvironmentSurfaceDigest ¶ added in v0.0.14
func EqualSurfaceSelections ¶ added in v0.0.19
func EqualSurfaceSelections(a, b *SurfaceSelection) bool
func FixedLightingBytes ¶ added in v0.0.19
func FixedLightingBytes(lighting *FixedLighting) uint64
FixedLightingBytes bounds retained scalar data, including Go slice/string headers and alignment. Image storage is charged separately by the owner.
func GeometryDigest ¶
GeometryDigest includes stable semantic identity, boundary topology and elevation geometry. Actor state, lighting, materials and UVs do not affect it.
func LayoutDigest ¶ added in v0.0.12
LayoutDigest hashes the exact canonical binary layout. It checks structural bounds and finite fields without a world; callers validate semantic bindings against the complete world before mounting a layout.
func LightIDsInReceiverScope ¶ added in v0.0.12
func LightIDsInReceiverScope(document *world.Document, selection *ReceiverSelection, ids []string) ([]string, error)
LightIDsInReceiverScope preserves the given source order while filtering to the receivers' ordinary physical component. Unknown and duplicate IDs fail even when their source would be outside that component.
func OfflineDenoiseMode ¶ added in v0.0.9
OfflineDenoiseMode rejects unknown producer versions before image allocation.
func OfflineDenoiseProducer ¶ added in v0.0.9
OfflineDenoiseProducer versions the complete filter, including its preset. Empty and off select the same revision-4 producer and manifest identity.
func OfflineProducer ¶ added in v0.0.12
OfflineProducer selects a separately versioned bounded producer only for a finite positive ray limit. Zero selects the unbounded revision-4 producer.
func OfflineRGBMRange ¶
OfflineRGBMRange reserves a conservative finite range for direct lighting plus bounded diffuse transport. Each bounce attenuates maximum radiance by MaxDiffuseReflectance; three coefficient lobes need the same factor as the direct producer. This is a storage bound, not a promised illumination level.
func OfflineRGBMRangeBounded ¶ added in v0.0.12
func OfflineRGBMRangeBounded(layout Layout, document *world.Document, bounces int, maxRayDistance float64) (float64, error)
OfflineRGBMRangeBounded uses exactly the producer's conservative source scope and clipped influence radii. Zero is identical to OfflineRGBMRange.
func OfflineSurfaceDigest ¶
OfflineSurfaceDigest binds material identities and authored projection data in addition to geometry. Actor state and artistic ambient are not transport inputs. The original albedo pixels are checked separately by the public CLI.
func ReceiverScope ¶ added in v0.0.12
ReceiverScope returns transport geometry in the selected receivers' ordinary physical component. Transformed and one-way portals are lighting boundaries. The caller must validate the complete document before using these masks. Solids touching multiple physical spaces are rejected: coordinate overlap cannot unambiguously assign an independently authored volume to either space.
func SelectEnvironmentVariants ¶ added in v0.0.14
func SelectEnvironmentVariants(catalog *EnvironmentVariants, settings world.EnvironmentSettings) (int, int, float64, error)
SelectEnvironmentVariants chooses one authored clock. Clear-only catalogs return the same index twice and zero blend regardless of cloud amount; cloud brightness remains a shader control and does not change the selected image. Paired catalogs return clear/overcast indexes and a linear weather blend. Clock distance wraps midnight. Ties retain the first authored time.
func StaticLightIDs ¶ added in v0.0.12
StaticLightIDs returns independently owned authored-order IDs of all fixed point sources without a nonzero linked emission pulse. It validates the world first. Compiler options decide the receiver/component scope separately.
func SurfaceSelected ¶ added in v0.0.19
func SurfaceSelected(binding Binding, selection *SurfaceSelection) bool
SurfaceSelected tests exact source identity, ignoring a caller's chart slot.
func TerrainLightingBasis ¶ added in v0.0.19
TerrainLightingBasis is the shared producer/consumer RNM terrain frame.
func Validate ¶
Validate checks every record, rectangle, semantic binding and receiver before a caller can allocate GPU resources. The geometry digest prevents stale UVs.
func ValidateEnvironmentImage ¶ added in v0.0.14
func ValidateEnvironmentImage(variant EnvironmentVariant, encoded []byte, layout Layout) error
ValidateEnvironmentImage checks exact content, dimensions and complete QOI stream before callers allocate decoded pixels or replace a resident map.
func ValidateEnvironmentVariants ¶ added in v0.0.14
func ValidateEnvironmentVariants(catalog *EnvironmentVariants, layout Layout, document *world.Document) error
func ValidateEnvironmentVariantsArtifact ¶ added in v0.0.18
func ValidateEnvironmentVariantsArtifact(catalog *EnvironmentVariants, layout Layout) error
ValidateEnvironmentVariantsArtifact checks runtime references and allocation bounds. Builder callers retain ValidateEnvironmentVariants for source proof.
func ValidateFixedLighting ¶ added in v0.0.19
func ValidateFixedLighting(lighting FixedLighting, layout Layout, document *world.Document) error
func ValidateFixedLightingArtifact ¶ added in v0.0.19
func ValidateFixedLightingArtifact(lighting FixedLighting, image []byte, layout Layout) error
func ValidateFixedTerrainBinding ¶ added in v0.0.19
func ValidateFixedTerrainBinding(lighting FixedLighting, terrain *worldterrain.Document) error
func ValidateLayoutArtifact ¶ added in v0.0.18
func ValidateLayoutArtifact(layout *Layout, admission LayoutAdmission) error
ValidateLayoutArtifact checks structural layout constraints only. Full authored-source proof remains available through Validate for build/cache use. Callers establish artifact integrity separately; the supplied counts are not evidence that an artifact was produced correctly. Inputs are read-only.
func ValidatePrebakeArtifact ¶ added in v0.0.18
func ValidatePrebakeArtifact(pair PrebakePair, layout Layout) error
ValidatePrebakeArtifact validates structural/resource identities against an already admitted immutable layout. BakeSHA256, SurfaceSHA256 and reflectance record compiler provenance; full source proof remains PrebakePair.Validate.
func ValidateSurfaceSelection ¶ added in v0.0.19
func ValidateSurfaceSelection(selection *SurfaceSelection, admission LayoutAdmission) error
Types ¶
type Binding ¶
Binding associates a world surface with its receiver chart. Index addresses the world sector or solid array. Edge is -1 for caps, and addresses the directed wall or footprint edge otherwise. Chart -1 explicitly marks a wall with no opaque receiver. Array order is semantic discovery order.
type Chart ¶
type Chart struct {
ID int
Page int
Rect [4]int
ReceiverRect [4]int
Normal world.Vec3
Tangent world.Vec3
Bitangent world.Vec3
UPlane [4]float64
VPlane [4]float64
}
Chart describes a receiver's atlas placement and basis. Rectangles are [minimumX,minimumY,maximumX,maximumY] in page pixels, maximums exclusive. Plane values are normalized page coordinates.
type ChartRNM ¶ added in v0.0.19
ChartRNM stores linear RGB irradiance for the three existing RNM lobes. All zero coefficients are valid covered black, not missing lighting.
type CompiledLight ¶ added in v0.0.19
type EnvironmentVariant ¶ added in v0.0.14
type EnvironmentVariants ¶ added in v0.0.14
type EnvironmentVariants struct {
Schema, GeometrySHA256, LayoutSHA256, SurfaceSHA256, ReflectanceSHA256, Producer string
Samples, Bounces int
Seed uint64
Denoise string
Default int
Variants []EnvironmentVariant
}
EnvironmentVariants binds one immutable receiver layout and a bounded set of content-addressed passive condition modules. The default image is embedded in the owning render chunk; other images need not be fetched until selected.
func DecodeEnvironmentVariants ¶ added in v0.0.14
func DecodeEnvironmentVariantsArtifact ¶ added in v0.0.18
func DecodeEnvironmentVariantsArtifact(encoded []byte, layout Layout) (EnvironmentVariants, error)
DecodeEnvironmentVariantsArtifact decodes a builder-approved catalog after whole-file integrity admission. It checks binary/resource bounds and identities without reconstructing source geometry, surface digests or lighting proofs.
type FixedLighting ¶ added in v0.0.19
type FixedLighting struct {
TerrainSHA256, TerrainReceiverSHA256 string
Terrain []TerrainPatchLighting
// ConstantRNM replaces the entire atlas only when every chart is uniform.
// Every layout chart is present in canonical index order.
ConstantRNM []ChartRNM
Schema, GeometrySHA256, LayoutSHA256, SurfaceSHA256 string
ReflectanceSHA256, InputSHA256, ImageSHA256, Producer string
ImageBytes, Width, Height, Samples, Bounces int
Seed uint64
Denoise string
RGBMRange float64
Lights []CompiledLight
Probes []LightingProbe
}
FixedLighting is an atomic, chunk-owned fixed illumination result. Ambient cubes contain sky, bounced light and non-nominated direct sources. The two nominated sources are evaluated only through Direct, never again in Ambient. Cubes use +X,-X,+Y,-Y,+Z,-Z order. No runtime condition variants exist.
func DecodeFixedLighting ¶ added in v0.0.19
func DecodeFixedLighting(data []byte) (FixedLighting, error)
DecodeFixedLighting preflights the complete bounded stream before allocating owned source/probe slices. Artifact identity admission is a separate operation.
func DecodeFixedLightingArtifact ¶ added in v0.0.19
func DecodeFixedLightingArtifact(encoded, image []byte, layout Layout) (FixedLighting, error)
func NewFixedLighting ¶ added in v0.0.19
func NewFixedLighting(layout Layout, document *world.Document, image []byte, lighting FixedLighting) (FixedLighting, error)
NewFixedLighting binds a producer result to its immutable layout and QOI image.
type InfluenceScope ¶ added in v0.0.12
InfluenceScope describes conservative pixel dependencies in stable semantic surface and recipe order. SurfaceIndices index Surfaces(document); LightIDs never change which authored sources are classified as completed static lights.
func BoundedInfluenceScope ¶ added in v0.0.12
func BoundedInfluenceScope(document *world.Document, layout Layout, bounces int, maxRayDistance float64) (InfluenceScope, error)
BoundedInfluenceScope keeps geometry within (bounces+1)*distance of receiver bounds, and sources whose min(radius,distance) sphere reaches receiver bounds expanded by bounces*distance. Small guards cover ray-origin and raster rounding. Zero distance retains the complete ordinary physical-component dependency set.
type Layout ¶
type Layout struct {
Schema string
Algorithm uint32
GeometrySHA256 string
TexelsPerUnit float64
Padding int
Pages []Page
Charts []Chart
Bindings []Binding
RuntimeBake *RuntimeBake
Receivers *ReceiverSelection
Selection *SurfaceSelection
}
func Compile ¶
Compile discovers and packs unique receiver coordinates without triangulating sectors or importing runtime code. Algorithm 1 merges only coplanar floors and ceilings across ordinary reciprocal portals, never across transformed or disconnected spaces. Walls and solid sides retain semantic chart identities.
func CompileReceivers ¶ added in v0.0.12
func CompileReceivers(document world.Document, options Options, sectors, solids []int) (Layout, error)
CompileReceivers packs only selected receivers at the requested density. Global bindings and the full geometry digest keep chunk identity stable. Algorithm 2 never merges charts across an unselected sector.
func CompileSelectedReceivers ¶ added in v0.0.19
func CompileSelectedReceivers(document world.Document, options Options, sectors, solids []int, selection SurfaceSelection) (Layout, error)
CompileSelectedReceivers clips before chart allocation; it never lowers the requested density to accommodate a large unrelated source face.
func DecodeLayoutArtifact ¶ added in v0.0.18
func DecodeLayoutArtifact(encoded []byte, admission LayoutAdmission) (Layout, error)
DecodeLayoutArtifact admits compiler-authoritative layout data after exact whole-child catalog hash/size verification. It validates bounded records, arrays, rectangles, references and finite fields, without rediscovering source surfaces, proving chart coverage/overlap or reconstructing authored geometry.
type LayoutAdmission ¶ added in v0.0.18
type LayoutAdmission struct{ SectorCount, SolidCount int }
LayoutAdmission supplies accepted root array bounds for compiled lightmap references. Geometry digest equality and the receiver selection's equality to its parent chunk descriptor are direct metadata checks performed by the host.
type LightingProbe ¶ added in v0.0.19
type LiquidTile ¶ added in v0.0.19
LiquidTile preserves an original geometry cell inside a larger loading unit. Clips cover the whole selection rectangle exactly, with no positive overlap.
type OfflineBakeInputs ¶
type OfflineBakeInputs struct {
Samples, Bounces int
Seed uint64
ReflectanceSHA256 string
RGBMRange float64
Denoise string // empty/off, low or medium; encoded in the producer identity
MaxRayDistance float64 // zero is unbounded; positive selects producer revision 5
}
OfflineBakeInputs identifies the public deterministic CPU producer. Worker count is deliberately absent: changing parallelism must not change pixels.
type Options ¶
type Options struct {
TexelsPerUnit float64
PageSize, Padding, MaxPages, MaxTexels int
Light string
Lights []string
// AllStatic selects every fixed source without a nonzero emission pulse.
// It is build policy, not an additional runtime wire field.
AllStatic bool
ShadowSize int
// CapsWithinSourceRoom prevents cap charts from spanning authored room or
// prefab-instance boundaries, while retaining efficient cap merging inside
// each room. It is optional build policy; canonical layouts remain unchanged.
CapsWithinSourceRoom bool
// CompactPacking uses bounded free-rectangle packing and optional 90-degree
// chart turns instead of default shelves. Density and limits are retained.
CompactPacking bool
}
type PrebakeManifest ¶
type PrebakeManifest struct {
Schema string
Algorithm int
Encoding string
LayoutSHA256 string
BakeSHA256 string
ImageSHA256 string
ImageBytes int
Width int
Height int
RGBMRange float64
Producer string
Samples int
Bounces int
Seed uint64
ReflectanceSHA256 string
SurfaceSHA256 string
// MaxRayDistance is present on the wire only for bounded producer revision
// 3. Zero retains the exact unbounded revision-1/2 manifest bytes.
MaxRayDistance float64
}
PrebakeManifest binds one completed direct RNM image to exact layout and selected lighting inputs. Its canonical binary is the public manifest entry.
func DecodePrebakeManifest ¶ added in v0.0.12
func DecodePrebakeManifest(encoded []byte) (PrebakeManifest, error)
DecodePrebakeManifest inspects a bounded canonical binary manifest without decoding pixels. Full layout, source and image identity requires DecodePrebake.
type PrebakePair ¶
type PrebakePair struct {
Manifest PrebakeManifest
Image []byte
}
PrebakePair retains caller ownership of Image; consumers clone it before publication. It is not the wire format: levels carry two fixed data entries.
func DecodePrebake ¶
func DecodePrebake(encoded, image []byte, layout Layout, document *world.Document) (PrebakePair, error)
DecodePrebake rejects malformed binary fields before returning a completely validated pair. Image remains borrowed; JSON and trailing data are rejected.
func DecodePrebakeArtifact ¶ added in v0.0.18
func DecodePrebakeArtifact(encoded, image []byte, layout Layout) (PrebakePair, error)
DecodePrebakeArtifact admits a compiled RNM manifest and image after exact whole-artifact catalog integrity checks. Layout must already be admitted. It validates manifest shape, layout/image identity, complete bounded QOI and dimensions/range, without reconstructing geometry or authored bake inputs. Image remains borrowed and must stay immutable throughout pair publication.
func NewOfflinePrebake ¶
func NewOfflinePrebake(layout Layout, document *world.Document, image []byte, inputs OfflineBakeInputs) (PrebakePair, error)
NewOfflinePrebake binds a combined direct/indirect image to transport inputs. Format validation verifies identity and QOI integrity, not solver quality. ReflectanceSHA256 commits original decoded albedo; the CLI verifies it against source before packaging. Hosts can verify surface identity, but do not possess those original source images and cannot independently rehash their pixels.
func NewPrebake ¶
NewPrebake validates a completed raw linear RGBM QOI atlas and derives its identity. It neither decodes pixels nor imports runtime or filesystem code.
type ProbeDirect ¶ added in v0.0.19
type ReceiverSelection ¶ added in v0.0.12
ReceiverSelection scopes an atlas to global sector/solid identities. The complete ordinary physical component remains the transport context.
type RuntimeBake ¶
type Surface ¶
Surface describes actual receiver polygons before triangulation. Empty Polygons explicitly describes a fully open portal wall or sky ceiling.
type SurfaceSelection ¶ added in v0.0.19
type SurfaceSelection struct {
// LiquidEdgeStep anchors all spatial water boundaries to one world XY grid.
LiquidEdgeStep float64
// LiquidMaxSubdivisions is an explicit geometric detail cap, not lighting density.
// Zero preserves normal error-based tessellation; nonzero values are 1..32.
LiquidMaxSubdivisions int
LiquidTiles []LiquidTile
Bindings []Binding
Clip *[4]float64
}
SurfaceSelection explicitly selects complete source faces, or their common XY rectangle. Transport remains the entire ordinary physical component. Bindings are in source discovery order and have Chart=-1. Missing bindings mean delegated/replaced geometry only under a versioned root ownership table.
func DecodeSurfaceSelection ¶ added in v0.0.19
func DecodeSurfaceSelection(data []byte) (SurfaceSelection, error)
type TerrainPatchLighting ¶ added in v0.0.19
TerrainPatchLighting stores three directional RGB coefficients per exact CompilePatch vertex. Vertices use TerrainLightingBasis for their RNM frame.
Source Files
¶
- binary.generated.go
- compile.go
- environment_artifact.go
- environment_variants.go
- fixed.go
- fixed_binary.go
- fixed_compact.go
- fixed_sources.go
- fixed_terrain.go
- influence.go
- layout.go
- layout_artifact.go
- offline.go
- packing.go
- prebake.go
- prebake_artifact.go
- receivers.go
- runtime_scope.go
- selection.go
- selection_binary.go
- selection_tiles.go
- static.go
- surfaces.go
- validate.go