Skip to content

Instantly share code, notes, and snippets.

@t-mat
Last active June 9, 2025 08:03
Show Gist options
  • Save t-mat/df4054ea8155906ba85c3b84ecea87f8 to your computer and use it in GitHub Desktop.
Save t-mat/df4054ea8155906ba85c3b84ecea87f8 to your computer and use it in GitHub Desktop.
[Unity]Unity 6000 以降のモバイル、コンソール、PC 環境では常に SV_VertexID を使用可能

Unity 6000 以降のモバイル、コンソール、PC 環境では常に SV_VertexID を使用可能

まとめ

  • Unity 6000 以降では OpenGL ES2 のサポートが打ち切られている
  • OpenGL ES3 は SV_VertexID を使用可能
  • よって、Unity 6000 以降のモバイル、コンソール、PC 環境では常に SV_VertexID を使用可能

Unity 6000 以降では OpenGL ES2 のサポートは打ち切られている

参照 : https://docs.unity.cn/6000.0/Documentation/Manual/android-requirements-and-compatibility.html

Graphics API support

Graphics API Support
Vulkan Yes
OpenGL ES 1.0 No
OpenGL ES 1.1 No
OpenGL ES 2.0 No
OpenGL ES 3.0 Yes
OpenGL ES 3.1 Yes
OpenGL ES 3.2 Yes

OpenGL ES3 は SV_VertexID を使用可能

参照 : https://docs.unity3d.com/2020.1/Documentation/Manual/SL-ShaderSemantics.html

Vertex ID: SV_VertexID This feature only exists from DX10 (shader model 4.0) and GLCore / OpenGL ES 3, so the shader needs to have the #pragma target 3.5 compilation directive.

#pragma target 3.5 以降= OpenGL ES 3.0 以降であれば、常に SV_VertexID を使用可能

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment