{"id":"dolphin.materials--DolphinSurfaceGgx","name":"DolphinSurfaceGgx","owner":"dolphin","package":"dolphin.materials","kind":"function","signature":"external DolphinSurfaceGgx(float roughness,float f0,float nx,float ny,float nz,float vx,float vy,float vz,float lx,float ly,float lz) returns float","description":"Same GGX/Smith/Schlick direct-light lobe used by Dolphin Lightlab. The result already includes N dot L; callers supply incoming radiance separately.","context":"Compose linear-color surfaces and shared shading math in ordinary Yeho code.","parameters":[{"name":"roughness","type":"float","description":"Supply roughness as float."},{"name":"f0","type":"float","description":"Supply f0 as float."},{"name":"nx","type":"float","description":"Supply nx as float."},{"name":"ny","type":"float","description":"Supply ny as float."},{"name":"nz","type":"float","description":"Supply nz as float."},{"name":"vx","type":"float","description":"Supply vx as float."},{"name":"vy","type":"float","description":"Supply vy as float."},{"name":"vz","type":"float","description":"Supply vz as float."},{"name":"lx","type":"float","description":"Supply lx as float."},{"name":"ly","type":"float","description":"Supply ly as float."},{"name":"lz","type":"float","description":"Supply lz as float."}],"returns":"float","members":[],"tags":["cpu","dolphin","dolphin.materials","function","materials","source-example"],"updated":"2026-09-09","source":{"repository":"dolphin","path":"packages/materials/src/surface.yh","line":22,"sha256":"009f4f147ecdf092eeb6d6c7a20fae2c1b2a351f4cb47a531420e348713e03df"},"status":"source-declared","notes":["Package presence and a declaration do not establish support on every host. Host services need their platform and lifecycle setup."],"examples":[{"id":"usage","title":"Use DolphinSurfaceGgx","description":"A complete small caller. Values are illustrative; check the returned result and package requirements before connecting live resources.","code":"using dolphin.materials\n\n// Compose linear-color surfaces and shared shading math in ordinary Yeho code.\nfloat roughness = 0.5\nfloat f0 = 1.0\nfloat nx = 1.0\nfloat ny = 1.0\nfloat nz = 1.0\nfloat vx = 1.0\nfloat vy = 1.0\nfloat vz = 1.0\nfloat lx = 1.0\nfloat ly = 1.0\nfloat lz = 1.0\nfloat result = DolphinSurfaceGgx(roughness, f0, nx, ny, nz, vx, vy, vz, lx, ly, lz)\nConsole.Log(Text.From(result))\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.dolphin_materials__dolphinsurfaceggx\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n\n[[dependencies]]\npackage = \"dolphin.materials\"\nversion = \"0.1.0\"\npath = \"../../../dolphin/packages/materials\"\n\n[[dependencies]]\npackage = \"dolphin.math\"\nversion = \"0.1.0\"\npath = \"../../../dolphin/packages/math\"\n\n[[dependencies]]\npackage = \"dolphin.spatial3d\"\nversion = \"0.1.0\"\npath = \"../../../dolphin/packages/spatial3d\"\n","tags":["cpu","source-example"],"verification":"type checked","run":"cpu-oracle","sha256":"9b39eb466a6a90f2c8a62d5a071944df7e4355b4d02bfde41c6ae0ccbddee67b","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null}],"searchTerms":[],"url":"https://demonhunterlabs.com/academy/api?item=dolphin.materials--DolphinSurfaceGgx","json":"https://demonhunterlabs.com/reference/items/dolphin.materials--DolphinSurfaceGgx.json","markdown":"https://demonhunterlabs.com/reference/text/dolphin.materials--DolphinSurfaceGgx.md"}
