x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

SM5 on Linux is limited to 16 texture samplers

Using Unreal Engine 4.10.1 on Linux, Shader Model 5 (OpenGL 4.3) is limited to 16 texture samplers per material, no matter what the samplers are set to use as their texture source (clamp or wrap).

I'm running the editor from the terminal, using the -opengl4 switch. The default memory allocator (binned) is used.

The engine is a direct-from-github compilation of the Release branch.

System information:
Linux Mint 17.3 Rosa (64-bit)
Nvida GeForce GTX 660Ti, 2048MB
Engine Version: 4.10.1-0+++depot+UE4-Releases+4.10

Product Version: UE 4.10
Tags:
more ▼

asked Dec 27 '15 at 07:28 PM in Bug Reports

avatar image

Jargon
808 39 30 65

avatar image Doug E ♦♦ STAFF Jan 04 '16 at 07:31 PM

Hey Jargon-

How are you setting up your texture/texture sample in the editor? Can you provide a screenshot of exactly what you see when applying the texture?

avatar image Jargon Jan 05 '16 at 05:40 PM

Sure thing! This is the error produced in the terminal:

 [2016.01.05-17.34.25:306][244]LogShaderCompilers:Warning: Failed to compile Material /Game/Materials/Maps/Tileset/Feralas.Feralas for platform GLSL_430, Default Material will be used in game.

As for the material, it's set up like this:

alt text

The samplers are just textures, and they're all set to Wrap. Same thing happens for Clamp, and I'm not 100% sure what the difference between them are x)

The Layer Blend just plugs right into BaseColor, and the visible network is replicated below for normal maps as well. I'm afraid I can't show you an in-game screenshot at the moment, as I'm experiencing the black viewport bug again (for some reason, Scalability won't override ProjectSettings, but that's a whole 'nother bug report), but I'm sure you can picture gray checkerboards everywhere x) The default material is used everywhere the material is applied when it won't compile.

The very same material works fine on Windows, where it was originally created.

samplererror.png (440.8 kB)
(comments are locked)
10|2000 characters needed characters left

3 answers: sort voted first

Fix ended up being fairly trivial. Per Epic's wishes the OpenGL 3 path limit was left at 16 shaders for Mac compatibility, but the OpenGL 4.3 path limit was increased to 32 shaders. Testing the modification on OpenGL 4.3 (Gallium / mesa 12) showed much improved graphics and no obvious glitches when compared with the previous codebase.

Pull request: https://github.com/EpicGames/UnrealEngine/pull/2610

more ▼

answered Jul 18 '16 at 06:48 PM

avatar image

madscientist159
31 1 2 1

(comments are locked)
10|2000 characters needed characters left

After setting up a material based on your description/screenshot I realized that the problem is the OpenGL rendering path. As mentioned in the release notes linked below, DirectX can support more textures than OpenGL. Since Linux uses the OpenGL path to enable SM5 it falls into the same restrictions.

Here is the link to the release notes I mentioned.(https://docs.unrealengine.com/latest/INT/Support/Builds/ReleaseNotes/2014/4_6/index.html)

Cheers

Doug Wilson

more ▼

answered Jan 07 '16 at 09:11 PM

avatar image Jargon Jan 07 '16 at 09:26 PM

Yes, this is sort of what this report is about x)

As I have understood it, OpenGL 4.1 and below does not support more than 16 samplers, period. However, OpenGL 4.3 does support more than that, and the engine can and does run on 4.3 when running on Linux. I recall someone saying (can't remember who) that Mac is stuck on 4.1 for now, but that doesn't have to be the case for other platforms.

Are you absolutely certain that it is not possible to circumvent the limitation on Linux?

avatar image Doug E ♦♦ STAFF Jan 08 '16 at 03:06 PM

I have not been able to find any information about OpenGL4.3 supporting a different number of samples than previous versions. Could you post the link to where you found this information originally?

avatar image Jargon Jan 08 '16 at 04:26 PM

I'm searching for the original link at the moment, but it has been mentioned by Epic staff before.

According to marksatt-pitbull, it's filed internally as UE-18641.

I did come across some discussions about circumventing the limitation here, for instance. However, I'm not a graphics programmer, so I can't say for sure if it's relevant. I'll keep searching and talk to some buddies who are more involved in the rendering side of things.

avatar image Salamanderrake Jan 08 '16 at 09:20 PM

The sample thing is supposed to work, but it does not, I don't know if they will ever fix it though.

avatar image madscientist159 Jul 14 '16 at 12:20 AM

Is this going to receive any attention? I'm seeing this error while attempting to work on UT4 on Linux.

avatar image Doug E ♦♦ STAFF Jul 14 '16 at 12:45 PM

Currently our resources are dedicated elsewhere and UE-18641 is not a priority item for us to work on. We don't have a timeframe for when this may be addressed. I have added additional comments to UE-18641 to indicate that this is still affecting many community members. Please keep in mind that with source code access, a programmer on your project can implement your own solution, and you are welcome to share that result with Epic for possible integration.

avatar image madscientist159 Jul 15 '16 at 01:59 AM

Definitely, and this is something we're looking into. I'm not sure the current restriction even corresponds to the current state of OpenGL on Linux since most of the information I can find states modern cards expose at least 32 texture units.

Is there any information in the internal bug report that might be useful if I decide to look into this?

Thanks!

avatar image aFoxNamedMorris Jul 16 '16 at 11:47 PM

This issue is now plaguing Unreal Tournament 4 under Linux. It's affecting the post-processing and the Underland map, as well as most community made maps. This is seriously negatively affecting the Linux community's user experience with UT4. Please make this a priority.

avatar image madscientist159 Jul 18 '16 at 04:25 AM

I believe I have a fix for this. Currently undergoing testing.

avatar image Doug E ♦♦ STAFF Jul 15 '16 at 12:37 PM

The bug report simply states that the issue with texture samples exists with information on reproducing it for internal testing.

avatar image VSZ Jul 18 '16 at 02:14 PM

+1, just wanted to add that this is affecting my game's Linux experience too.

Thanks to @madscientist159 for attempting a fix; engine-level code is a bit intimidating to dive into so I'm hoping you or Epic can rescue the rest of us with a fix! Thanks to everyone for all your efforts.

avatar image Jargon Jul 26 '16 at 06:27 PM

Epic just opened up their internal issue tracker for direct voting on issues. This one is considered backlogged, but we might get them to move on it if we vote it up. https://issues.unrealengine.com/issue/UE-18641

(comments are locked)
10|2000 characters needed characters left

Still broken with the latest UE for the ocean project: https://forums.unrealengine.com/showthread.php?42092-Community-Project-WIP-Weather-amp-Ocean-Water-Shader/page28

Ubuntu, OpenGL 4.5, shadermodel 5

Will continue on Windows and hope it gets fixed before my game is finished. Thanks

more ▼

answered Feb 06 '16 at 11:34 AM

avatar image

Mike4
6 2 4

avatar image Salamanderrake Jan 08 '17 at 10:28 PM

Yeah, with the OceanProject from TheZoc repo and 4.14 (he updated his to 4.14 because the official is stuck at 4.12) we still get the texture samples limit error message with opengl4 and sm5. http://imgur.com/a/HrOba Here is a screen shot of an instance of the Ocean Material. I can see the ocean, its glitchy at best, while disabling tessellation, but tessellation is needed for this project. It still complains about going over 16 samples. 22/16

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question