switching to forward renderer breaks some materials.

Switching to forward renderer breakes some materials… the materials get errors like

“maximum ps_5_0 sampler register index (16) exceeded”

Is there a way to easily fix this?

The main material compiles correctly and displays fine… but the instance has problems… why?

Can you please provide a concise material setup so that I don’t have to use some guesswork? This would be easier to see what’s going on. The forward renderer is new and this likely may not be a bug so much as a limitation of forward rendering with materials vs deferred. I’m not entirely sure at the moment though.

Hey Tim,
I have a few materials that are messing up. Some terrain, others come from the infiltrator project. If you want a material network to test with try installing the infiltrator demo and check “Building_Alpha_Mat_inst”… that one has an issue

Update
Also… fun fact… that material works fine in the 4.14 deferred renderer version of the project… compiles correctly and is in the scene correctly… BUT… if i open up the material in the material editor or the mesh with the material applied to it in the mesh editor… it literally freezes the computer… mouse and all… just does not recover… instant freeze. wtf?

Keep in mind this material worked in previous versions of the editor… and its part of infiltrator.

Hey,

Does this material work in a blank or any other project for you? When I tried it, the material compiles as I would expect. Can you also have a look at the number of Texture Samplers being used in the Material Instance?

In Forward Renderer I have 16/16 texture samplers used.
In Deferred Renderer I have 12/16 texture samplers used.

If you’re using more than the number allotted the material will not compile. In the Forward Renderer, it is expected that more texture samplers will be used as well as Materials are generally more expensive there. You can try changing the Sampler Source to use the Shared resources for these duplicated textures. I was able to get the Infiltrator material you mentioned down to 15/16. For Landscape terrains you’ll still need to keep the material under 13 samplers altogether since I believe 3 are earmarked for used by the editor for things like lightmaps if you’re using static lighting.
The forward renderer is new and has its own functionality that will differ from the deferred renderer. With Materials, you will see additional texture samplers being used. I wouldn’t expect every material that’s worked in previously released content to automatically work in the forward renderer without having to retweak it.

Understood. Im just hoping the deferred render crash of the same material (inside the mesh editor or material editor but not in the scene) is something due to it not being built and the gtx 590 not having enough memory… either that or its a whole other bug… Like i said it is fine on the mesh in the level when navigating around, but if u double click the material or the mesh and open a new window with that editor… it crashes in deferred mode…

Have tested it in a gtx 980m computer and this crash doesnt occur… but in the 590 it did… Seems like 590 is having a lot of problems… possibly because the scene is unbuilt since converting the project to 4.14…