修改水
This commit is contained in:
@@ -24,10 +24,10 @@ namespace Obi
|
||||
{
|
||||
ObiPaintBrushEditorTool paintTool = (ObiPaintBrushEditorTool)meshBasedEditor.currentTool;
|
||||
|
||||
float[] weights = new float[ObiActorBlueprintEditor.selectionStatus.Length];
|
||||
float[] weights = new float[editor.selectionStatus.Length];
|
||||
for (int i = 0; i < weights.Length; i++)
|
||||
{
|
||||
if (paintTool.selectionMask && !ObiActorBlueprintEditor.selectionStatus[i])
|
||||
if (paintTool.selectionMask && !editor.selectionStatus[i])
|
||||
weights[i] = 0;
|
||||
else
|
||||
weights[i] = 1;
|
||||
|
||||
@@ -13,13 +13,11 @@ namespace Obi
|
||||
private Shader shader;
|
||||
private Material material;
|
||||
private ParticleImpostorRendering impostorDrawer;
|
||||
private MaterialPropertyBlock mpb;
|
||||
|
||||
public ObiBlueprintRenderModeParticles(ObiActorBlueprintEditor editor) :base(editor)
|
||||
{
|
||||
impostorDrawer = new ParticleImpostorRendering();
|
||||
impostorDrawer.UpdateMeshes(editor.blueprint);
|
||||
mpb = new MaterialPropertyBlock();
|
||||
}
|
||||
|
||||
void CreateMaterialIfNeeded()
|
||||
@@ -45,10 +43,8 @@ namespace Obi
|
||||
public override void DrawWithCamera(Camera camera)
|
||||
{
|
||||
CreateMaterialIfNeeded();
|
||||
mpb.SetFloat("_RadiusScale", 1);
|
||||
mpb.SetColor("_ParticleColor", Color.white);
|
||||
foreach (Mesh mesh in impostorDrawer.Meshes)
|
||||
Graphics.DrawMesh(mesh, Matrix4x4.identity, material, 0, camera, 0, mpb);
|
||||
Graphics.DrawMesh(mesh, Matrix4x4.identity, material, 0, camera);
|
||||
}
|
||||
|
||||
public override void Refresh()
|
||||
|
||||
Reference in New Issue
Block a user