dymokomi/luce-render
Source of release 0.1.2
0.1.2 / src / render / module.lucb
#==============================================================================================
#
# render - A spectral GPU path tracer
#
# DESCRIPTION:
# luce-render turns a luce-geocore GeometrySet (meshes, instances, and the scene
# component's cameras and lights) into GPU buffers and traces it with compute
# kernels on luce-gpu. There is no CPU renderer: the host only compiles the scene
# and records passes. See docs/DESIGN.md.
#
# Fragments, in ORDER:
#
# module.lucb imports and error codes
# scene.lucb CompiledScene: world-space triangles, faces and scene objects
# bvh.lucb a binned-SAH BVH over boxes (triangles, splats), in the kernels' node layout
# splats.lucb Gaussian splat clouds packed for ray tracing (3DGRT), with their BVH
# camera.lucb a camera's primary-ray frame for a resolution
# device.lucb GpuScene, the scene's buffers, and the primary-ray probe
# spectrum.lucb color matching, spectral fits of colors, blackbodies, film matrix
# environment.lucb a dome light's image, read and prepared for sampling by importance
# shader_graph.lucb materials' node graphs compiled into programs for the kernels
# textures.lucb materials' textures (PNG, JPEG, OpenEXR) and programs
# lights.lucb UsdLux lights packed for the kernels
# materials.lucb OpenPBR Surface parameters packed for the kernels
# light_tree.lucb the light tree over lights and emissive triangles
# integrator.lucb Renderer: the wavefront path tracer's passes
# loading.lucb what a renderer loads besides geometry: lights, materials, constants, kernels
# session.lucb RenderSession: a progressive render a Luce application shows
# kernels.lucb the GLSL kernels, embedded (tools/build_kernels.py; do not edit)
# tests.lucb tests of the host side
#
#==============================================================================================
import c
import memory
import interop
import thread
from luce_std import clock
from luce_std import math
from luce_std import math32
from luce_std import parallel
from luce_std import files
import strings
from luce_exr import exr
from luce_png import png
from luce_jpeg import jpeg
from luce_raster.model import Raster
from luce_raster.binary import to_half
from luce_geocore.geocore import Vector3, Matrix4, Mesh, MeshPrimitives, GeometrySet, SceneObject, SceneKind, Camera, Projection, LightShape
from luce_geocore.kernel import Float3, append_text, Instances, Component, SceneObjects, Materials, MaterialParameter, mesh_component, instances_component, scene_flattened, materials_flattened
from luce_geocore.kernel import IdSet, AttributeStore, Attribute, points_component, set_cloud, cloud_store, cloud_positions, cloud_origin, set_detail
from luce_geocore.splats import Quat, Floats, ColorSpace, point_floats, is_splat_store, sh_attribute, sh_items, sh_frame, detail_color_space, from_linear
from luce_geocore.splats import placed_point_store, orient_name, scale_name, opacity_name, color_name, restorient_name
from luce_geocore.core.growing import Growing
from luce_gpu import gpu
## Errors: an unusable input (no camera, no pixels), and a scene past a limit.
pub let invalid: ErrorCode = ErrorCode.package(400)
pub let limit: ErrorCode = ErrorCode.package(401)