All notable changes to three-rs are documented here. sdf-text and
three-rs-controls, the other crates in this workspace, version separately and
have their own sections after the release they ship with. The format follows Keep a Changelog.
webgpu_portal(graded, 77 of 100000; #351): a plane whose colour ispass( scenePortal, camera ).context( { getUV: () => screenUV } )— a second scene, with its ownbackgroundNode, rendered inside the main render and read at the screen position.PassNode::sample( coord )is the port's spelling of that context, a second tap on the pass's output at the caller's uv (texture()fixes its uv when the tap is made; #352 is the general fix).
- One
Renderer::render, whatever holds the camera (#356):rendertakes&Sceneand anyIntoSceneCamera—&mut cameraas before, or&camerafor theRc<RefCell<_>>a page gave topass( scene, camera ). A page whose main render shares its camera with a pass (webgpu_portal) passes theRcit has; therender_sharedthe portal branch added for that, and the crate-internalrender_nested, are gone. A shared camera that is borrowed by anything other than an outer render of the frame now panics atrender()with a message, instead of inside a pass's draw.render(&mut scene, &mut camera)still compiles; clippy'sunnecessary_mut_passedasks for&scene.docs/api.mddecision 14.
steady_frame_builds_nothingoverflowed its stack in a debug build (#344): the e2e test's 115rung!expansions shared one stack frame, and a debug build keeps every expansion'sAppand strip in its own slot, so the frame was the sum of every page's renderer. Each rung now runs in its own#[inline(never)]frame and is dropped before the next page is built.cargo test --workspace --no-fail-fastpasses without the release-mode second run of the e2e target thatdocs/RELEASING.mdcarried since #339.
0.3.0 - 2026-10-05
Ships with sdf-text 0.3.0 and three-rs-controls 0.2.0; their sections
follow this one. Breaking: see Changed, starting with the ObjectRef rename.
-
Animation mixer events (#326):
MixerEvent(Loop { action, loop_delta },Finished { action, direction }) andAnimationMixer::take_events(). The mixer used to perform three's'loop'and'finished'state changes and drop the notifications; it now queues them fromAnimationAction._updateTimeat three's three dispatch points, so a caller learns that an action looped or finished by draining the queue afterupdate()instead of pollingtimeandloop_count.update()clears what the previous update queued.docs/api.mddecision 12 says why it is a queue and not listeners;tests/animation_animation_action.rsnow ports 'StartAt when already executed once', which drives the action from a'finished'handler. -
Scene-graph events (#159, #153 option C):
SceneEvent(Added,Removed,ChildAdded(child),ChildRemoved(child)),SceneEventType, andObjectRef::add_event_listener/has_event_listener/remove_event_listener/dispatch_event, with an opaqueListenerHandlestanding for the listener.ObjectRef::add,remove(and soclearandremove_from_parent) andattachdispatch at three's points and in three's order. Dispatch copies the list first, so a listener may remove itself.tests/core_event_dispatcher.rsportsEventDispatcher.tests.js;tests/core_object3d.rschecks the dispatch from the tree methods. No string-keyed dispatcher:docs/api.mddecision 12 says why. -
on_before_render/on_after_render(#159):Option<Box<dyn ...>>fields onObject3D(ObjectRenderHook:FnMut(&ObjectRef, &Renderer, &Scene, &dyn RenderCamera, Option<&Group>)) and onScene(SceneRenderHook:Fn(&Renderer, &Scene, &dyn RenderCamera, Option<&RenderTarget>)), withset_on_before_render/set_on_after_rendersetters. The renderer calls them in_renderScene()'s order on every scene render (docs/api.mddecision 12);tests/renderer_render_hooks.rs(GPU) checks the order and the arguments.LightProbeHelpernow installs three'sonBeforeRender()as its hook, sowebgpu_lightprobeandwebgpu_lightprobe_cubecamerano longer callhelper.update()each frame (pixel counts unchanged). -
dispose()(#159): documented no-op aliases forDroponTexture,CubeTexture,DataTexture,Data3DTexture,DataArrayTexture,DepthTexture,CubeDepthTexture,RenderTarget,CubeRenderTarget,MeshBasicNodeMaterial(dispose(self)) andBufferGeometry(dispose(self: Rc<Self>)), so three.js code ports line for line. -
The renderer's cache window is a documented contract (#249,
docs/api.mddecision 13): the renderer forgets what it has not drawn for four frames. A thumbnail, an on-demand preview or a timer-driven view drawn less often than every fourth frame rebuilds its programs, buffers and bind groups on each draw. The behaviour is unchanged; a configurable window and eviction by liveness stay open if a consumer needs them. -
KHR_materials_iridescenceandwebgpu_loader_gltf_iridescence(graded, 0 pixels; #229): the thin-film half ofPhysicalLightingModel(evalIridescenceas a WGSLfnwith its early return andm <= 2loop,evalSensitivity,Fresnel0ToIor/IorToFresnel0, the iridescent F0scomputeMultiscatteringblends towards, andBRDF_GGX'sUSE_IRIDESCENCEmix), theiridescence*material fields and theirmaterialIridescence*/Iridescence*TSL nodes, and the glTF extension. Gated bygltf_iridescence_lamp_matches_threeagainst three's dump of the page,tests/gltf_loader.rs'siridescence_lamp_materialsand the e2e rung. The page's auto-rotating camera turns three times before the screenshot, as three's does (docs/nodes.md §95). -
webgpu_loader_gltf_transmission(graded, 6 of 100000 pixels; #230):IridescentDishWithOlives.glbunder the blurredroyal_esplanadePMREM, ported forward fromrung-gltf-transmissionnow that the Draco decoder has landed. The ladder's first graded frame of two stacked transmissive materials over one opaque copy, athicknessTexture, aspecularColorTexture, glTFCOLOR_0, anAnimationMixeron a non-skinned node and an auto-rotatingOrbitControlsupdated with no delta. The gold leaf'salphaMode: MASKis gated against three's dump of the page as thematerialAlphaTestuniform (gltf_transmission_gold_leaf_alpha_test_matches_three; docs/nodes.md §94). -
webgpu_materials_transmission(graded, 16 of 100000): atransmission: 1,DoubleSideglass sphere with a stripedalphaMapin front of the royal esplanade. It is the ladder's direct test of the transmission path.tests/nodes_transmission_wgsl.rsgates both halves of the split against three's dump (#228;docs/nodes.md§96). -
webgpu_postprocessing_ssr_denoise(ungraded: three's own e2e exception list): the stochasticssr(),temporal_reproject()andrecurrent_denoise()in a history loop, added to the beauty, graded and resolved bytraa()andsharpen().MeshBasicNodeMaterialgainsenvironment_specular, the page'sindirectSpecularpatch, andnodes::tslgainsmaterial_metalness_value()/material_roughness_value(), the map-resolved values the page writes to its MRT. The floor material and the SSR, denoise, grading and sharpen quads are gated against three's dump of the page, andtests/ssr_denoise_frames.rschecks the chain converges in place. Also fixed on the way: the recurrent denoiser allocates its target before its input reads it, a struct-typed var declares its struct, andsaturation()shares its.rgbas three does (docs/nodes.md §89). -
Typed
BufferAttributes (#294): an attribute's array is aTypedArrayof any of three's nine kinds (Int8toFloat64, plusFloat16), with anormalizedflag,get/setaccessors that decode and encode like three's, andInterleavedBuffer/InterleavedBufferAttributeviews over a shared stride. The vertex-inputformat()follows three's table (tests/core_vertex_format.rs, 144 rows), non-normalized 8/16-bit attributes are widened to 32-bit on upload ascreateAttribute()does, and the renderer's program key carries the geometry's attribute layout.StorageBufferAttributebacksstorage()over a typed array.BufferGeometryLoaderreads typed and interleaved attributes;LineSegmentsGeometrycarries three's interleaved instanced views, so Line2's vertex inputs match three's fat-lines WGSL. Skinning,BatchedMeshandcomputeVertexNormals()read and write through the typed accessors. WGSL dumps are gated intests/nodes_typed_attributes.rs, the GPU path intests/renderer_typed_attributes.rs. See the module doc ofcore::buffer_attributefor the design note. -
Clipping planes through
ClippingGroup(objects), a port ofClippingGroup.jsandClippingContext.js: a group'sclipping_planesclip every descendant, as a union or, withclip_intersection, an intersection, nested groups combine, andclip_shadowscarries them into the shadow passes.NodeMaterial.setupClipping()/setupHardwareClipping()push three'sclipping(),clippingAlpha()(alpha-to-coverage edges under MSAA) orhardwareClipping()(WGSLclip_distances, on an adapter withCLIP_DISTANCES). All three modes are gated against three's WGSL intests/nodes_clipping_wgsl.rs. Seedocs/nodes.md§6. -
Stencil state on materials:
stencil_write,stencil_func,stencil_ref,stencil_func_mask,stencil_write_mask,stencil_fail,stencil_z_failandstencil_z_pass(StencilFunc,StencilOp), andcolor_write, as pipeline state per draw. They take effect on a renderer created withRendererParameters::stencil, whose depth buffer is thendepth24plus-stencil8. -
webgpu_clippingandwebgpu_clipping_stencil, graded green at 17 and 0 of 100000 pixels, in the steady-frame strip, the native viewer and the browser shell. -
The core helpers (
helpers, #300):AxesHelper,ArrowHelper,BoxHelper,Box3Helper,PlaneHelper,PolarGridHelper,DirectionalLightHelper,HemisphereLightHelper,PointLightHelper,SpotLightHelperandSkeletonHelper, ports ofsrc/helpers/. Each keeps three's geometry, material, flags and child transforms, andtests/helpers_core.rscompares all of them node for node against three's own classes under node (tools/helpers_reference.mjs, 24 scenarios).Box3Helper,PlaneHelperandSkeletonHelper'supdateMatrixWorldoverrides are an explicitupdate_matrix_world(force)the caller runs each frame; see thehelpersmodule docs. -
ssr()'s stochastic path (nodes::display):SsrOptionsgainsstochastic,reflect_non_metals,environment,env_importance_sampling,diffuseandbinary_refine, andSsrNodegainsset_env_map,set_history,render_targetand the mirror-bias, screen-edge-fade and environment-intensity uniforms. This ports the rest ofexamples/jsm/tsl/display/SSRNode.js: GGX-sampled rays jittered by a per-frame noise index, binary refinement, the environment fallback on a miss and the multi-bounce history. The three SSR quads oftools/dump-pages/ssr_stochastic.htmlare gated against three's dump intests/nodes_display_wgsl.rs, andtests/ssr_stochastic_frames.rschecks a mirror floor's reflection. Seedocs/nodes.md§65.3. -
temporal_reproject(nodes::display), a port ofexamples/jsm/tsl/display/TemporalReprojectNode.js, the temporal stage ofwebgpu_postprocessing_ssr_denoise's denoiser. It reprojects a history along the velocity attachment with a depth- and normal-weighted 4-tap fetch, clips it to the neighbourhood's YCoCg variance box, and writes1 / frameCountin alpha. It covers both modes (Specularadds the parallax hit-point history),accumulate,set_history_texture(), and themax_frames,hit_point_reprojection,clamp_intensityandflicker_suppressionuniforms asSettableValues. The seed quad and both resolve quads are gated against three's dump intests/nodes_display_wgsl.rs, andtests/temporal_reproject_frames.rschecks the history on the GPU. Seedocs/nodes.md§87. -
taau(nodes::display), a port ofexamples/jsm/tsl/display/TAAUNode.js: temporal anti-aliased upsampling of a reduced-resolution scene pass to the drawing buffer's size, with the pagewebgpu_upscaling_taauin the native viewer. The page is ungraded: three.js misses its own reference on this machine (540 of 100000 pixels), and the port scores 539, so its e2e rung is ignored. The seed and resolve quads are gated against three's dump, andtests/taau_frames.rschecks the node on the GPU. TheTAAUtils.jshelpers it shares withtraanow live in one crate-private module. Seedocs/nodes.md§90. -
ImportanceSampledEnvironmentandEnvMapCdfGenerator(nodes::display), with the SpecularHelpers microfacet helpers (d_gtr,ggx_reflection_sample,mis_power_heuristic, …) andbind_analytic_noiseinnodes::tsl. These portexamples/jsm/tsl/display/ImportanceSampledEnvironment.js,tsl/utils/SpecularHelpers.jsandtsl/utils/RNoise.js: the CPU luminance CDF tables and the reflect, BRDF and MIS environment lookups the SSR-denoise stack shares. The WGSL is gated against three's dump oftools/dump-pages/specular_helpers.htmlintests/nodes_display_wgsl.rs, and the CDF tables by a hand-computed 4×2 unit test. -
WaterMesh(addons::objects), a port ofexamples/jsm/objects/WaterMesh.js: a planarreflector()distorted by four scrolling taps of a normal map, with a sun highlight and a Fresnel mix into the water colour. Every uniform is a publicSettableValue.webgpu_oceanis graded green at 0 of 100000 pixels, and the material's WGSL is gated against three's dump intests/nodes_water_wgsl.rs. -
Water2Mesh(addons::objects), a port ofexamples/jsm/objects/Water2Mesh.js: two normal maps scrolled along a flow direction or a flow map and cross-faded on a half cycle, with a Fresnel mix of a refraction (viewportSharedTexture( viewportSafeUV() )) and a planarreflector().flowConfigadvances by the frame's delta time in the node'supdateBefore. Every uniform is a publicSettableValue. Both flow branches' WGSL is gated against three's dumps intests/nodes_water_wgsl.rs, andtests/water2_frames.rschecks the flow, the refraction and the tint on the GPU.examples/webgpu_water.rsports the page. Three's e2e skips the page, so it has no rung; scored informally, its first frame is 0.006% off three's screenshot. Seedocs/nodes.md§83. -
transmission_mapon materials, three'stransmissionMap: its red channel multipliestransmission. The glTF loader readsKHR_materials_transmission.transmissionTextureinto it. -
ReflectorNode::add_target_on_setup(): adds the mirror'stargetto an object just before the reflector's first update, which is when three runs anadd()written inside a material'sFn(). Seedocs/nodes.md§76. -
nodes::display::sss(SssNode), a port ofSSSNode.js. It casts screen-space shadows by marching a ray from each pixel towards one light through a depth pre-pass.maxDistance,thickness,shadowIntensityandqualityareSettableValues, andset_resolution_scaleandset_use_temporal_filteringstand in for three's properties. Its shader is gated against three's dump intests/nodes_display_wgsl.rs, and its frames intests/sss_frames.rs. Seedocs/nodes.md§71. -
builtinShadowContext:PassNode::set_context_shadow( shadow, &light )multipliesshadowinto that light's colour, after its shadow-map factor, for every draw the pass makes where the light's shadow map applies.clear_context_shadow()removes it. The page's ground material, with the context, is gated against three's dump. -
webgpu_postprocessing_sss, the page: a depth and velocity pre-pass, SSS from the directional light with temporal filtering, and TRAA resolving the scene pass. It is in three's e2e exception list, so it is in the native viewer and not graded. -
ssgi()/SsgiNode(nodes::display), a port ofexamples/jsm/tsl/display/SSGINode.js. It is screen space global illumination with a visibility bitmask, and writes an AO and a one-bounce GI texture. Every option is a publicSettableValue, andset_use_temporal_filtering()is three's property. The SSGI shader, the page's composite and its TRAA resolve are gated against three's dump intests/nodes_display_wgsl.rs, andtests/ssgi_frames.rschecks the frames, the three boolean options included.webgpu_postprocessing_ssgiis ported, ungraded because three's e2e harness skips it, and in the viewer. An arbitrarynormalNode,normalNode = null, a logarithmic depth buffer, theSSGI.AOname,contextNodeanddispose()are not ported. WithoutRG11B10UFLOAT_RENDERABLEthe effect fails, as three's does. -
The renderer requests
RG11B10UFLOAT_RENDERABLEwhen the adapter has it. -
nodes::display::ao(GtaoNode), a port ofGTAONode.js: ground truth ambient occlusion from a depth and a packed-normal pre-pass, withradius,thicknessandscaleasSettableValues andset_samples,set_resolution_scaleandset_use_temporal_filteringas three's properties. Its shader is gated against three's dump intests/nodes_display_wgsl.rs, its frames intests/gtao_frames.rs. Seedocs/nodes.md§64. -
builtinAOContext:PassNode::set_context_ao( node )multiplies an occlusion into every non-transparent material the pass draws, through the sameAmbientOcclusionproperty anaoMapwrites (SetupContext::ambient_occlusion). Basic, Lambert, Phong, Toon, Standard and Physical read it. -
webgpu_postprocessing_ao, the page: a normal + velocity pre-pass, GTAO at half resolution with temporal filtering, and TRAA resolving it. It is in three's e2e exception list, so it is in the native viewer and not graded. -
tsl::depth_texture_gather(texture( depth ).gather()), with the non-filtering sampler binding a gathered depth texture needs;tsl::get_screen_position_from_clip;TraaNode::set_use_subpixel_correction. -
Texture wrapping on
textureLoad: an unfilterable (NearestFilter) texture is read through three'stsl_coord_<S>S_<T>T_2dwrap function built from itswrapS/wrapT, instead of always clamping. -
TransformControls(addons::controls), a port ofexamples/jsm/controls/TransformControls.jsas of the pinned 5f610f5 (r187dev): the translate, rotate and scale gizmo with the same picker, gizmo and helper graph, the same drag math, snaps and limits, and perspective and orthographic cameras. Pointer input arrives as method calls (on_pointer_down,pointer_hover, …), events are returned asVec<TransformControlsEvent>, and the host callsupdate(camera)where three's renderer runs the helper's matrix update.toneMapped: falseis dropped, andenabled,show*andmin*/max*are plain fields that send no events.tools/transform_controls_reference.mjsruns three's class under node through 17 scenarios and writestests/fixtures/transform_controls.json;tests/addons_transform_controls.rsreplays them and matches every event, transform, handle state and working vector to 1e-9, and compares the gizmo graph node for node. Seedocs/controls.md. -
FirstPersonControlsandFlyControls(addons::controls), ports ofexamples/jsm/controls/FirstPersonControls.jsandFlyControls.jsas of the pinned 5f610f5 (r187dev), with the same fields, defaults andupdate( delta ). Input arrives as method calls (pointer_down,pointer_move,key_downwith a newKeyCode, …) rather than DOM listeners, the camera is passed toupdateas a&ObjectRef, and Fly'schangeevent isupdate's return value.tools/first_person_controls_reference.mjsandtools/fly_controls_reference.mjsrun three's own classes under node over scripted input and writetests/fixtures/first_person_controls.jsonandfly_controls.json;tests/addons_first_person_controls.rsandtests/addons_fly_controls.rsreplay the scripts and match every camera position and quaternion to 1e-9. Seedocs/controls.md. -
TSL sweep 1: the last absent
three/tslmath names and nine texture utilities (texture_bicubic_levelis now public), each gated against three's own WGSL dump intests/nodes_tsl_batch.rs.- Packing:
pack_snorm_2x16,pack_unorm_2x16,pack_half_2x16,pack_snorm_4x8,pack_unorm_4x8and the five matchingunpack_*, which print WGSL'spack2x16snormfamily. - Packed 4x8 integers:
pack_4x_i8,pack_4x_u8,pack_4x_i8_clamp,pack_4x_u8_clamp,unpack_4x_i8,unpack_4x_u8,dot_4u8_packedanddot_4i8_packed. These print the native builtins. Three's emulation for devices withoutpacked_4x8_integer_dot_productis not ported. any(function and method),transform_normal_by_view_matrix,transform_normal_by_inverse_view_matrix, and the deprecated spellingsfaceforwardandinversesqrt.allalready existed; it is now gated.- Textures:
equirect_direction,matcap_uv,max_mip_level,spritesheet_uv,triplanar_textures,texture_bicubic,texture_bicubic_level,texture_3d_loadandtexture_3d_level. The functions that take a texture node in three take theTexturehere, astriplanar_texturealready did.
- Packing:
-
TSL sweep 2: thirty-one
three/tslaccessors, each gated against three's own WGSL dump intests/nodes_tsl_batch.rs. Seedocs/nodes.md§67.- Tangent frame:
bitangent_geometry,bitangent_local,bitangent_world,tangent_world, andtangent_geometryandtangent_local, now public. Alsoparallax_directionandparallax_uv. - Camera:
camera_normal_matrix.camera_nearandcamera_faralready existed and are now gated. - Model and object:
model_direction,model_position,model_scale,model_view_positionandmodel_radius, plus theobject_*forms of each, which take the target&ObjectRef. Alsomediump_model_view_matrix,highp_model_view_matrixandhighp_model_normal_view_matrix. transform_normal(function and method),transform_normal_to_view,reflect_view,refract_view,refract_vectorandclip_space.material_refraction_ratio, with a newMeshBasicNodeMaterial::refraction_ratio: 0.98 fromnew,lambertandphong, whose three.js materials haverefractionRatio, and 0 from the other constructors.reflect_vectoris now cached per normal, likerefract_vector.object_directionrefreshes the target's world matrix and negates a camera's direction, asgetWorldDirection()does.- A geometry without a
tangentattribute no longer fails to draw when the material reads the tangent in the vertex stage. The attribute becomes three'svec4( 0, 0, 0, 1 )constant, with three's warning. clip_spacewarns and yieldsvec4()outside the fragment stage.webgpu_tsl_raging_seauses the crate'stransform_normal_to_viewin place of its local helper.
- Tangent frame:
-
TSL sweep 3: twenty-nine display, lighting and material
three/tslnames. Every shader-building addition is gated against three's own WGSL dump intests/nodes_tsl_batch.rs;get_texture_index, a CPU helper, is unit-tested only. Divergences are recorded indocs/nodes.md§68.- Depth:
view_z_to_reversed_orthographic_depth,orthographic_depth_to_view_z,view_z_to_reversed_perspective_depth,view_z_to_logarithmic_depthandlogarithmic_depth_to_view_z. - Colour:
blend_burn,blend_dodge,blend_screen,blend_color,vibrance,cdlandcineon_tone_mapping.ToneMapping::Cineonselects it as a material or pass tone mapping, asCineonToneMappingdoes. - Screen:
get_screen_position,get_normal_from_depth,viewport_coordinateandviewport_uv.screen_sizealready existed and is now gated.direction_to_face_direction, three's deprecated alias ofnegateOnBackSide, takes the material side as a parameter. - Passes:
depth_pass( scene, camera ), whose node is the scene's linear depth (PassNode::afollows it), andPassNode::linear_depth_node.nodes::get_texture_indexis the MRT name lookup; it takes attachment names and returns anOption. - Lighting:
light_projection_uv,direct_point_light(returns the( lightDirection, lightColor )pair) andget_parallax_correct_normal.shadow_matrix( i )now returns one shared node per light, as three'slightShadowMatrixdoes. The renderer now refresheslight.shadow.matrixevery render for a light whose shadow is not rendered (cast_shadoworshadow_map_enabledoff), aslightShadowMatrix's render update does, solight_projection_uvfollows a light that casts nothing. - Material:
material_normal,material_clearcoat_normal,material_specular_strength,material_light_mapandmaterial_ao. Each takes the material it reads the maps from;material_normalandmaterial_clearcoat_normalalso read itssideandflat_shading. Alsomaterial_point_sizeandpoint_width. NewMeshBasicNodeMaterialfields:light_map,light_map_intensity(default 1),specular_mapandsize(default 1). The material flows do not applylight_maporspecular_map; the renderer warns once per material that only the accessors read them, andcheck_supported()does not fail on them.
- Depth:
-
TSL sweep 4: the
three/tslutils names. Each one that emits WGSL is gated against three's own dump intests/nodes_tsl_batch.rs. Seedocs/nodes.md§70.- Context:
uniform_flowmakes a two-branchselect()print WGSL'sselect().set_namenames the first uniform built under it, unless that uniform has a name of its own; either way the name is used up.labelis three's deprecated alias ofset_name. MaterialX'smx_selectandmx_negate_ifnow useuniform_flow, with byte-identical output. - The method
NodeRef::set_name(andlabel) on a uniform renames it in place and returns it, as three'sUniformNode.setName()does.UniformNode::nameis now aCell. bypass,vertex_stage(methodto_vertex_stage),unpack_normal,unpack_rgb_to_normal,expression( snippet, type ),debugwith an optionalDebugCallback,samplewith itsSampleNodehandle, and rawwgsl( code, includes )for awgsl_fn's includes.direction_to_colorandcolor_to_directionare ported as three's deprecated aliases.- Event hooks:
on_object_update,on_material_update,on_frame_update,on_after_object_update,on_before_object_update,on_before_material_updateandon_before_frame_update. Each is avoidnode attached with.bypass(). Its callback runs in three's update phase and receives theRenderer.
- Context:
-
TSL sweep 5: lighting and material
three/tslnames, innodes::tsl. Each one that emits WGSL is gated against three's own dump intests/nodes_tsl_batch.rs. Seedocs/nodes.md§78.material_anisotropy( material ). The physical material's anisotropy setup now reads it, and its WGSL is unchanged.d_ggx_anisotropic,v_ggx_smith_correlated_anisotropicandschlick_to_f0. These are standalone: the physical lighting still evaluates only the isotropic lobe.ltc_uv,ltc_evaluateandltc_evaluate_volume. These are standalone too, because there is noRectAreaLight.lights( indices )buildsMeshBasicNodeMaterial::lights_node.webgpu_lights_selectiveuses it.
-
TSL sweep 6: the compute, storage and subgroup
three/tslnames, innodes::tsl, each gated against three's own dump intests/nodes_tsl_batch.rs. Seedocs/nodes.md§84.- The subgroup family:
subgroup_add,subgroup_mul,subgroup_and,subgroup_or,subgroup_xor,subgroup_minandsubgroup_maxwith their inclusive and exclusive scans where three has them,subgroup_all,subgroup_any,subgroup_ballot,subgroup_elect,subgroup_broadcast_first,subgroup_broadcast,subgroup_shuffleand its_xor/_up/_downforms,quad_swap_x/_y/_diagonalandquad_broadcast. Also the builtinssubgroup_size,subgroup_indexandinvocation_subgroup_index. A stage that uses any of them getsenable subgroups;. The renderer requestswgpu::Features::SUBGROUPwhen the adapter has it. Without the feature, a subgroup kernel or a material whose fragment stage uses subgroups logs three's message and is skipped. - Known gaps: naga 30 cannot parse
subgroup_elect, and accepts onlyu32ids forsubgroup_broadcast,subgroup_shuffleandquad_broadcast. Three cannot buildquadBroadcastat all; the port takes the id it needs. attribute_array: theStorageArraywhoseto_attribute()steps once per vertex rather than once per instance.storage_element,atomic_func(public now, under three's name) andtexture_barrier.storage_texture_3dis now gated.
- The subgroup family:
-
SkyMesh(addons::objects), a port ofexamples/jsm/objects/SkyMesh.js. It is the Preetham daylight model with a sun disc and an fbm cloud layer. Every uniform is a publicSettableValue.webgpu_skyis graded green at 0 of 100000 pixels, and its WGSL is gated against three's dump intests/nodes_sky_wgsl.rs. -
CubeCameraandCubeRenderTarget:new CubeCamera( near, far, renderTarget )andupdate( renderer, scene )render the scene into a cube's six faces.activeMipmapLevelis not ported. -
tsl::to_var_intent(), the assigned form of three'stoVarIntent(). It is a function-scopevardeclared where it is first built. Seedocs/nodes.md§59. -
LightProbe, a light holding nine spherical-harmonic coefficients (SphericalHarmonics3) that addsgetShIrradianceAt( normalWorld )to a lit material's irradiance and nothing to its radiance, through the samesetupLightfunnel as the other lights, so Standard, Physical, Phong, Lambert, Toon and custom lighting models all take it. The coefficients ride a per-draw uniform array premultiplied by the intensity, so changing them rebuilds nothing.tsl::get_sh_irradiance_atis the TSL function. -
addons::lights::LightProbeGenerator:from_cube_textureprojects an RGBA8CubeTexture's decoded faces on the CPU,from_cube_render_targetreads a rendered cube back (RGBA8 or half float) and projects that. Both are checked against three's ownLightProbeGenerator.js, the first under node (tools/light_probe_generator_reference.mjs), the second against the first on the same environment. -
addons::helpers::LightProbeHelper, a sphere showing a probe's irradiance over π. -
Rungs
webgpu_lightprobeandwebgpu_lightprobe_cubecamera. The second is native only for now: its readback blocks, which the browser cannot do, sotools/web_gate.skip(new) lists it. -
Screen reads (#169):
viewportSharedTexture,viewportTexture,viewportDepthTexture,viewportLinearDepthandviewportSafeUV, thescreenSizeandscreenCoordinatescopes, and thecameraNearandcameraFaruniforms. The renderer copies the framebuffer before the first draw that reads it, in three's opaque/transparent order. A pass that reads nothing is recorded as before. Seedocs/nodes.md§61. -
backdropNodeandbackdropAlphaNodeon node materials, a customlighting_modelincluded. A backdrop material goes in the transparent list. On a Normal material the field is loud (docs/api.mddecision 7). -
TSL
grayscale,posterizeandblendOverlay. -
webgpu_backdrop, graded green (23 pixels, the same as three's own frame).webgpu_refractionis ported, but not graded on this machine, because three.js itself fails its reference there. -
velocity(nodes::velocity): the screen-space motion since the last frame, as an MRT member, with three's previous-frame model, view and projection matrices. The history lives in the renderer'sNodeFrameState. Skinned meshes skinpositionPreviouswith last frame's bones when the MRT hasvelocity.Renderer::set_velocity_projection_matrix()isvelocity.setProjectionMatrix(). (#163) -
motion_blur(nodes::display),MotionBlur.js. (#163) -
webgpu_postprocessing_motion_bluris graded: 5 of 100000 pixels. Its graded frame has zero velocity, so it proves the page builds and composes.tests/velocity_frames.rschecks the motion on the GPU. (#163) -
traa(nodes::display),TRAANode.jswithTAAUtils.js: temporal reprojection anti-aliasing.TraaNode::attach()installs its camera jitter on aRenderPipeline, where three'ssetup()does it itself. Three's resolve dump gates the shader; three lists the page in its e2e exception list, so it has no graded rung.tests/traa_frames.rschecks it over sixteen frames. (#165) -
webgpu_postprocessing_traain the native viewer. (#165) -
Node graph pieces used by TRAA: struct values (
struct_new,struct_get),texture_load,texture_load_offset,depth_texture_load,all,view_z_to_perspective_depthandget_view_position. AlsoRenderer::init_render_targetandRenderPipeline::claim_view_offset. (#165) -
retro_pass(nodes::display),RetroPassNode.js: a scene pass at a quarter of the canvas, nearest-filtered, that draws classic materials with snapped vertices, level-0 textures and optional affine mapping. A node material is drawn as itself, as in three. Seedocs/nodes.md§79. -
The CRT effects of
CRT.js(barrel_uv,barrel_mask,color_bleeding,scanlines,vignette),circlefromShape.js, andbayer_ditherfromBayer.js. -
film,sepiaandbleach, fromFilmNode.js,Sepia.jsandBleachBypass.js. No three page uses them, so they are gated againsttools/dump-pages/film_sepia_bleach.html. Seedocs/nodes.md§80. -
tsl::replace_default_uvandMeshBasicNodeMaterial::context_node.texture()now takes its uv from agetUVin the build context, and agetTextureLevelmakes it sample at that level. -
PassNode::set_resolution_scaleand a crate-private per-draw render-object function onPassNode. -
glTF
KHR_materials_unlit: such a material loads as a basic material. -
webgpu_postprocessing_retroin the native viewer. three.js misses its own reference for the page on this machine (1503 of 100000 pixels), so its e2e rung is ignored. Three's dump gates its two post-processing shaders, andtests/retro_frames.rschecks the pass on the GPU. -
oit_pass(nodes::display),OITPassNode.js: weighted blended order-independent transparency. TransparentNormalBlendingmaterials accumulate into anrgba16float/r8unormpair that shares the pass's depth, and the composite does not depend on draw order.webgpu_oitis graded at 0 of 100000 pixels. Its shaders are gated against three's dump andtests/oit_frames.rschecks order independence on the GPU. Seedocs/nodes.md§82. -
BlendModeis public (materials), withBlendMode::new( blending )andFrom<Blending>.MrtNode::set_clear_color/clear_colorare three'ssetClearColor/getClearColor: a per-attachment clear value. -
RenderTarget::set_texture_name( 0, name )names the first attachment, which used to answer only tooutputand panic otherwise. -
StereoCamera(cameras), a port ofStereoCamera.js, andaddons::camera_utils::frame_corners,CameraUtils.frameCorners(). Both are checked against three's own code run under node (tools/stereo_camera_reference.mjs). -
The stereo display passes (
nodes::display):stereo_pass,anaglyph_pass(all sevenAnaglyphAlgorithms in all threeAnaglyphColorModes) andparallax_barrier_pass. The two composite quads are gated against three's dumps, andtests/stereo_frames.rschecks where each eye lands. Seedocs/nodes.md§81. -
webgpu_display_stereois graded: 0 of 100000 pixels. -
outline(nodes::display),OutlineNode.js: selection outlines, with visible and hidden edges,edgeThickness,edgeGlowanddownSampleRatio. Its two scene renders go through a crate-private renderer hook that stands in forsetRenderObjectFunction(). The depth and mask scene materials, the copy, edge-detection, X-blur and composite quads, and the page's output are gated against three's dump; the sprite depth and mask materials (the page has no sprites, so the dump has none) and the Y blurs (one module with the X blur in three) are not.tests/outline_frames.rschecks what a selection draws. -
webgpu_postprocessing_outlineis graded: 15 of 100000 pixels, the same as three's own frame. Nothing is selected in the graded frame. -
lut_3d(nodes::display),Lut3DNode.js, andtsl::texture_3d_sampled,texture3D( texture )with no level. -
LutCubeLoader,Lut3dlLoaderandLutImageLoader(loaders). Each is checked byte for byte against three's own loader, quirks included (tests/loaders_lut.rs). -
webgpu_postprocessing_3dlutis graded: 0 of 100000 pixels.tests/lut_3d_frames.rschecks intensity and table swaps. -
ObjLoader(loaders),OBJLoader.jsfor meshes:v,vn,vt,f,o,g,s,usemtlandmtllib.landpelements are refused. There is noMTLLoader. Checked against three's parse (tests/loaders_obj.rs). -
ssr(nodes::display),SSRNode.js: screen-space reflections, a march through the depth buffer with roughness taken from a blurred mip chain.stochastic,binaryRefine,reflectNonMetals,screenEdgeFadeBlack, multi-bounce history and orthographic cameras are not ported. Seedocs/nodes.md§65. -
smaa(nodes::display),SMAANode.js: SMAA 1x with colour edge detection, with three's area and search textures. -
webgpu_postprocessing_ssris graded: 4 of 100000 pixels, with the reflections in the graded frame. Its six fragment shaders are gated against three's dumps. -
webgpu_postprocessing_smaaandwebgpu_postprocessing_pixelare ported and in the native viewer, but not graded on this machine, because three.js itself fails their references there (258 and 405 pixels). The port scores the same 258 and 405, and differs from three's own frames in no graded pixel. -
Renderer::size(), three'srenderer.getSize(): the canvas size in logical pixels. -
Rendering into a mip level:
RenderTarget::set_mip_level_count(),Renderer::set_render_target_level()(three'ssetRenderTarget( rt, 0, level )) andRenderer::active_mipmap_level(). -
TSL
continue_loop()(Continue()) andget_screen_position(). -
dof(nodes::display),DepthOfFieldNode.js: bokeh depth of field in nine full-screen draws. All seven distinct quad shaders are gated against three's dump (dof_*intests/nodes_display_wgsl.rs). three lists the page in its e2e exception list, so it has no graded rung.webgpu_postprocessing_dofis in the native viewer. Seedocs/nodes.md§66. -
webgpu_postprocessing_dof_basicis graded: 36 of 100000 pixels. It is the page's ownboxBlur+smoothstepmix, notDepthOfFieldNode. -
tsl::output_struct(),outputStruct()as a material'soutputNode. Each member keeps its own type, where anmrt()member takes its attachment's type. -
Red render targets:
RenderTarget::set_red_format(). A texture node over a one-channel map is now afloatnode read as.x, as three'sgetTextureType()makes it. -
tsl::uniform_array_vec2()andUniformArray::element_xy(). -
Scene::environment_rotation,scene.environmentRotation, applied throughmaterialEnvRotation. -
godrays,bilateral_bluranddepth_aware_blend(nodes::display), ports ofGodraysNode.js,BilateralBlurNode.jsanddepthAwareBlend.js. The godrays node ray-marches a point light's cube shadow map. TheDirectionalLightbranch is not ported. Three's dump gates all three shaders.webgpu_postprocessing_godraysis graded green at 3 of 100000 pixels. Seedocs/nodes.md§74. -
lensflare(nodes::display), a port ofLensflareNode.js.webgpu_postprocessing_lensflareis graded green at 0 of 100000 pixels. Each quad the page adds is gated against three's dump. Seedocs/nodes.md§75. -
LightShadow::point_depth_texture(), three'slight.shadow.map.depthTexturefor a point light. The renderer draws the light's shadow into the texture it returns. -
Scene::background_intensityandScene::environment_intensity, three'sscene.backgroundIntensityandscene.environmentIntensity. -
tsl::const_array_of, a literal array of vectors, andUniformArray::element_xyz. -
sharpen()/SharpenNode(nodes::display), a port ofexamples/jsm/tsl/display/SharpenNode.js: AMD FidelityFX FSR 1's RCAS, a contrast-limited five-tap sharpen drawn once a frame into a half-float target, with optional noise attenuation.sharpnessis a number (a constant, as in three) or any float node, such as auniform_settable. Both variants' WGSL is gated against three's dump oftools/dump-pages/sharpen.htmlintests/nodes_display_wgsl.rs, andtests/sharpen_frames.rschecks on the GPU that it steepens a soft edge without moving flat regions. Seedocs/nodes.md§86. -
recurrent_denoise()/RecurrentDenoiseNode(nodes::display), a port ofexamples/jsm/tsl/display/RecurrentDenoiseNode.js: the edge-aware eight-tap Vogel-disk denoiser of the SSR-denoise stack, in'diffuse'or'specular'mode, with luma, plane, lobe-normal, albedo, roughness and ray-length or AO edge stopping, and an optional Karis temporal blend that writes the frame weight to alpha. Every three uniform is a publicSettableValue;set_alpha_sourcerebuilds the shader. Both oftools/dump-pages/recurrent_denoise.html's quads (diffuse with AO, and the page's specular configuration) are gated against three's dump intests/nodes_display_wgsl.rs, with function gates for the layouted helpers, andtests/recurrent_denoise_frames.rschecks on the GPU that it cuts a noisy face's variance without moving its mean or its silhouette, and keeps cutting it as frames accumulate. Seedocs/nodes.md§88. -
denoise()/DenoiseNode(nodes::display), a port ofexamples/jsm/tsl/display/DenoiseNode.js: the single-pass 16-tap Poisson-disk denoiser with luma, depth-plane and normal edge stopping, rotated per pixel by a 64x64 simplex-noise texture; the normal input is optional (Nonereconstructs it from depth). With it,addons::simplex_noise::SimplexNoise, a port ofexamples/jsm/math/SimplexNoise.js(2D, 3D and 4D) with a unit test against three's JS. Both oftools/dump-pages/denoise.html's quads are gated against three's dump intests/nodes_display_wgsl.rs, andtests/denoise_frames.rschecks on the GPU that it flattens a pixel-scale checkerboard while keeping a depth edge sharp. Seedocs/nodes.md§92. -
ssao()/SsaoNode(nodes::display) andtsl::depth_aware_blur, ports ofexamples/jsm/tsl/display/SSAONode.jsanddepthAwareBlur.js: Vogel-disk SSAO with one depth tap per sample, drawn into its own target atresolutionScaleand cleaned by a separable five-tap blur weighted by view-Z difference (blurEnabled,blurSharpness). The AO and blur quads are gated against three's dump oftools/dump-pages/ssao.htmlintests/nodes_display_wgsl.rs, andtests/ssao_frames.rschecks on the GPU that a box's crease is darker than open floor and that the blur cuts the pixel-to-pixel noise. Seedocs/nodes.md§93. -
fsr1()/Fsr1Node(nodes::display), a port ofexamples/jsm/tsl/display/FSR1Node.js: AMD FidelityFX Super Resolution 1.0. It draws two half-float passes a frame at the drawing-buffer size. EASU is edge-adaptive Lanczos2 upsampling over a 12-texel footprint, and RCAS isSharpenNode's sharpen over the result. The EASU and RCAS WGSL is gated against three's dump ofwebgpu_upscaling_fsr1intests/nodes_display_wgsl.rs.tests/fsr1_frames.rschecks on the GPU that a half-resolution pass comes out at canvas size, with flat regions unchanged and an edge steeper than bilinear's. Seedocs/nodes.md§91. -
webgpu_upscaling_fsr1, ported but not graded: three.js scores 703 of 100000 pixels against its own reference on this machine, over the 0.1% limit, and the port scores 698. Its e2e rung is#[ignore]d. It is in the steady-frame strip and the native viewer, but not the gallery or the browser shell.
- The scene-graph handle is
ObjectRef, notNode(#250, breaking).core::Nodeis renamedObjectRefandWeakNodeisWeakObjectRef; the crate-root re-export follows. The shader-graphnodes::Nodekeeps its name. The handle wrapsObject3Dand every otherRchandle in the crate is already<Thing>Refafter the struct it points at, so the scene handle now matchesNodeRef,SceneRefandCameraRef; why this name and notcore::Objectisdocs/api.mddecision 2. Migration is a rename:three_rs::Node→three_rs::ObjectRef,WeakNode→WeakObjectRef. No method moved. Object3Dhas three more public fields,listeners,on_before_renderandon_after_render(#159). A struct literal that ends in..Default::default()still builds; one that names every field does not.Object3D'sDebugis written by hand now and prints whether each hook is set;Clonecopies neither the listeners nor the hooks, as three'scopy()does not.Scenegainson_before_renderandon_after_render.LightProbeHelperhas a private field, so it can no longer be built with a struct literal;LightProbeHelper::newis the constructor, as before (#159).- Which fields each material kind reads is declared once, in
MaterialKind::table()(src/materials/fields.rs): an exhaustivematchthat gives each kind its fragment flow, the fields it reads, the fields it is loud about and its draw-time rules.materials::setup()picks the flow from it,unsupported_fields()is derived from it, and the renderer's once-per-material warning reads it under one registry, replacing theif/elsechain and the two hand-kept rule lists that disagreed (#253). A no-GPU test checks every kind's program against its row. No shader changes, apart from theenv_mapfix under Fixed. MrtNode::set_blend_modetakesimpl Into<BlendMode>rather than aBlending, and returns&mut Selfso calls chain.blend_mode()returns aBlendMode. A bareBlendingstill converts. Under an MRT, a target's first attachment now followsgetBlendMode( texture.name )as in three: the material's blending only when it is namedoutput, and no blending for any other unset name. Members take their attachment's channel count as their type, so a one-channel attachment gets anf32output.- A plain texture sample built outside the fragment stage emits
textureSampleLevel( …, 0 ), as three's_generateTextureSample()does. It used to emittextureSample, which WGSL rejects in a vertex shader. The 3dlut page's smoke vertex shader is gated against three's dump. InstancedBufferAttribute.arrayis private, read througharray()and written througharray_mut(), which bumps the newversion();set_needs_update()andid()join them.set_matrix_at/set_color_atbump the version when they change a value. (#89)step()builds both operands at the wider type, asMathNodedoes, so a scalar edge against a vector emitsstep( vec3<f32>( 0.5 ), x ).hashBlur's WGSL gate compares three's loop exactly. It now blursviewportSharedTexture(), aswebgpu_backdrop_areadoes.SpotLight::newandDirectionalLight::newstart the light atDEFAULT_UP, (0, 1, 0), as three's constructors do. They used to leave it at the origin. A light whose position the application never sets now shines down from one unit up, as in three; a scene that relied on the old origin should set the position itself.- A compute kernel with a barrier has no bounds check, and its vars are
local to
main, asBarrierNode.setup()makes them in three. Before,workgroup_barrier()andstorage_barrier()kernels kept theif ( instanceIndex >= count ) { return; }guard and module-scopevar<private>s. Without the guard, every invocation of the last workgroup runs, as in three: the dispatch is stillceil( count / workgroup ), so tail invocations index pastcount, and a kernel must guard its own accesses, e.g.If( instanceIndex < count )around the stores after the barrier. Seedocs/nodes.md§84.6. - Nested renders save and restore the renderer's state in one place
(#252).
RendererUtils.saveRendererState()/resetRendererState()/restoreRendererState()are one crate-private value insrc/renderer/renderer_state.rs, used through a scope that restores on every exit, a panic included.PassNode, the display effects (bloom, SMAA, TRAA, SSR, GTAO, outline, stereo and the rest), SSAA, PMREM, the cube captures and the reflector all use it, where each kept its own hand-rolled subset before. Sites callingresetRendererState()now also clear the render-object function and restore everything three's list holds, as three does; no ladder frame changes.Renderer::render,render_sharedandrender_nestedshare one body.
- A transmissive material drawn
BackSidereads its own viewport texture, copied before the first back-side draw, as three'sviewportBackSideTextureis. The front side'sviewportOpaqueMipTexture()is now copied at the first front-side draw, so the front face of double-sided glass refracts its own back faces. The port used to copy once, before either half, and bind that copy to both (docs/nodes.md§96.3). - The transmission copies magnify
Nearest, like three'sFramebufferTexture.textureBicubicLevelreads level 0 at an explicit level wherever the LOD is below 1, so the filter there is the mag filter (docs/nodes.md§96.4). ssaaPassrenders its samples with the pass's own MRT and puts the frame's MRT back afterwards (#252), asSSAAPassNode.updateBefore()does. It used to render under whatever MRT the caller had set.- A map's filters and wrap modes changed after the first draw rebuild the
program (#276). Three's WebGPU backend folds every texture property's
magFilter,minFilter,wrapSandwrapTinto the material cache key; the port keyed programs on the material's id and version only, so switching a map toNearest(unfilterable:textureLoad, no sampler) or changing an unfilterable map'swrap_s(itstsl_coord_*wrap function) kept the stale program. The sampler state is now read off the material's textures into the dynamic half of the key at every draw.tests/texture_sampler_rebuild.rscovers it. - Phong, Lambert and Toon materials zero each lighting accumulator
(
irradiance,directDiffuse,directSpecular,indirectDiffuse, and Lambert's specular pair) once, right above its first use, as three's dumps do (#281). Each accumulator is a var with a zero initialiser, and the flow also assigned the same zero explicitly, so the WGSL had every zero twice in a row. The physical flow keeps its hoisted zeros but emits each once,clearcoat*,radianceandiblIrradianceincluded.sss_shadow_context_matches_threeno longer drops repeated lines; it checks the zero count and position against the dump, andlit_accumulators_are_zeroed_oncecovers the other lit flows. - A depth-stencil texture is sampled through a depth-only view. With
RendererParameters::stencilon,viewportDepthTexture()'s copy of thedepth24plus-stencil8canvas depth failed bind-group validation, because the view had both aspects.tests/renderer_viewport_depth.rscovers it. - The glTF loader applies
occlusionTexture.strengthasao_map_intensity, as three'sGLTFLoaderdoes. It was ignored, sopool.glb'sSPWallsFloorStairs, which sets it to 0, was darkened by its AO map. positionViewDirectionisvec3( 0, 0, 1 )under an orthographic camera, as three's is. It was always the perspectivenormalize( -positionView ), which moved Phong and physical specular highlights under anOrthographicCamera.smaa()renders its input inside the reset renderer state, as three's lazily updated input does. A scene pass behind it now clears to opaque black instead of the renderer's clear alpha, so an anti-aliased line over an empty background is no longer brightened back byrenderOutput's unpremultiply.- glTF
alphaMode: MASKnow setsalpha_test = alphaCutoff. Before, masked cut-outs drew as solid quads. - A
negate()read more than once becomes a sharedvar, as three'sMathNodedoes. It used to be inlined at every read. - A
Fn()block read twice counts its result twice, so the result is promoted to avarwhere three promotes it. GaussianBlurNode::render()runs its input's update-before first. On the first frame, a blur over anrtt()or another display node used to size its targets from a 1×1 input.- A
HemisphereLightwith noAmbientLightbeside it no longer has its irradiance overwritten with zero before the Phong, Lambert and Toon models read it. - An
InstancedMesh'sinstanceMatrixandinstanceColorare no longer written to the GPU on every draw: each attribute keeps one buffer and is re-written only when its version moves, and each write counts ininfo.build.buffers_written. The render list no longer copies the arrays each frame either. A still 131072-instance mesh goes from about 25 ms a frame to about 3 ms (benches/instanced_mesh.rs). (#89) - A lit
MeshBasicNodeMaterialzeroesindirectDiffusebefore it adds to it, asBasicLightingModeldoes. - Skinned shadow casters are skinned in directional and spot shadow maps. Point-light shadows of skinned meshes are still unskinned. (#163)
- A texture sampled outside the fragment stage, such as in a
positionNode, emitstextureSampleLevel( …, 0 ), as three does. It used to emittextureSample, which WGSL rejects in a vertex shader. - A background that is an inline
Fn()call is built inside the skybox material, as three builds everyFnbody. SonormalWorldin it is the back-side normal. - A Sprite, Points or Line2 material with
env_mapset no longer samples it (#253). OnlyMeshBasicNodeMaterial.setupEnvironment()wraps the env map in aBasicEnvironmentNodein three; the port's unlit flow sampled it for every kind that reached it, whileunsupported_fields()warned that those kinds ignore it. The warning stays; the sample is gone. - A glTF that lists
KHR_materials_iridescenceunderextensionsRequiredloads (#330). The loader has read the extension sincewebgpu_loader_gltf_iridescence, but it was missing from the list of extensions the required-extension check accepts, so such a file was refused.IridescenceLamp.glbonly lists it underextensionsUsed. cargo run --example web_manifestsrecordswebgpu_lightprobe_cubecameraagain (#271). Itsinit()becameasyncand the generator dropped the future without running it, so a regeneration wrote an empty manifest for the page. It now blocks on the future, as the page's ownmain()does.
Breaking only in what it depends on: it moves to three-rs 0.3, whose
scene-graph handle is ObjectRef (#250), and exposes that type where it
exposed Node. No API of its own changed.
Breaking only in what it depends on: it moves to three-rs 0.3, whose
scene-graph handle is ObjectRef (#250). No API of its own changed.
0.2.0 - 2026-09-29
Ships with sdf-text 0.2.0 and the first release of three-rs-controls
(0.1.0); their sections follow this one.
Breaking changes, settled in docs/api.md after 0.1.0's first
outside consumers and batched together for the 0.2.0 release:
Nodeis a newtype, not apub type Node = Rc<RefCell<Object3D>>alias, with the tree operations (add,children,matrix_world, ...) inherent instead of living on a separately-importedObject3DNodetrait. Call sites are unchanged;use three_rs::core::Object3DNodeis no longer needed.WeakNodegets the same treatment andRc::ptr_eqbecomesNode::ptr_eq. In the same change,Mesh::newtakes the material:Mesh::new(geometry, material), matchingnew Mesh(geometry, material), instead ofMesh::new(geometry)followed by setting.materialby hand. (#72)- Fallible entry points return
Result. Loaders,Renderer::new,Renderer::with_instance,Renderer::read_canvas_pixels,RenderTarget::new_with_options,DepthTexture::set_type,AnimationClip/KeyframeTrackparsing andVectorFont::parsereturnthree_rs::Error(orsdf_text::Error) instead of panicking. Both error enums are#[non_exhaustive]. Constructors, geometry builders and the rest of the scene-graph API stay infallible. (#74) Renderer::with_device(parameters, adapter, device, queue)lets a host that already owns awgpu::DeviceandQueuehand them to the renderer instead of the renderer creating its own;Renderer::newandwith_instancenow end in it.Texture::external(gpu, color_space)wraps awgpu::Texturethe renderer never re-uploads or destroys, andTexture::set_data/set_needs_update/versionlet a texture whose pixels change every frame (a screencast, a shared-memory client buffer) keep its GPU allocation instead of being recreated. (#64)- Passes render themselves.
PassNode,RttNodeandBloomNodeare nowRchandles with&selfsetters; give one its scene and camera withpass(scene, camera)orset_scene, and the renderer runs it from itsupdateBefore()hook the first time a frame samples the pass's texture, the way three.js does. Their explicitrender()methods are deprecated (see Removed). (#206) - A scene's or material's environment is an
Environmentenum —Environment::Pmrem(PmremHandle)orEnvironment::Node(EnvironmentNode)— instead of a raw PMREM handle, so an environment can be a generated cube or a graph ofpmremTexture()reads. (#208) - Options structs are
#[non_exhaustive], so a field added later is not a break:PassOptions,RenderTargetOptions,RendererParameters,GaussianBlurOptions,BoxBlurOptions,HashBlurOptions,RadialBlurOptions,Billboarding,ExtrudeGeometryOptions,TextGeometryOptions,ReflectorParameters,OverrideNodes,Ktx2Support,RaycasterParams, and sdf-text'sLayoutParamsandBatchedTextOptions. ReplaceRendererParameters { antialias: true }(andS { a, ..S::default() }) withlet mut p = RendererParameters::default(); p.antialias = true;.ComputeFlowliterals becomeComputeFlow::new( statements, count), withworkgroup_size,nameandon_initset as fields afterwards;MaterialFlowliterals becomeMaterialFlow::new(output, position).Info,RenderCounts,BuildCounts,MemoryCounts,ComputeCountsand sdf-text'sTextRenderInfoare#[non_exhaustive]too: read their fields, and destructure them with... (docs/api.mddecision 3; #217) - One
ColorSpace.math::ColorSpaceandtextures::ColorSpaceare merged intothree_rs::math::ColorSpace(alsothree_rs::ColorSpace), with the variantsNoColorSpace,SrgbandLinearSrgb. Replacetextures::ColorSpacewithmath::ColorSpace.ColorManagement::convert,working_to_color_space,color_space_to_workingandget_transfertake aColorSpaceinstead of anOption<ColorSpace>: writeColorSpace::NoColorSpacewhere you passedNone, and drop theSome(..). The HDR, cube HDR, Ultra HDR and KTX2 loaders now tag linear texturesLinearSrgbrather thanNoColorSpace, as three.js does. Both sample the same way. (#216) - Acronyms in public names use Rust casing (API Guidelines C-CASE), with
the three.js name in the doc comment:
ColorSpace::SRGBbecomesSrgb,ColorSpace::LinearSRGBbecomesLinearSrgb,GLTFLoaderbecomesGltfLoader, andCoordinateSystem::WebGL/WebGPUbecomeWebGl/WebGpu. Dimension suffixes (Data3DTexture), axis orders (EulerOrder::XYZ) and glam-style vector types (Type::UVec2) are unchanged; seedocs/api.mddecision 3. (#216) - The public surface was audited (
docs/api.mddecision 11, #213). About 290 items that were public only for the crate's own tests and examples are nowpub(crate), 79 more are#[doc(hidden)](the grader readbacks, thedraco/meshoptloader modules), and about 25 dead items are gone, among themRenderer::program_buildsandColorManagement's deprecated helpers. Items re-exported one level up lost their long paths: import them from the parent module.CurveVectoris sealed. 18 enums are#[non_exhaustive],nodes::Nodeamong them, so match them with a_arm. RenderCamerais sealed, matchingCurveVector: it cannot be implemented for a type outside this crate. Nothing that legitimately used it as a trait object or bound needs to change. (#218)NodeRef,RootIdandActionHandleare opaque handles: their tuple field is private.NodeRef::node()(oras_rc()for theRc<Node>itself) replaces reading.0;RootId::MIXER_ROOTreplacesRootId(0).ActionHandleandRootIdare otherwise unchanged — get one from theAnimationMixerthat owns it. (#218)
Other changes:
- The
rust-versioninCargo.tomlis documented as 1.90, which is what the lockfile already needed. (#73)
- glTF loading.
GltfLoaderfor.gltf/.glb(#119), withKHR_materials_sheen(#122),KHR_materials_anisotropy(#124),KHR_draco_mesh_compressionviadraco-core(#150),KHR_texture_basisu/ KTX2 textures (#176),EXT_meshopt_compression(#182),EXT_texture_webp(#183, AVIF evaluated and left out), andKHR_materials_diffuse_roughnesswith the EON diffuse lobe (#204). A required extension the loader cannot read is now a load error rather than a silently wrong scene (#125), and every glTF texture reference is aGltfTextureRefcarrying its own sampler and wrap state (#127). - Post-processing. SSAA (#100), selective bloom and
uniformArray()(#108), a previous-frame texture and passgetOutputhook (#109), anamorphic flare (rtt(), node-valued loop bounds, mirrored-repeat wrap) (#111), chromatic aberration (#118), a node library covering GaussianBlur, Sobel, DotScreen, RGBShift, Transition, AfterImage, Pixelation, hashBlur and boxBlur (#148), FXAA (#197) and halftone (#209). - PMREM environment lighting. HDR and half-float texture loading and
readback (#102);
PMREMGeneratorportsfrom_cubemap(#105),from_equirectangular(#107, plusUltraHDRLoader, #117),from_scene(#110, #112) and the furnace-test path (#110), each gated against three's own numbers;RoomEnvironment(#118); an LDR cubemap upload path forwebgpu_materials_envmapsand_cubemap_mipmaps(#114). - Compute. Compute kernels and storage buffers (#96); indirect
draw/dispatch, atomics and workgroup memory (#178);
Data3DTextureand storage textures (#175). - Rendering. Multiple render targets and MRT readback (#106, #207);
Renderer::copy_texture_to_textureand in-place partial texture updates (#202); Basic and VSM shadow filters withfilterNode/shadowNodehooks (#177); occlusion queries andisOccluded(#190);ArrayCameraand user-definedLightingModels (#191);reflector(), a planar mirror node (#208); layer-based render filtering (#203);MeshToonNodeMaterialand a toon outline pass (#193);BatchedMeshdrawn as onedrawIndexedper range (#95); fat lines (Line2NodeMaterialand thelinesaddon) with viewport/scissor state andCatmullRomCurve3(#101, #104);Raycaster,Spriteand instanced sprites (#149, #192); skinned and instanced points (#199); analphaHashblend mode and multi-material geometry groups (#201);textureGrad/textureGathersampling (#188); per-object uniform buffers andwgslFnvaryings (#116);wgslFnand a MaterialX node function library for TSL (#98, #151); the direct clearcoat lighting lobe, with every other unsupported material field now warning once (or, viacheck_supported()/unsupported_fields(), failing before the first frame) instead of being silently ignored (#181). - Nodes.
Node::Custom(Rc<dyn CustomNode>)for user node types that compose existing variants,tsl::custom(), andtsl::context()/tsl::isolate()(.context()/.isolate()) for three'sContextNodeandIsolateNode, sharing one parent-chained cache during a build (#185, #189, #194). - Geometry, math and cameras.
Shape,Pathand the curve family (CurvePath, Béziers, ellipses/arcs, splines) withShapeUtils/Earcut triangulation (#180);FogandFogExp2behindscene.fog(#145);Box3::set_from_objectand a camera-fit helper (#79);project/unprojecton any camera, andcrossed(#77);OrthographicCamera:: look_at, matching the perspective camera (#83);RenderCamera:: set_view_offsetand render-pipeline before/after hooks (#186); mutable geometry attributes and render-target readback (#81); a cached geometry bounding box and sphere (#136). - Controls.
OrbitControls, in the native viewer and the browser (#130); map-style controls over a curved ground (#86). - Browser. The graded examples run in the browser on wasm32 + WebGPU, animated on a clock (#129, #130), with a live gallery published to GitHub Pages (#131).
- Diagnostics.
Renderer::info()reports per-frame draw-call and triangle counts (#76). - Documentation. Every public item in
three-rs,sdf-textandthree-rs-controlshas a doc comment naming the three.js (or lib3) item it ports, each crate has a crate-level overview with an example, and#![warn(missing_docs)]keeps it that way (#215, #219–#225). ACHANGELOG.md, a code of conduct and issue templates were added (#212). - 69 more three.js examples graded green since 0.1.2, for 79 in total — see the README's gallery table for the full list.
texture()reads an unfilterable map withtextureLoadinstead of a filtering sample. (#121)- An instanced attribute uploads once per array instead of once per draw. (#90)
- The renderer keeps uniform buffers, views, samplers and bind groups across frames instead of rebuilding them every frame. (#138)
- The texture and view caches are swept by liveness, closing a leak on long-running scenes. (#174)
mapis read on every material path, andvertexColorsis honoured. (#78)- Non-skinned glTF materials read a
vec4COLOR_0, matching skinned ones. (#113)
PassNode::render,RttNode::renderandBloomNode::render(), deprecated since the passes-render-themselves change above, are removed. Give a pass its scene and camera and the renderer runs it automatically.d3-hierarchymoved out of this workspace into its own repository; its examples and gates no longer live here. The SDF examples and gates moved intosdf-textin the same change. (#66)
Breaking, because of the Result and Option signatures below; it depends on
three-rs 0.2.
sdf_text::Error, a#[non_exhaustive]crate-level error enum, replaces the remaining panics on fallible paths, mirroringthree-rs::Error.BatchedText::add_textreturnsOption<usize>(Noneat capacity) andText::member_idreturnsOption<usize>(Nonewhen the member has not joined a batch), replacing the-1-sentineli64both used to return. (#218)
VectorFont::measure(), for laying out text before there is an object to measure. (#75)- A refilled
BatchedText's newly-added glyphs draw without waiting for a full rebuild. (#85) - Batch members honour their own full
matrix_world, and a batch's bounds come from its members rather than its node. (#75) - Roboto ships inside the package so the example runs standalone. (#75)
- First release:
MapControls, a map camera over a ground with curvature, in the spirit of three.js'MapControlsand damped the way camera-controls damps, forthree-rs0.2. (#86, #92)
0.1.2 - 2026-09-13
- Geometry, attribute and texture caches are keyed by never-reused ids
instead of
Rcaddress, closing a freed-address ABA bug a two-plane dendrogram scene hit. (#58)
Ships alongside the 0.1.1 fix, both already on main before this tag.
0.1.1 - 2026-09-13
- Program cache keys are bindings hashed by identity and shape instead of
their
Debugstring, so a frame with a large texture no longer formats its pixels into a cache key. (#56)
0.1.0 - 2026-09-13
- First crates.io release: three.js core and math (
Object3Dscene graph,BufferGeometry, cameras,Vector/Matrix/Quaternion/Euler/Color), theWebGPURendererport on wgpu with a TSL-generated node system, the core materials, lights and shadow maps, and the first graded examples.