// 変更したいマテリアルをアサイン [SerializeField] private Material newSkyboxMaterial; // Skyboxを設定する RenderSettings.skybox = newSkyboxMaterial;
Unity 公式ドキュメント
Sky
Unity 公式ドキュメント
Lighting ウィンドウ
// フォグを設定する方法 // フォグを有効化(false で無効化) RenderSettings.fog = true; // フォグの色の変更 RenderSettings.fogColor = Color.gray; // フォグの強度の変更 RenderSettings.fogDensity = 0.02f;
// カメラの Clipping Planes を調整する方法(near) Camera.main.nearClipPlane = 0.1f; // カメラの Clipping Planes を調整する方法(far) Camera.main.farClipPlane = 1000f;
Unity 公式ドキュメント
Camera component
// オクルージョンカリングの実装 OcclusionCulling.generationMode = OcclusionCullingMode.OnDemand; OcclusionCulling.doesSceneHaveManualPortals = true;
Unity 公式ドキュメント
Occlusion culling
// リフレクションプローブを設定する方法 ReflectionProbe probe = GetComponent<ReflectionProbe>(); probe.RenderProbe();
Unity 公式ドキュメント
Reflection Probes
// ライトプローブを設定する方法 LightProbes.Tetrahedralize(myProbePositions, myProbeCoefficients);
Unity 公式ドキュメント
Light Probes
Unity 公式ドキュメント
Post-processing and full-screen effects
using UnityEngine; using UnityEngine.Rendering.PostProcessing; public class PostProcessingController : MonoBehaviour { public PostProcessProfile profile; void Start() { var volume = gameObject.AddComponent<PostProcessVolume>(); volume.profile = profile; } }
using UnityEngine; using UnityEngine.Rendering.PostProcessing; public class PostProcessingController : MonoBehaviour { public PostProcessProfile profile; void Start() { var volume = gameObject.AddComponent<PostProcessVolume>(); volume.profile = profile; Bloom bloom; if (volume.profile.TryGetSettings(out bloom)) { bloom.enabled.value = true; bloom.intensity.value = 1.0f; } } }
using UnityEngine; using UnityEngine.Rendering.PostProcessing; public class PostProcessingController : MonoBehaviour { public PostProcessProfile profile; void Start() { var volume = gameObject.AddComponent<PostProcessVolume>(); volume.profile = profile; ColorGrading colorGrading; if (volume.profile.TryGetSettings(out colorGrading)) { colorGrading.enabled.value = true; colorGrading.temperature.value = 0.5f; // 色温度の調整 colorGrading.saturation.value = 1.2f; // 彩度の調整 } } }