Ensure correct color attachment formats

This commit is contained in:
Lubos Lenco
2020-05-14 14:06:38 +02:00
parent e6afdbbf58
commit 9bba5a7164
2 changed files with 6 additions and 2 deletions
+4 -1
View File
@@ -19,7 +19,10 @@ class MakePaint {
// cull_mode: "counter_clockwise",
cull_mode: "none",
vertex_elements: [{name: "pos", data: "short4norm"}, {name: "nor", data: "short2norm"}, {name: "tex", data: "short2norm"}],
color_attachments: [Context.layerIsMask ? "R8" : "RGBA32", "RGBA32", "RGBA32", "R8"]
color_attachments:
Context.tool == ToolColorId ? ["RGBA32"] :
Context.tool == ToolPicker ? [Context.layerIsMask ? "R8" : "RGBA32", "RGBA32", "RGBA32"] :
[Context.layerIsMask ? "R8" : "RGBA32", "RGBA32", "RGBA32", "R8"]
});
con_paint.data.color_writes_red = [true, true, true, true];
+2 -1
View File
@@ -11,7 +11,8 @@ class MakeParticle {
depth_write: false,
compare_mode: "always",
cull_mode: "clockwise",
vertex_elements: [{name: "pos", data: "short4norm"}]
vertex_elements: [{name: "pos", data: "short4norm"}],
color_attachments: ["R8"]
});
var vert = con_part.make_vert();