Add swatches tab

This commit is contained in:
luboslenco
2021-01-29 20:51:46 +01:00
parent b6b75b26b8
commit d8dcea5619
12 changed files with 214 additions and 46 deletions
+7 -7
View File
@@ -101,19 +101,19 @@ class Uniforms {
return Context.layer.decalMat.getScale().z * 0.5;
}
case "_pickerOpacity": {
return Context.opacityPicked;
return Context.swatch.opacity;
}
case "_pickerOcclusion": {
return Context.occlusionPicked;
return Context.swatch.occlusion;
}
case "_pickerRoughness": {
return Context.roughnessPicked;
return Context.swatch.roughness;
}
case "_pickerMetallic": {
return Context.metallicPicked;
return Context.swatch.metallic;
}
case "_pickerHeight": {
return Context.heightPicked;
return Context.swatch.height;
}
}
if (MaterialParser.script_links != null) {
@@ -198,12 +198,12 @@ class Uniforms {
}
case "_pickerBase": {
v = iron.object.Uniforms.helpVec;
v.set(Context.baseRPicked, Context.baseGPicked, Context.baseBPicked);
v.set(Context.swatch.base.R, Context.swatch.base.G, Context.swatch.base.B);
return v;
}
case "_pickerNormal": {
v = iron.object.Uniforms.helpVec;
v.set(Context.normalRPicked, Context.normalGPicked, Context.normalBPicked);
v.set(Context.swatch.normal.R, Context.swatch.normal.G, Context.swatch.normal.B);
return v;
}
}