|
@@ -81,6 +81,8 @@ export class ObjExporter extends MeshExporter<ObjData> {
|
|
|
const colorType = values.dColorType.ref.value;
|
|
|
const tColor = values.tColor.ref.value.array;
|
|
|
const uAlpha = values.uAlpha.ref.value;
|
|
|
+ const dOverpaint = values.dOverpaint.ref.value;
|
|
|
+ const tOverpaint = values.tOverpaint.ref.value.array;
|
|
|
const dTransparency = values.dTransparency.ref.value;
|
|
|
const tTransparency = values.tTransparency.ref.value;
|
|
|
const aTransform = values.aTransform.ref.value;
|
|
@@ -162,6 +164,13 @@ export class ObjExporter extends MeshExporter<ObjData> {
|
|
|
default: throw new Error('Unsupported color type.');
|
|
|
}
|
|
|
|
|
|
+ if (dOverpaint) {
|
|
|
+ const group = isGeoTexture ? ObjExporter.getGroup(groups, i) : groups[indices![i]];
|
|
|
+ const overpaintColor = Color.fromArray(tOverpaint, (instanceIndex * groupCount + group) * 4);
|
|
|
+ const overpaintAlpha = tOverpaint[(instanceIndex * groupCount + group) * 4 + 3] / 255;
|
|
|
+ color = Color.interpolate(color, overpaintColor, overpaintAlpha);
|
|
|
+ }
|
|
|
+
|
|
|
let alpha = uAlpha;
|
|
|
if (dTransparency) {
|
|
|
const group = isGeoTexture ? ObjExporter.getGroup(groups, i) : groups[indices![i]];
|