@plasius/gpu-lighting 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/LICENSE +203 -0
  3. package/README.md +101 -0
  4. package/dist/index.cjs +318 -0
  5. package/dist/index.cjs.map +1 -0
  6. package/dist/index.js +275 -0
  7. package/dist/index.js.map +1 -0
  8. package/dist/techniques/hdri/brdf-lut.job.wgsl +3 -0
  9. package/dist/techniques/hdri/irradiance-convolution.job.wgsl +3 -0
  10. package/dist/techniques/hdri/prelude.wgsl +10 -0
  11. package/dist/techniques/hdri/specular-prefilter.job.wgsl +3 -0
  12. package/dist/techniques/hybrid/direct-lighting.job.wgsl +3 -0
  13. package/dist/techniques/hybrid/final-gather.job.wgsl +3 -0
  14. package/dist/techniques/hybrid/prelude.wgsl +15 -0
  15. package/dist/techniques/hybrid/radiance-cache.job.wgsl +3 -0
  16. package/dist/techniques/hybrid/reflection-resolve.job.wgsl +3 -0
  17. package/dist/techniques/hybrid/screen-trace.job.wgsl +3 -0
  18. package/dist/techniques/pathtracer/accumulate.job.wgsl +3 -0
  19. package/dist/techniques/pathtracer/denoise.job.wgsl +3 -0
  20. package/dist/techniques/pathtracer/pathtrace.job.wgsl +3 -0
  21. package/dist/techniques/pathtracer/prelude.wgsl +15 -0
  22. package/dist/techniques/volumetrics/froxel-integrate.job.wgsl +3 -0
  23. package/dist/techniques/volumetrics/prelude.wgsl +15 -0
  24. package/dist/techniques/volumetrics/volumetric-shadow.job.wgsl +3 -0
  25. package/legal/CLA-REGISTRY.csv +2 -0
  26. package/legal/CLA.md +22 -0
  27. package/legal/CORPORATE_CLA.md +57 -0
  28. package/legal/INDIVIDUAL_CLA.md +91 -0
  29. package/package.json +78 -0
  30. package/src/index.js +296 -0
  31. package/src/techniques/hdri/brdf-lut.job.wgsl +3 -0
  32. package/src/techniques/hdri/irradiance-convolution.job.wgsl +3 -0
  33. package/src/techniques/hdri/prelude.wgsl +10 -0
  34. package/src/techniques/hdri/specular-prefilter.job.wgsl +3 -0
  35. package/src/techniques/hybrid/direct-lighting.job.wgsl +3 -0
  36. package/src/techniques/hybrid/final-gather.job.wgsl +3 -0
  37. package/src/techniques/hybrid/prelude.wgsl +15 -0
  38. package/src/techniques/hybrid/radiance-cache.job.wgsl +3 -0
  39. package/src/techniques/hybrid/reflection-resolve.job.wgsl +3 -0
  40. package/src/techniques/hybrid/screen-trace.job.wgsl +3 -0
  41. package/src/techniques/pathtracer/accumulate.job.wgsl +3 -0
  42. package/src/techniques/pathtracer/denoise.job.wgsl +3 -0
  43. package/src/techniques/pathtracer/pathtrace.job.wgsl +3 -0
  44. package/src/techniques/pathtracer/prelude.wgsl +15 -0
  45. package/src/techniques/volumetrics/froxel-integrate.job.wgsl +3 -0
  46. package/src/techniques/volumetrics/prelude.wgsl +15 -0
  47. package/src/techniques/volumetrics/volumetric-shadow.job.wgsl +3 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.js"],"sourcesContent":["const baseUrl = (() => {\n if (typeof __IMPORT_META_URL__ !== \"undefined\") {\n return new URL(\"./index.js\", __IMPORT_META_URL__);\n }\n if (typeof __filename !== \"undefined\" && typeof require !== \"undefined\") {\n const { pathToFileURL } = require(\"node:url\");\n return pathToFileURL(__filename);\n }\n const base =\n typeof process !== \"undefined\" && process.cwd\n ? `file://${process.cwd()}/`\n : \"file:///\";\n return new URL(\"./index.js\", base);\n})();\n\nconst techniqueSpecs = {\n hybrid: {\n description:\n \"Lumen-inspired hybrid realtime GI and reflections with radiance cache final gather.\",\n prelude: \"prelude.wgsl\",\n jobs: {\n directLighting: \"direct-lighting.job.wgsl\",\n screenTrace: \"screen-trace.job.wgsl\",\n radianceCache: \"radiance-cache.job.wgsl\",\n finalGather: \"final-gather.job.wgsl\",\n reflectionResolve: \"reflection-resolve.job.wgsl\",\n },\n },\n pathtracer: {\n description:\n \"Monte Carlo path-traced reference mode with progressive accumulation and denoise stage.\",\n prelude: \"prelude.wgsl\",\n jobs: {\n pathTrace: \"pathtrace.job.wgsl\",\n accumulate: \"accumulate.job.wgsl\",\n denoise: \"denoise.job.wgsl\",\n },\n },\n volumetrics: {\n description:\n \"Froxel volumetric lighting for fog, shafts, and participating media shadows.\",\n prelude: \"prelude.wgsl\",\n jobs: {\n froxelIntegrate: \"froxel-integrate.job.wgsl\",\n volumetricShadow: \"volumetric-shadow.job.wgsl\",\n },\n },\n hdri: {\n description:\n \"HDRI and IBL precompute passes including irradiance, specular prefilter, and BRDF LUT.\",\n prelude: \"prelude.wgsl\",\n jobs: {\n irradianceConvolution: \"irradiance-convolution.job.wgsl\",\n specularPrefilter: \"specular-prefilter.job.wgsl\",\n brdfLut: \"brdf-lut.job.wgsl\",\n },\n },\n};\n\nfunction buildTechnique(name, spec) {\n const preludeUrl = new URL(`./techniques/${name}/${spec.prelude}`, baseUrl);\n const jobs = Object.entries(spec.jobs).map(([key, file]) => {\n const label = `lighting.${name}.${key}`;\n return {\n key,\n label,\n url: new URL(`./techniques/${name}/${file}`, baseUrl),\n sourceName: label,\n };\n });\n return {\n name,\n description: spec.description,\n preludeUrl,\n jobs,\n };\n}\n\nexport const lightingTechniques = Object.freeze(\n Object.fromEntries(\n Object.entries(techniqueSpecs).map(([name, spec]) => [\n name,\n buildTechnique(name, spec),\n ])\n )\n);\n\nexport const lightingTechniqueNames = Object.freeze(Object.keys(lightingTechniques));\n\nexport const defaultLightingTechnique = \"hybrid\";\n\nconst profileSpecs = {\n realtime: {\n description:\n \"Primary runtime profile: hybrid GI/reflections with volumetrics and HDRI/IBL.\",\n techniques: [\"hybrid\", \"volumetrics\", \"hdri\"],\n },\n hybrid: {\n description:\n \"Hybrid-focused profile for direct tuning of Lumen-inspired realtime passes.\",\n techniques: [\"hybrid\", \"hdri\"],\n },\n reference: {\n description:\n \"Reference quality profile: path tracing plus volumetrics and HDRI/IBL validation.\",\n techniques: [\"pathtracer\", \"volumetrics\", \"hdri\"],\n },\n};\n\nfunction buildProfile(name, spec) {\n return {\n name,\n description: spec.description,\n techniques: [...spec.techniques],\n };\n}\n\nexport const lightingProfiles = Object.freeze(\n Object.fromEntries(\n Object.entries(profileSpecs).map(([name, spec]) => [\n name,\n buildProfile(name, spec),\n ])\n )\n);\n\nexport const lightingProfileNames = Object.freeze(Object.keys(lightingProfiles));\n\nexport const defaultLightingProfile = \"realtime\";\n\nfunction getTechniqueJob(technique, key) {\n const job = technique.jobs.find((entry) => entry.key === key);\n if (!job) {\n const available = technique.jobs.map((entry) => entry.key).join(\", \");\n throw new Error(\n `Unknown job \"${key}\" for technique \"${technique.name}\". ` +\n `Available: ${available}.`\n );\n }\n return job;\n}\n\nexport function getLightingTechnique(name = defaultLightingTechnique) {\n const technique = lightingTechniques[name];\n if (!technique) {\n const available = lightingTechniqueNames.join(\", \");\n throw new Error(`Unknown lighting technique \"${name}\". Available: ${available}.`);\n }\n return technique;\n}\n\nexport function getLightingProfile(name = defaultLightingProfile) {\n const profile = lightingProfiles[name];\n if (!profile) {\n const available = lightingProfileNames.join(\", \");\n throw new Error(`Unknown lighting profile \"${name}\". Available: ${available}.`);\n }\n return profile;\n}\n\nconst defaultTechnique = getLightingTechnique(defaultLightingTechnique);\n\nexport const lightingPreludeWgslUrl = defaultTechnique.preludeUrl;\n\nexport const lightingJobLabels = Object.freeze(\n Object.fromEntries(defaultTechnique.jobs.map((job) => [job.key, job.label]))\n);\n\nexport const lightingJobs = defaultTechnique.jobs.map((job) => ({\n label: job.label,\n url: job.url,\n sourceName: job.sourceName,\n}));\n\nfunction assertNotHtmlWgsl(source, context) {\n const sample = source.slice(0, 200).toLowerCase();\n if (\n sample.includes(\"<!doctype\") ||\n sample.includes(\"<html\") ||\n sample.includes(\"<meta\")\n ) {\n const label = context ? ` for ${context}` : \"\";\n throw new Error(\n `Expected WGSL${label} but received HTML. Check the URL or server root.`\n );\n }\n}\n\nasync function loadWgslSource(options = {}) {\n const { wgsl, url, fetcher = globalThis.fetch, base } = options ?? {};\n if (typeof wgsl === \"string\") {\n assertNotHtmlWgsl(wgsl, \"inline WGSL\");\n return wgsl;\n }\n if (!url) {\n return null;\n }\n const resolved = url instanceof URL ? url : new URL(url, base ?? baseUrl);\n if (!fetcher || resolved.protocol === \"file:\") {\n const { readFile } = await import(\"node:fs/promises\");\n const { fileURLToPath } = await import(\"node:url\");\n const source = await readFile(fileURLToPath(resolved), \"utf8\");\n assertNotHtmlWgsl(source, resolved.href);\n return source;\n }\n const response = await fetcher(resolved);\n if (!response.ok) {\n const status = \"status\" in response ? response.status : \"unknown\";\n const statusText = \"statusText\" in response ? response.statusText : \"\";\n const detail = statusText ? `${status} ${statusText}` : `${status}`;\n throw new Error(`Failed to load WGSL (${detail})`);\n }\n const source = await response.text();\n assertNotHtmlWgsl(source, resolved.href);\n return source;\n}\n\nasync function loadTechniquePrelude(technique, fetcher) {\n const source = await loadWgslSource({ url: technique.preludeUrl, fetcher });\n if (typeof source !== \"string\") {\n throw new Error(`Failed to load ${technique.name} prelude WGSL source.`);\n }\n return source;\n}\n\nasync function loadTechniqueJob(technique, job, fetcher) {\n const source = await loadWgslSource({ url: job.url, fetcher });\n if (typeof source !== \"string\") {\n throw new Error(\n `Failed to load ${technique.name} job \"${job.key}\" WGSL source.`\n );\n }\n return source;\n}\n\nexport async function loadLightingTechniquePreludeWgsl(\n techniqueName,\n options = {}\n) {\n const { fetcher } = options ?? {};\n const technique = getLightingTechnique(techniqueName);\n return loadTechniquePrelude(technique, fetcher);\n}\n\nexport async function loadLightingTechniqueJobWgsl(\n techniqueName,\n jobKey,\n options = {}\n) {\n const { fetcher } = options ?? {};\n const technique = getLightingTechnique(techniqueName);\n const job = getTechniqueJob(technique, jobKey);\n return loadTechniqueJob(technique, job, fetcher);\n}\n\nexport async function loadLightingTechniqueJobs(techniqueName, options = {}) {\n const { fetcher } = options ?? {};\n const technique = getLightingTechnique(techniqueName);\n const preludeWgsl = await loadTechniquePrelude(technique, fetcher);\n const jobSources = await Promise.all(\n technique.jobs.map((job) => loadTechniqueJob(technique, job, fetcher))\n );\n const jobs = technique.jobs.map((job, index) => ({\n wgsl: jobSources[index],\n label: job.label,\n sourceName: job.sourceName,\n }));\n return { preludeWgsl, jobs };\n}\n\nexport async function loadLightingPreludeWgsl(options = {}) {\n const { fetcher } = options ?? {};\n return loadTechniquePrelude(defaultTechnique, fetcher);\n}\n\nexport async function loadLightingJobs(options = {}) {\n return loadLightingTechniqueJobs(defaultLightingTechnique, options);\n}\n\nexport async function loadLightingProfile(profileName, options = {}) {\n const profile = getLightingProfile(profileName);\n const techniques = await Promise.all(\n profile.techniques.map(async (techniqueName) => {\n const { preludeWgsl, jobs } = await loadLightingTechniqueJobs(\n techniqueName,\n options\n );\n return {\n technique: techniqueName,\n preludeWgsl,\n jobs,\n };\n })\n );\n return { profile, techniques };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAM,WAAW,MAAM;AACrB,MAAI,OAA4C;AAC9C,WAAO,IAAI,IAAI,cAAc,MAAmB;AAAA,EAClD;AACA,MAAI,OAAO,eAAe,eAAe,OAAO,YAAY,aAAa;AACvE,UAAM,EAAE,cAAc,IAAI,QAAQ,KAAU;AAC5C,WAAO,cAAc,UAAU;AAAA,EACjC;AACA,QAAM,OACJ,OAAO,YAAY,eAAe,QAAQ,MACtC,UAAU,QAAQ,IAAI,CAAC,MACvB;AACN,SAAO,IAAI,IAAI,cAAc,IAAI;AACnC,GAAG;AAEH,IAAM,iBAAiB;AAAA,EACrB,QAAQ;AAAA,IACN,aACE;AAAA,IACF,SAAS;AAAA,IACT,MAAM;AAAA,MACJ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,eAAe;AAAA,MACf,aAAa;AAAA,MACb,mBAAmB;AAAA,IACrB;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C7C,SAAO,iBAAiB,WAAW,KAAK,OAAO;AACjD;AAEA,eAAsB,0BAA0B,eAAe,UAAU,CAAC,GAAG;AAC3E,QAAM,EAAE,QAAQ,IAAI,WAAW,CAAC;AAChC,QAAM,YAAY,qBAAqB,aAAa;AACpD,QAAM,cAAc,MAAM,qBAAqB,WAAW,OAAO;AACjE,QAAM,aAAa,MAAM,QAAQ;AAAA,IAC/B,UAAU,KAAK,IAAI,CAAC,QAAQ,iBAAiB,WAAW,KAAK,OAAO,CAAC;AAAA,EACvE;AACA,QAAM,OAAO,UAAU,KAAK,IAAI,CAAC,KAAK,WAAW;AAAA,IAC/C,MAAM,WAAW,KAAK;AAAA,IACtB,OAAO,IAAI;AAAA,IACX,YAAY,IAAI;AAAA,EAClB,EAAE;AACF,SAAO,EAAE,aAAa,KAAK;AAC7B;AAEA,eAAsB,wBAAwB,UAAU,CAAC,GAAG;AAC1D,QAAM,EAAE,QAAQ,IAAI,WAAW,CAAC;AAChC,SAAO,qBAAqB,kBAAkB,OAAO;AACvD;AAEA,eAAsB,iBAAiB,UAAU,CAAC,GAAG;AACnD,SAAO,0BAA0B,0BAA0B,OAAO;AACpE;AAEA,eAAsB,oBAAoB,aAAa,UAAU,CAAC,GAAG;AACnE,QAAM,UAAU,mBAAmB,WAAW;AAC9C,QAAM,aAAa,MAAM,QAAQ;AAAA,IAC/B,QAAQ,WAAW,IAAI,OAAO,kBAAkB;AAC9C,YAAM,EAAE,aAAa,KAAK,IAAI,MAAM;AAAA,QAClC;AAAA,QACA;AAAA,MACF;AACA,aAAO;AAAA,QACL,WAAW;AAAA,QACX;AAAA,QACA;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACA,SAAO,EAAE,SAAS,WAAW;AAC/B;","names":["source"]}
package/dist/index.js ADDED
@@ -0,0 +1,275 @@
1
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
2
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
3
+ }) : x)(function(x) {
4
+ if (typeof require !== "undefined") return require.apply(this, arguments);
5
+ throw Error('Dynamic require of "' + x + '" is not supported');
6
+ });
7
+
8
+ // src/index.js
9
+ var baseUrl = (() => {
10
+ if (typeof import.meta.url !== "undefined") {
11
+ return new URL("./index.js", import.meta.url);
12
+ }
13
+ if (typeof __filename !== "undefined" && typeof __require !== "undefined") {
14
+ const { pathToFileURL } = __require("url");
15
+ return pathToFileURL(__filename);
16
+ }
17
+ const base = typeof process !== "undefined" && process.cwd ? `file://${process.cwd()}/` : "file:///";
18
+ return new URL("./index.js", base);
19
+ })();
20
+ var techniqueSpecs = {
21
+ hybrid: {
22
+ description: "Lumen-inspired hybrid realtime GI and reflections with radiance cache final gather.",
23
+ prelude: "prelude.wgsl",
24
+ jobs: {
25
+ directLighting: "direct-lighting.job.wgsl",
26
+ screenTrace: "screen-trace.job.wgsl",
27
+ radianceCache: "radiance-cache.job.wgsl",
28
+ finalGather: "final-gather.job.wgsl",
29
+ reflectionResolve: "reflection-resolve.job.wgsl"
30
+ }
31
+ },
32
+ pathtracer: {
33
+ description: "Monte Carlo path-traced reference mode with progressive accumulation and denoise stage.",
34
+ prelude: "prelude.wgsl",
35
+ jobs: {
36
+ pathTrace: "pathtrace.job.wgsl",
37
+ accumulate: "accumulate.job.wgsl",
38
+ denoise: "denoise.job.wgsl"
39
+ }
40
+ },
41
+ volumetrics: {
42
+ description: "Froxel volumetric lighting for fog, shafts, and participating media shadows.",
43
+ prelude: "prelude.wgsl",
44
+ jobs: {
45
+ froxelIntegrate: "froxel-integrate.job.wgsl",
46
+ volumetricShadow: "volumetric-shadow.job.wgsl"
47
+ }
48
+ },
49
+ hdri: {
50
+ description: "HDRI and IBL precompute passes including irradiance, specular prefilter, and BRDF LUT.",
51
+ prelude: "prelude.wgsl",
52
+ jobs: {
53
+ irradianceConvolution: "irradiance-convolution.job.wgsl",
54
+ specularPrefilter: "specular-prefilter.job.wgsl",
55
+ brdfLut: "brdf-lut.job.wgsl"
56
+ }
57
+ }
58
+ };
59
+ function buildTechnique(name, spec) {
60
+ const preludeUrl = new URL(`./techniques/${name}/${spec.prelude}`, baseUrl);
61
+ const jobs = Object.entries(spec.jobs).map(([key, file]) => {
62
+ const label = `lighting.${name}.${key}`;
63
+ return {
64
+ key,
65
+ label,
66
+ url: new URL(`./techniques/${name}/${file}`, baseUrl),
67
+ sourceName: label
68
+ };
69
+ });
70
+ return {
71
+ name,
72
+ description: spec.description,
73
+ preludeUrl,
74
+ jobs
75
+ };
76
+ }
77
+ var lightingTechniques = Object.freeze(
78
+ Object.fromEntries(
79
+ Object.entries(techniqueSpecs).map(([name, spec]) => [
80
+ name,
81
+ buildTechnique(name, spec)
82
+ ])
83
+ )
84
+ );
85
+ var lightingTechniqueNames = Object.freeze(Object.keys(lightingTechniques));
86
+ var defaultLightingTechnique = "hybrid";
87
+ var profileSpecs = {
88
+ realtime: {
89
+ description: "Primary runtime profile: hybrid GI/reflections with volumetrics and HDRI/IBL.",
90
+ techniques: ["hybrid", "volumetrics", "hdri"]
91
+ },
92
+ hybrid: {
93
+ description: "Hybrid-focused profile for direct tuning of Lumen-inspired realtime passes.",
94
+ techniques: ["hybrid", "hdri"]
95
+ },
96
+ reference: {
97
+ description: "Reference quality profile: path tracing plus volumetrics and HDRI/IBL validation.",
98
+ techniques: ["pathtracer", "volumetrics", "hdri"]
99
+ }
100
+ };
101
+ function buildProfile(name, spec) {
102
+ return {
103
+ name,
104
+ description: spec.description,
105
+ techniques: [...spec.techniques]
106
+ };
107
+ }
108
+ var lightingProfiles = Object.freeze(
109
+ Object.fromEntries(
110
+ Object.entries(profileSpecs).map(([name, spec]) => [
111
+ name,
112
+ buildProfile(name, spec)
113
+ ])
114
+ )
115
+ );
116
+ var lightingProfileNames = Object.freeze(Object.keys(lightingProfiles));
117
+ var defaultLightingProfile = "realtime";
118
+ function getTechniqueJob(technique, key) {
119
+ const job = technique.jobs.find((entry) => entry.key === key);
120
+ if (!job) {
121
+ const available = technique.jobs.map((entry) => entry.key).join(", ");
122
+ throw new Error(
123
+ `Unknown job "${key}" for technique "${technique.name}". Available: ${available}.`
124
+ );
125
+ }
126
+ return job;
127
+ }
128
+ function getLightingTechnique(name = defaultLightingTechnique) {
129
+ const technique = lightingTechniques[name];
130
+ if (!technique) {
131
+ const available = lightingTechniqueNames.join(", ");
132
+ throw new Error(`Unknown lighting technique "${name}". Available: ${available}.`);
133
+ }
134
+ return technique;
135
+ }
136
+ function getLightingProfile(name = defaultLightingProfile) {
137
+ const profile = lightingProfiles[name];
138
+ if (!profile) {
139
+ const available = lightingProfileNames.join(", ");
140
+ throw new Error(`Unknown lighting profile "${name}". Available: ${available}.`);
141
+ }
142
+ return profile;
143
+ }
144
+ var defaultTechnique = getLightingTechnique(defaultLightingTechnique);
145
+ var lightingPreludeWgslUrl = defaultTechnique.preludeUrl;
146
+ var lightingJobLabels = Object.freeze(
147
+ Object.fromEntries(defaultTechnique.jobs.map((job) => [job.key, job.label]))
148
+ );
149
+ var lightingJobs = defaultTechnique.jobs.map((job) => ({
150
+ label: job.label,
151
+ url: job.url,
152
+ sourceName: job.sourceName
153
+ }));
154
+ function assertNotHtmlWgsl(source, context) {
155
+ const sample = source.slice(0, 200).toLowerCase();
156
+ if (sample.includes("<!doctype") || sample.includes("<html") || sample.includes("<meta")) {
157
+ const label = context ? ` for ${context}` : "";
158
+ throw new Error(
159
+ `Expected WGSL${label} but received HTML. Check the URL or server root.`
160
+ );
161
+ }
162
+ }
163
+ async function loadWgslSource(options = {}) {
164
+ const { wgsl, url, fetcher = globalThis.fetch, base } = options ?? {};
165
+ if (typeof wgsl === "string") {
166
+ assertNotHtmlWgsl(wgsl, "inline WGSL");
167
+ return wgsl;
168
+ }
169
+ if (!url) {
170
+ return null;
171
+ }
172
+ const resolved = url instanceof URL ? url : new URL(url, base ?? baseUrl);
173
+ if (!fetcher || resolved.protocol === "file:") {
174
+ const { readFile } = await import("fs/promises");
175
+ const { fileURLToPath } = await import("url");
176
+ const source2 = await readFile(fileURLToPath(resolved), "utf8");
177
+ assertNotHtmlWgsl(source2, resolved.href);
178
+ return source2;
179
+ }
180
+ const response = await fetcher(resolved);
181
+ if (!response.ok) {
182
+ const status = "status" in response ? response.status : "unknown";
183
+ const statusText = "statusText" in response ? response.statusText : "";
184
+ const detail = statusText ? `${status} ${statusText}` : `${status}`;
185
+ throw new Error(`Failed to load WGSL (${detail})`);
186
+ }
187
+ const source = await response.text();
188
+ assertNotHtmlWgsl(source, resolved.href);
189
+ return source;
190
+ }
191
+ async function loadTechniquePrelude(technique, fetcher) {
192
+ const source = await loadWgslSource({ url: technique.preludeUrl, fetcher });
193
+ if (typeof source !== "string") {
194
+ throw new Error(`Failed to load ${technique.name} prelude WGSL source.`);
195
+ }
196
+ return source;
197
+ }
198
+ async function loadTechniqueJob(technique, job, fetcher) {
199
+ const source = await loadWgslSource({ url: job.url, fetcher });
200
+ if (typeof source !== "string") {
201
+ throw new Error(
202
+ `Failed to load ${technique.name} job "${job.key}" WGSL source.`
203
+ );
204
+ }
205
+ return source;
206
+ }
207
+ async function loadLightingTechniquePreludeWgsl(techniqueName, options = {}) {
208
+ const { fetcher } = options ?? {};
209
+ const technique = getLightingTechnique(techniqueName);
210
+ return loadTechniquePrelude(technique, fetcher);
211
+ }
212
+ async function loadLightingTechniqueJobWgsl(techniqueName, jobKey, options = {}) {
213
+ const { fetcher } = options ?? {};
214
+ const technique = getLightingTechnique(techniqueName);
215
+ const job = getTechniqueJob(technique, jobKey);
216
+ return loadTechniqueJob(technique, job, fetcher);
217
+ }
218
+ async function loadLightingTechniqueJobs(techniqueName, options = {}) {
219
+ const { fetcher } = options ?? {};
220
+ const technique = getLightingTechnique(techniqueName);
221
+ const preludeWgsl = await loadTechniquePrelude(technique, fetcher);
222
+ const jobSources = await Promise.all(
223
+ technique.jobs.map((job) => loadTechniqueJob(technique, job, fetcher))
224
+ );
225
+ const jobs = technique.jobs.map((job, index) => ({
226
+ wgsl: jobSources[index],
227
+ label: job.label,
228
+ sourceName: job.sourceName
229
+ }));
230
+ return { preludeWgsl, jobs };
231
+ }
232
+ async function loadLightingPreludeWgsl(options = {}) {
233
+ const { fetcher } = options ?? {};
234
+ return loadTechniquePrelude(defaultTechnique, fetcher);
235
+ }
236
+ async function loadLightingJobs(options = {}) {
237
+ return loadLightingTechniqueJobs(defaultLightingTechnique, options);
238
+ }
239
+ async function loadLightingProfile(profileName, options = {}) {
240
+ const profile = getLightingProfile(profileName);
241
+ const techniques = await Promise.all(
242
+ profile.techniques.map(async (techniqueName) => {
243
+ const { preludeWgsl, jobs } = await loadLightingTechniqueJobs(
244
+ techniqueName,
245
+ options
246
+ );
247
+ return {
248
+ technique: techniqueName,
249
+ preludeWgsl,
250
+ jobs
251
+ };
252
+ })
253
+ );
254
+ return { profile, techniques };
255
+ }
256
+ export {
257
+ defaultLightingProfile,
258
+ defaultLightingTechnique,
259
+ getLightingProfile,
260
+ getLightingTechnique,
261
+ lightingJobLabels,
262
+ lightingJobs,
263
+ lightingPreludeWgslUrl,
264
+ lightingProfileNames,
265
+ lightingProfiles,
266
+ lightingTechniqueNames,
267
+ lightingTechniques,
268
+ loadLightingJobs,
269
+ loadLightingPreludeWgsl,
270
+ loadLightingProfile,
271
+ loadLightingTechniqueJobWgsl,
272
+ loadLightingTechniqueJobs,
273
+ loadLightingTechniquePreludeWgsl
274
+ };
275
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.js"],"sourcesContent":["const baseUrl = (() => {\n if (typeof __IMPORT_META_URL__ !== \"undefined\") {\n return new URL(\"./index.js\", __IMPORT_META_URL__);\n }\n if (typeof __filename !== \"undefined\" && typeof require !== \"undefined\") {\n const { pathToFileURL } = require(\"node:url\");\n return pathToFileURL(__filename);\n }\n const base =\n typeof process !== \"undefined\" && process.cwd\n ? `file://${process.cwd()}/`\n : \"file:///\";\n return new URL(\"./index.js\", base);\n})();\n\nconst techniqueSpecs = {\n hybrid: {\n description:\n \"Lumen-inspired hybrid realtime GI and reflections with radiance cache final gather.\",\n prelude: \"prelude.wgsl\",\n jobs: {\n directLighting: \"direct-lighting.job.wgsl\",\n screenTrace: \"screen-trace.job.wgsl\",\n radianceCache: \"radiance-cache.job.wgsl\",\n finalGather: \"final-gather.job.wgsl\",\n reflectionResolve: \"reflection-resolve.job.wgsl\",\n },\n },\n pathtracer: {\n description:\n \"Monte Carlo path-traced reference mode with progressive accumulation and denoise stage.\",\n prelude: \"prelude.wgsl\",\n jobs: {\n pathTrace: \"pathtrace.job.wgsl\",\n accumulate: \"accumulate.job.wgsl\",\n denoise: \"denoise.job.wgsl\",\n },\n },\n volumetrics: {\n description:\n \"Froxel volumetric lighting for fog, shafts, and participating media shadows.\",\n prelude: \"prelude.wgsl\",\n jobs: {\n froxelIntegrate: \"froxel-integrate.job.wgsl\",\n volumetricShadow: \"volumetric-shadow.job.wgsl\",\n },\n },\n hdri: {\n description:\n \"HDRI and IBL precompute passes including irradiance, specular prefilter, and BRDF LUT.\",\n prelude: \"prelude.wgsl\",\n jobs: {\n irradianceConvolution: \"irradiance-convolution.job.wgsl\",\n specularPrefilter: \"specular-prefilter.job.wgsl\",\n brdfLut: \"brdf-lut.job.wgsl\",\n },\n },\n};\n\nfunction buildTechnique(name, spec) {\n const preludeUrl = new URL(`./techniques/${name}/${spec.prelude}`, baseUrl);\n const jobs = Object.entries(spec.jobs).map(([key, file]) => {\n const label = `lighting.${name}.${key}`;\n return {\n key,\n label,\n url: new URL(`./techniques/${name}/${file}`, baseUrl),\n sourceName: label,\n };\n });\n return {\n name,\n description: spec.description,\n preludeUrl,\n jobs,\n };\n}\n\nexport const lightingTechniques = Object.freeze(\n Object.fromEntries(\n Object.entries(techniqueSpecs).map(([name, spec]) => [\n name,\n buildTechnique(name, spec),\n ])\n )\n);\n\nexport const lightingTechniqueNames = Object.freeze(Object.keys(lightingTechniques));\n\nexport const defaultLightingTechnique = \"hybrid\";\n\nconst profileSpecs = {\n realtime: {\n description:\n \"Primary runtime profile: hybrid GI/reflections with volumetrics and HDRI/IBL.\",\n techniques: [\"hybrid\", \"volumetrics\", \"hdri\"],\n },\n hybrid: {\n description:\n \"Hybrid-focused profile for direct tuning of Lumen-inspired realtime passes.\",\n techniques: [\"hybrid\", \"hdri\"],\n },\n reference: {\n description:\n \"Reference quality profile: path tracing plus volumetrics and HDRI/IBL validation.\",\n techniques: [\"pathtracer\", \"volumetrics\", \"hdri\"],\n },\n};\n\nfunction buildProfile(name, spec) {\n return {\n name,\n description: spec.description,\n techniques: [...spec.techniques],\n };\n}\n\nexport const lightingProfiles = Object.freeze(\n Object.fromEntries(\n Object.entries(profileSpecs).map(([name, spec]) => [\n name,\n buildProfile(name, spec),\n ])\n )\n);\n\nexport const lightingProfileNames = Object.freeze(Object.keys(lightingProfiles));\n\nexport const defaultLightingProfile = \"realtime\";\n\nfunction getTechniqueJob(technique, key) {\n const job = technique.jobs.find((entry) => entry.key === key);\n if (!job) {\n const available = technique.jobs.map((entry) => entry.key).join(\", \");\n throw new Error(\n `Unknown job \"${key}\" for technique \"${technique.name}\". ` +\n `Available: ${available}.`\n );\n }\n return job;\n}\n\nexport function getLightingTechnique(name = defaultLightingTechnique) {\n const technique = lightingTechniques[name];\n if (!technique) {\n const available = lightingTechniqueNames.join(\", \");\n throw new Error(`Unknown lighting technique \"${name}\". Available: ${available}.`);\n }\n return technique;\n}\n\nexport function getLightingProfile(name = defaultLightingProfile) {\n const profile = lightingProfiles[name];\n if (!profile) {\n const available = lightingProfileNames.join(\", \");\n throw new Error(`Unknown lighting profile \"${name}\". Available: ${available}.`);\n }\n return profile;\n}\n\nconst defaultTechnique = getLightingTechnique(defaultLightingTechnique);\n\nexport const lightingPreludeWgslUrl = defaultTechnique.preludeUrl;\n\nexport const lightingJobLabels = Object.freeze(\n Object.fromEntries(defaultTechnique.jobs.map((job) => [job.key, job.label]))\n);\n\nexport const lightingJobs = defaultTechnique.jobs.map((job) => ({\n label: job.label,\n url: job.url,\n sourceName: job.sourceName,\n}));\n\nfunction assertNotHtmlWgsl(source, context) {\n const sample = source.slice(0, 200).toLowerCase();\n if (\n sample.includes(\"<!doctype\") ||\n sample.includes(\"<html\") ||\n sample.includes(\"<meta\")\n ) {\n const label = context ? ` for ${context}` : \"\";\n throw new Error(\n `Expected WGSL${label} but received HTML. Check the URL or server root.`\n );\n }\n}\n\nasync function loadWgslSource(options = {}) {\n const { wgsl, url, fetcher = globalThis.fetch, base } = options ?? {};\n if (typeof wgsl === \"string\") {\n assertNotHtmlWgsl(wgsl, \"inline WGSL\");\n return wgsl;\n }\n if (!url) {\n return null;\n }\n const resolved = url instanceof URL ? url : new URL(url, base ?? baseUrl);\n if (!fetcher || resolved.protocol === \"file:\") {\n const { readFile } = await import(\"node:fs/promises\");\n const { fileURLToPath } = await import(\"node:url\");\n const source = await readFile(fileURLToPath(resolved), \"utf8\");\n assertNotHtmlWgsl(source, resolved.href);\n return source;\n }\n const response = await fetcher(resolved);\n if (!response.ok) {\n const status = \"status\" in response ? response.status : \"unknown\";\n const statusText = \"statusText\" in response ? response.statusText : \"\";\n const detail = statusText ? `${status} ${statusText}` : `${status}`;\n throw new Error(`Failed to load WGSL (${detail})`);\n }\n const source = await response.text();\n assertNotHtmlWgsl(source, resolved.href);\n return source;\n}\n\nasync function loadTechniquePrelude(technique, fetcher) {\n const source = await loadWgslSource({ url: technique.preludeUrl, fetcher });\n if (typeof source !== \"string\") {\n throw new Error(`Failed to load ${technique.name} prelude WGSL source.`);\n }\n return source;\n}\n\nasync function loadTechniqueJob(technique, job, fetcher) {\n const source = await loadWgslSource({ url: job.url, fetcher });\n if (typeof source !== \"string\") {\n throw new Error(\n `Failed to load ${technique.name} job \"${job.key}\" WGSL source.`\n );\n }\n return source;\n}\n\nexport async function loadLightingTechniquePreludeWgsl(\n techniqueName,\n options = {}\n) {\n const { fetcher } = options ?? {};\n const technique = getLightingTechnique(techniqueName);\n return loadTechniquePrelude(technique, fetcher);\n}\n\nexport async function loadLightingTechniqueJobWgsl(\n techniqueName,\n jobKey,\n options = {}\n) {\n const { fetcher } = options ?? {};\n const technique = getLightingTechnique(techniqueName);\n const job = getTechniqueJob(technique, jobKey);\n return loadTechniqueJob(technique, job, fetcher);\n}\n\nexport async function loadLightingTechniqueJobs(techniqueName, options = {}) {\n const { fetcher } = options ?? {};\n const technique = getLightingTechnique(techniqueName);\n const preludeWgsl = await loadTechniquePrelude(technique, fetcher);\n const jobSources = await Promise.all(\n technique.jobs.map((job) => loadTechniqueJob(technique, job, fetcher))\n );\n const jobs = technique.jobs.map((job, index) => ({\n wgsl: jobSources[index],\n label: job.label,\n sourceName: job.sourceName,\n }));\n return { preludeWgsl, jobs };\n}\n\nexport async function loadLightingPreludeWgsl(options = {}) {\n const { fetcher } = options ?? {};\n return loadTechniquePrelude(defaultTechnique, fetcher);\n}\n\nexport async function loadLightingJobs(options = {}) {\n return loadLightingTechniqueJobs(defaultLightingTechnique, options);\n}\n\nexport async function loadLightingProfile(profileName, options = {}) {\n const profile = getLightingProfile(profileName);\n const techniques = await Promise.all(\n profile.techniques.map(async (techniqueName) => {\n const { preludeWgsl, jobs } = await loadLightingTechniqueJobs(\n techniqueName,\n options\n );\n return {\n technique: techniqueName,\n preludeWgsl,\n jobs,\n };\n })\n );\n return { profile, techniques };\n}\n"],"mappings":";;;;;;;;AAAA,IAAM,WAAW,MAAM;AACrB,MAAI,OAAO,oBAAwB,aAAa;AAC9C,WAAO,IAAI,IAAI,cAAc,eAAmB;AAAA,EAClD;AACA,MAAI,OAAO,eAAe,eAAe,OAAO,cAAY,aAAa;AACvE,UAAM,EAAE,cAAc,IAAI,UAAQ,KAAU;AAC5C,WAAO,cAAc,UAAU;AAAA,EACjC;AACA,QAAM,OACJ,OAAO,YAAY,eAAe,QAAQ,MACtC,UAAU,QAAQ,IAAI,CAAC,MACvB;AACN,SAAO,IAAI,IAAI,cAAc,IAAI;AACnC,GAAG;AAEH,IAAM,iBAAiB;AAAA,EACrB,QAAQ;AAAA,IACN,aACE;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-0,0 +1,3 @@
1
+ fn process_job() {
2
+ // Placeholder BRDF LUT generation stage.
3
+ }
@@ -0,0 +1,3 @@
1
+ fn process_job() {
2
+ // Placeholder irradiance convolution stage.
3
+ }
@@ -0,0 +1,10 @@
1
+ struct IblPrecomputeParams {
2
+ mip_level: u32,
3
+ sample_count: u32,
4
+ roughness: f32,
5
+ exposure_bias: f32,
6
+ };
7
+
8
+ fn clamp_roughness(value: f32) -> f32 {
9
+ return clamp(value, 0.0, 1.0);
10
+ }
@@ -0,0 +1,3 @@
1
+ fn process_job() {
2
+ // Placeholder specular prefilter stage.
3
+ }
@@ -0,0 +1,3 @@
1
+ fn process_job() {
2
+ // Placeholder direct lighting resolve for the hybrid technique.
3
+ }
@@ -0,0 +1,3 @@
1
+ fn process_job() {
2
+ // Placeholder final gather stage that combines cache data and traces.
3
+ }
@@ -0,0 +1,15 @@
1
+ struct HybridFrameParams {
2
+ frame_index: u32,
3
+ max_trace_steps: u32,
4
+ history_weight: f32,
5
+ exposure: f32,
6
+ };
7
+
8
+ struct HybridHit {
9
+ radiance: vec3<f32>,
10
+ hit_distance: f32,
11
+ };
12
+
13
+ fn encode_history_weight(value: f32) -> f32 {
14
+ return clamp(value, 0.0, 1.0);
15
+ }
@@ -0,0 +1,3 @@
1
+ fn process_job() {
2
+ // Placeholder radiance cache update stage for indirect lighting reuse.
3
+ }
@@ -0,0 +1,3 @@
1
+ fn process_job() {
2
+ // Placeholder reflection resolve stage for rough/specular response.
3
+ }
@@ -0,0 +1,3 @@
1
+ fn process_job() {
2
+ // Placeholder screen-space tracing stage for first-hit reuse.
3
+ }
@@ -0,0 +1,3 @@
1
+ fn process_job() {
2
+ // Placeholder progressive accumulation stage.
3
+ }
@@ -0,0 +1,3 @@
1
+ fn process_job() {
2
+ // Placeholder denoise stage for interactive reference previews.
3
+ }
@@ -0,0 +1,3 @@
1
+ fn process_job() {
2
+ // Placeholder path tracing kernel for reference rendering.
3
+ }
@@ -0,0 +1,15 @@
1
+ struct PathTracerParams {
2
+ frame_index: u32,
3
+ max_bounces: u32,
4
+ samples_per_pixel: u32,
5
+ enable_next_event_estimation: u32,
6
+ };
7
+
8
+ struct PathSample {
9
+ radiance: vec3<f32>,
10
+ throughput: vec3<f32>,
11
+ };
12
+
13
+ fn luminance(value: vec3<f32>) -> f32 {
14
+ return dot(value, vec3<f32>(0.2126, 0.7152, 0.0722));
15
+ }
@@ -0,0 +1,3 @@
1
+ fn process_job() {
2
+ // Placeholder froxel integration stage for volumetric lighting.
3
+ }
@@ -0,0 +1,15 @@
1
+ struct FroxelGridParams {
2
+ grid_width: u32,
3
+ grid_height: u32,
4
+ grid_depth: u32,
5
+ scattering_strength: f32,
6
+ };
7
+
8
+ struct MediumSample {
9
+ extinction: vec3<f32>,
10
+ inscattering: vec3<f32>,
11
+ };
12
+
13
+ fn saturate(value: f32) -> f32 {
14
+ return clamp(value, 0.0, 1.0);
15
+ }
@@ -0,0 +1,3 @@
1
+ fn process_job() {
2
+ // Placeholder volumetric shadow resolve stage.
3
+ }
@@ -0,0 +1,2 @@
1
+ type,github_handle,full_name,company,email,date,approver
2
+ corporate,Zephod111r,Phillip Hounslow,Plasius LTD,zephod@plasius.co.uk,2025-09-12,Phillip Hounslow (Maintainer)
package/legal/CLA.md ADDED
@@ -0,0 +1,22 @@
1
+ # Contributor License Agreements (CLA)
2
+
3
+ To protect the intellectual property of this project and ensure clarity of rights, all contributors must sign a Contributor License Agreement (CLA) before their first contribution.
4
+
5
+ ## Which CLA should I sign?
6
+
7
+ - **Individual CLA**: If you are contributing personally and not on behalf of an employer, sign the [Individual CLA](INDIVIDUAL_CLA.md).
8
+ - **Corporate CLA**: If you are contributing as part of your work for a company, the company should sign the [Corporate CLA](CORPORATE_CLA.md).
9
+
10
+ ## How to sign
11
+
12
+ 1. Download the appropriate CLA file (Individual or Corporate).
13
+ 2. Fill in the required details, sign, and date it.
14
+ 3. Email a PDF copy of the signed document to **[contributors@plasius.co.uk](mailto:contributors@plasius.co.uk)** with subject: `CLA – Individual` or `CLA – Corporate`.
15
+
16
+ ## Registry
17
+
18
+ All signed CLAs are logged internally in the CLA registry (`CLA-REGISTRY.csv`).
19
+
20
+ ## Questions?
21
+
22
+ If you have any questions about which CLA to sign or how the process works, please email **[contributors@plasius.co.uk](mailtocontributors@plasius.co.uk)**.
@@ -0,0 +1,57 @@
1
+ # Corporate Contributor License Agreement (CLA)
2
+
3
+ ## Purpose
4
+
5
+ This Corporate Contributor License Agreement ("Agreement") is intended to protect the intellectual property rights of the contributors and the project, ensure clear licensing terms for contributions, and maintain trust within the community. By signing this Agreement, the corporation agrees to the terms that facilitate the use, distribution, and modification of contributions under the project's licensing framework.
6
+
7
+ ## Agreement
8
+
9
+ 1. **Representation of Authority**
10
+ The undersigned individual represents and warrants that they have the full legal authority to enter into this Agreement on behalf of the corporation named below ("Corporation") and to grant the rights contained herein.
11
+
12
+ 2. **Grant of Copyright License**
13
+ The Corporation hereby grants to the project maintainers and users a perpetual, worldwide, non-exclusive, royalty-free, irrevocable copyright license to use, reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute the contributions submitted to the project.
14
+
15
+ 3. **Grant of Patent License**
16
+ The Corporation hereby grants to the project maintainers and users a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license under any patent claims that are necessarily infringed by the contributions to make, use, sell, offer for sale, import, and otherwise dispose of the contributions or derivative works thereof.
17
+
18
+ 4. **Warranties and Representations**
19
+ The Corporation represents and warrants that:
20
+
21
+ - The contributions are the original work of the Corporation or that the Corporation has sufficient rights to grant the licenses herein.
22
+ - The submission of the contributions does not violate any agreements or rights of third parties.
23
+
24
+ 5. **No Revocation**
25
+ This license is granted on a perpetual basis and cannot be revoked, provided that the terms of this Agreement are met.
26
+
27
+ 6. **Governing Law**
28
+ This Agreement shall be governed by and construed in accordance with the laws of the United Kingdom, without regard to its conflict of laws principles.
29
+
30
+ 7. **Execution**
31
+
32
+ This Agreement is effective upon signature by the authorized representative of the Corporation. Please sign and date this document, then email a scanned PDF copy to [contributors@plasius.co.uk](mailto:contributors@plasius.co.uk).
33
+
34
+ ---
35
+
36
+ ### **@plasius/gpu-lighting**
37
+
38
+ **Corporation Legal Name:** \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
39
+
40
+ **Authorized Representative:** \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
41
+
42
+ **Title:** \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
43
+
44
+ **Email:** \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
45
+
46
+ **Date:** \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
47
+
48
+ **Signature:** \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
49
+
50
+ ---
51
+
52
+ ## How to Sign
53
+
54
+ - Download this file as a template.
55
+ - Fill in the Corporation’s legal name, authorized representative, title, email, date, and provide a signature.
56
+ - Sign and date the document.
57
+ - Send a scanned copy of the signed Agreement to [contributors@plasius.co.uk](mailto:contributors@plasius.co.uk).
@@ -0,0 +1,91 @@
1
+ # Individual Contributor License Agreement (CLA)
2
+
3
+ **Project:** @plasius/gpu-lighting (Plasius LTD)
4
+ **Version:** 1.0 — 2025‑09‑12
5
+ **Contact:** [contributors@plasius.co.uk](mailto:contributors@plasius.co.uk)
6
+
7
+ ---
8
+
9
+ ## 1. Definitions
10
+
11
+ - **"You"** (or **"Contributor"**) means the individual signing this CLA and submitting Contributions to the Project.
12
+ - **"Contribution"** means any original work of authorship, including code, documentation, data, designs, or feedback that You submit to the Project in any form (e.g., pull request, issue comment, email, file upload).
13
+ - **"Project"** means the @plasius/gpu-lighting repositories and related materials owned or managed by **Plasius LTD**.
14
+
15
+ ## 2. Copyright License Grant
16
+
17
+ You hereby grant to Plasius LTD a **perpetual, worldwide, non‑exclusive, transferable, sublicensable, royalty‑free, irrevocable** copyright license to:
18
+
19
+ - use, reproduce, publicly display, publicly perform, modify, create derivative works of, and
20
+ - distribute Contributions in source and object form,
21
+ - and to **sublicense** these rights under any terms Plasius LTD chooses, including proprietary or open‑source licenses.
22
+
23
+ ## 3. Patent License Grant
24
+
25
+ You hereby grant to Plasius LTD and its sublicensees a **perpetual, worldwide, non‑exclusive, transferable, royalty‑free, irrevocable** patent license to **make, have made, use, offer to sell, sell, import, and otherwise transfer** the Contribution and derivative works thereof, where such license applies only to patent claims that You **own or control** and that would be infringed by Your Contribution or its combination with the Project.
26
+
27
+ ## 4. Moral Rights & Attribution
28
+
29
+ To the maximum extent permitted by applicable law, You **waive** and agree not to assert any moral rights (e.g., rights of attribution or integrity) in or to the Contribution against Plasius LTD. Plasius LTD may, but is not required to, credit You.
30
+
31
+ ## 5. Representations & Warranties
32
+
33
+ You represent that:
34
+
35
+ 1. **Originality / Rights:** Each Contribution is Your original creation, or You have sufficient rights to submit it and grant the licenses above.
36
+ 2. **No Confidential Info:** Contributions **do not** include confidential information or trade secrets of any third party.
37
+ 3. **No Infringement:** To the best of Your knowledge, Contributions do not infringe any third‑party IP rights.
38
+ 4. **Employment / Contractor Status:** If Your employer or a third party might claim rights in Your Contribution, You have obtained **written permission** to make the Contribution and grant these licenses (attach or reference below), or Your Contribution is made **outside the scope** of your employment and without using your employer’s confidential information or resources.
39
+ 5. **Compliance:** You will follow the Project’s policies (e.g., Code of Conduct, Security Policy) and applicable laws.
40
+
41
+ ## 6. Third‑Party Code
42
+
43
+ If Your Contribution includes code, data, or other material from a third party, You will **identify the material and its license** in the pull request or submission, and ensure it is **compatible** with the Project’s licensing model. You will not submit material subject to terms that require the Project to disclose proprietary source code (e.g., certain copyleft obligations) unless the Project has **pre‑approved** such inclusion in writing.
44
+
45
+ ## 7. Scope & Duration
46
+
47
+ - This CLA covers **all past and future** Contributions You submit to the Project, unless and until You provide written notice to **revoke** it.
48
+ - Revocation is **not retroactive**: rights granted for prior Contributions remain in effect.
49
+
50
+ ## 8. Disclaimer
51
+
52
+ THE CONTRIBUTION IS PROVIDED “AS IS” WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON‑INFRINGEMENT.
53
+
54
+ ## 9. Governing Law & Jurisdiction
55
+
56
+ This CLA is governed by the **laws of England and Wales**, and the courts of England and Wales shall have **exclusive jurisdiction** over any dispute arising out of or relating to it.
57
+
58
+ ## 10. Entire Agreement
59
+
60
+ This CLA is the entire agreement between You and Plasius LTD regarding Contributions. It supersedes any prior discussions relating to Contributions. If any provision is held unenforceable, the remaining provisions remain in full force.
61
+
62
+ ---
63
+
64
+ ## 11. Contributor Information & Signature
65
+
66
+ By signing below, You agree to the terms of this CLA for Your Contributions to the Project.
67
+
68
+ **Full Name:** \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
69
+
70
+ **Email:** \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
71
+
72
+ **GitHub Handle:** \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
73
+
74
+ **Address (optional):** \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
75
+
76
+ **Employer (if applicable):** \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
77
+
78
+ **If employed:** ☐ I confirm Contributions are made outside the scope of employment **or** ☐ I have attached my employer’s written permission.
79
+
80
+ **Signature:** \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
81
+
82
+ **Date (YYYY‑MM‑DD):** \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
83
+
84
+ _Electronic signatures are accepted. You may type your name in the Signature field and email a PDF copy._
85
+
86
+ **Submission:** Please email the signed CLA to **[contributors@plasius.co.uk](mailto:contributors@plasius.co.uk)** with subject line: `CLA – Individual – <GitHubHandle>`.
87
+
88
+ **(Optional) Attachments / Notes:**
89
+
90
+ - Employer permission letter (if required)
91
+ - Third‑party license disclosures (if any)