defold (official)
defold/defold-pbr
A work-in-progress PBR core with shaders, a material, a reference render
script and the defold-pbr/core Lua module. Editor scripts generate
environment lighting assets from .hdr files and extract .glb content into
Defold collections.
Lua API not typed — upstream ships no .script_api, so resolve skips it.
- GitHub: defold/defold-pbr — pinned to
0.1.1(released while Defold 1.7.0 was current)- Pick a release from defold/defold-pbr releases and add its Source code (zip) URL (or a packaged
.zipasset, if the library ships one) togame.projectunder[project]dependencies, then Fetch Libraries in the Defold editor. - Attach
/defold-pbr/core.scriptto a game object to create the PBR context. - Require
defold-pbr/coreto call functions such asset_environment,add_light_pointandset_camera_world. - In the render script, pass
get_constants()to the model draw call and wrap it inenable_textures()anddisable_textures().
- Pick a release from defold/defold-pbr releases and add its Source code (zip) URL (or a packaged
Engine APIs
The module builds its constant buffer and binds textures with
render, and reads texture handles with
resource.