Paul Bird
commited on
Commit
•
39f4155
1
Parent(s):
72c0bcf
Upload RunAutomata.cs
Browse files- RunAutomata.cs +4 -10
RunAutomata.cs
CHANGED
@@ -30,7 +30,7 @@ public class RunAutomata : MonoBehaviour
|
|
30 |
//Drag your unlit transparent material here for drawing the output
|
31 |
public Material outputMaterial;
|
32 |
|
33 |
-
//
|
34 |
public Material avgAlphaMaterial;
|
35 |
|
36 |
public enum AutomataNames { Lizard, Turtle ,Poop};
|
@@ -178,19 +178,13 @@ public class RunAutomata : MonoBehaviour
|
|
178 |
|
179 |
void SetupTextures()
|
180 |
{
|
181 |
-
m_currentStateTexture = new RenderTexture(trainedResolution, trainedResolution, 0)
|
182 |
-
{
|
183 |
-
enableRandomWrite = true
|
184 |
-
};
|
185 |
outputMaterial.mainTexture = m_currentStateTexture;
|
186 |
|
187 |
if (avgAlphaMaterial)
|
188 |
{
|
189 |
-
m_currentBlockAlphaStateTexture = new RenderTexture(alphaBlocks, alphaBlocks, 0)
|
190 |
-
|
191 |
-
enableRandomWrite = true
|
192 |
-
};
|
193 |
-
outputMaterial.mainTexture = m_currentBlockAlphaStateTexture;
|
194 |
}
|
195 |
}
|
196 |
|
|
|
30 |
//Drag your unlit transparent material here for drawing the output
|
31 |
public Material outputMaterial;
|
32 |
|
33 |
+
//Optional material to display average alpha
|
34 |
public Material avgAlphaMaterial;
|
35 |
|
36 |
public enum AutomataNames { Lizard, Turtle ,Poop};
|
|
|
178 |
|
179 |
void SetupTextures()
|
180 |
{
|
181 |
+
m_currentStateTexture = new RenderTexture(trainedResolution, trainedResolution, 0);
|
|
|
|
|
|
|
182 |
outputMaterial.mainTexture = m_currentStateTexture;
|
183 |
|
184 |
if (avgAlphaMaterial)
|
185 |
{
|
186 |
+
m_currentBlockAlphaStateTexture = new RenderTexture(alphaBlocks, alphaBlocks, 0);
|
187 |
+
avgAlphaMaterial.mainTexture = m_currentBlockAlphaStateTexture;
|
|
|
|
|
|
|
188 |
}
|
189 |
}
|
190 |
|