ugly-game 0.15.65 → 0.15.66
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.
|
@@ -103,6 +103,12 @@ export interface PropMesh {
|
|
|
103
103
|
transmission?: number;
|
|
104
104
|
/** Display-referred albedo render texture, bypassing lighting/tone mapping. */
|
|
105
105
|
unlit?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Self-lit surface (flames, embers, lamps): vertex colour × albedo texture,
|
|
108
|
+
* display-referred, bypassing lighting and tone mapping but still fogged
|
|
109
|
+
* with distance. Unlike `unlit`, vertex colours count.
|
|
110
|
+
*/
|
|
111
|
+
glow?: boolean;
|
|
106
112
|
/** Caller-owned linear occlusion/roughness/metalness map (RGB). */
|
|
107
113
|
ormMap?: GPUTexture;
|
|
108
114
|
normalScale?: number;
|
package/dist/assets/gpuProps.js
CHANGED
|
@@ -438,6 +438,7 @@ fn linearToSrgb(c: vec3<f32>) -> vec3<f32> {
|
|
|
438
438
|
lit = toneMap(radiance);
|
|
439
439
|
}
|
|
440
440
|
// A display-referred render texture (rear-view camera) is already lit.
|
|
441
|
+
if (mtl.optics.y > 1.5) { return vec4(mix(tex.rgb * i.c, u.fog.xyz, f), mtl.mat.x); }
|
|
441
442
|
if (mtl.optics.y > 0.5) { return vec4(tex.rgb, mtl.mat.x); }
|
|
442
443
|
return vec4(mix(lit, u.fog.xyz, f), opacity);
|
|
443
444
|
}`;
|
|
@@ -1161,7 +1162,7 @@ export class GpuPropsRenderer {
|
|
|
1161
1162
|
Math.max(0, Math.min(1, m.pearlStrength ?? 0)),
|
|
1162
1163
|
0,
|
|
1163
1164
|
Math.max(0, Math.min(1, m.transmission ?? 0)),
|
|
1164
|
-
m.unlit ? 1 : 0,
|
|
1165
|
+
m.unlit ? 1 : m.glow ? 2 : 0,
|
|
1165
1166
|
0,
|
|
1166
1167
|
0,
|
|
1167
1168
|
]);
|