是否可能在移动端opengles平台上支持shared sampler?

目前UE是不支持opengles平台使用shared sampler的,也因此不能够在单个shader中使用超过16个贴图/采样器,此前有过其他问题进行讨论:​

[Content removed]

但是,​根据gles的官方文档:https://registry.khronos.org/OpenGL-Refpages/es3.0/html/glBindSampler.xhtml,如果使用Sampler Object,是明确说一个sampler object可以用到多个texture unit上的(A single sampler obiect may be bound to multiple texture units simultaneously),是不是只要目标平台支持es30及以上,其实是可以支持shared sampler,从而能否在当个shader中使用超过16个采样器?

UE原本只是为了兼顾es2的平台而没有支持这一点?或者只是实现上没有使用sampler object?想向官方请教一下。

Steps to Reproduce

Hi,

不是的,虽然文档上说Sampler Object可以绑定到多个texture上,但是再shader里,他们仍然是分开来的,不是同一个。

明白了,之前对glsl的sampler理解有误,以为和hlsl一样是可以texture和sampler分离的,但实际上是不行的。GLES平台cpu侧绑定的采样器的确是shared的,但gpu侧没有区分texture和sampler的概念。