Version: 2020.2
言語: 日本語

SystemInfo.hasDynamicUniformArrayIndexingInFragmentShaders

マニュアルに切り替える
public static bool hasDynamicUniformArrayIndexingInFragmentShaders ;

説明

Returns true when the GPU has native support for indexing uniform arrays in fragment shaders without restrictions.

Some OpenGL ES 2 GPUs do not support indexing uniform arrays in fragment shaders using arbitrary variables. The OpenGL ES 2 GLSL specification requires only indexing by constants, for-loop counters and combinations of those in fragment shaders. Support for indexing using other variables is not guaranteed. The generated shader code handles these differences by providing wrappers for each of the indexed arrays used in the shader. The wrappers provide two code paths, one indexing the array directly, and another emulating indexing using branching. When running on a device, the shader compiler selects the correct code path depending on the device capabilities. This flag provides a possibility to select a simpler shader when running on devices that lack native support for indexing uniform arrays in fragment shaders using arbitrary variables.