|
6 | 6 | inRgbe = op.inBool("Convert RGBE", false), |
7 | 7 |
|
8 | 8 | inRGB = op.inSwitch("Channels", ["RGB", "R", "G", "B"], "RGB"), |
9 | | - |
| 9 | + inType = op.inSwitch("Type", ["Automatic", "Default", "Depth", "Cubemap"], "Automatic"), |
| 10 | + |
10 | 11 | inPickColor = op.inBool("Show Color", false), |
11 | 12 | inX = op.inFloatSlider("X", 0.5), |
12 | 13 | inY = op.inFloatSlider("Y", 0.5), |
@@ -131,13 +132,25 @@ op.renderVizLayerGl = (ctx, layer) => |
131 | 132 |
|
132 | 133 | const oldTex = cgl.getTexture(texSlot); |
133 | 134 | const oldTexCubemap = cgl.getTexture(texSlotCubemap); |
134 | | - |
| 135 | + |
| 136 | + let iTexType = inType.get(); |
135 | 137 | let texType = 0; |
136 | 138 | if (portTex) |
137 | 139 | { |
138 | | - if (portTex.cubemap) texType = 1; |
139 | | - if (portTex.textureType == CGL.Texture.TYPE_DEPTH) texType = 2; |
140 | | - |
| 140 | + if (iTexType == "Automatic") |
| 141 | + { |
| 142 | + if (portTex.cubemap) texType = 1; |
| 143 | + if (portTex.textureType == CGL.Texture.TYPE_DEPTH) texType = 2; |
| 144 | + } |
| 145 | + else if (iTexType == "Depth") |
| 146 | + { |
| 147 | + texType = 2; |
| 148 | + } |
| 149 | + else if (iTexType == "Cubemap") |
| 150 | + { |
| 151 | + texType = 1; |
| 152 | + } |
| 153 | + |
141 | 154 | if (texType == 0 || texType == 2) |
142 | 155 | { |
143 | 156 | cgl.setTexture(texSlot, portTex.tex); |
|
0 commit comments