private void OnBeginRender(Camera camera) { if (profile == null) { return; } // カメラ毎に Renderer を作る if (!renderers.ContainsKey(camera)) { renderers[camera] = new MassiveGrassRenderer(camera, targetTerrain, alphaMaps, profile); Debug.Log(camera + " renderer created"); } foreach (var massiveGrassRenderer in renderers.Values) { massiveGrassRenderer.OnBeginRender(); } }
public void OnBeginRender( Camera camera, MassiveGrassProfile profile, Terrain terrain, List <Texture2D> alphaMaps, int maxParallelJobCount) { if (profile == null) { return; } if (!renderers.ContainsKey(profile)) { renderers[profile] = new MassiveGrassRenderer( camera, terrain, alphaMaps, profile, maxParallelJobCount); Debug.Log($" renderer for {profile} created on {camera}"); } renderers[profile].OnBeginRender(); }