Skip to content

Commit

Permalink
check SystemInfo.supportsComputeShaders
Browse files Browse the repository at this point in the history
  • Loading branch information
mlavik1 committed Mar 23, 2024
1 parent 4825eef commit 7283dcd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Assets/Scripts/Lighting/ShadowVolumeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ public class ShadowVolumeManager : MonoBehaviour
private double lastUpdateTimeEditor = 0.0f;
private bool isDirty = true;

private void Awake()
{
if (!SystemInfo.supportsComputeShaders)
{
Debug.LogError("Shadow volumes not supported on this platform (SystemInfo.supportsComputeShaders == false)");
DestroyImmediate(this);
}
}

private void Start()
{
if (!initialised)
Expand Down

0 comments on commit 7283dcd

Please sign in to comment.