Heyo - I’m trying to set up a material however I very quickly run out of texture samplers. Upon looking into this, it appears that UE4 uses 13 samplers for a newly created empty material! I thought it only needed around 3 or 4.
I found that I could try setting my sampler parameters to “Shared: Wrap” to prevent then from taking up what limited number of sampler slots I had, but this seemed to do nothing. I was informed that this was probably due to me using the OpenGL renderer over on the Unreal Slackers Discord group.
Anyways, is this a known issue with Unreal, or does anyone know any workarounds? Any advice would be much appreciated
Some details:
OS: Arch Linux
Renderer: OpenGL, using Shader Model 5
UE4 version: 4.18.3 (Compiled from source at tag 4.18.3-release)
Ah good to know I’m not the only one with the issue.
And I thought the sampler count was limited to 16 because of a Direct3D limitation - I didn’t think SM5 would increase it? [HR][/HR]EDIT
Nevermind I found a thing that says the OpenGL 4.3 path should have 32 samplers max (https://answers.unrealengine.com/que…texture-s.html) - but the log does say it’s using OGL 4.3 and SM5. Perhaps I’ll try merging the PR in that answers page later.
Yeah, the PR works fine for me. Merge in the PR locally, then rerun ./GenerateProjectFiles.sh, ./Setup.sh, and make to recompile the engine (It’s a large recompile, around 1000+ steps)
You may need to run “export TERM=xterm” first if you get a magic number error to workaround a mono bug
Thanks for the info! I find out that my shader actually uses something like 40 samplers, so I switched to Vulkan, that seems to work even better than OpenGL. (Some geometry is lost and etc)