WARNING: GeneratePermanentShader - MAX_SHADERS hit


(WadeV1589) #1

If I do any light compile except -light -faster I get that error…it’s kinda annoying, so what part of lighting causes it and what’s the best way to stop it?


(ydnar) #2

What game are you mapping for?


(WadeV1589) #3

Elite Force


(ydnar) #4

It’s caused by an excessive number of shader + lightmap combinations. Every unique shader/texture + lightmap combination results in a final internal shader. There’s a limit of 1024 (or maybe 2048) final shaders in-engine.

The simplest way to avoid this problem is to use a larger samplesize on the map, and lower it on specific sections with _lightmapscale on func_groups.

Put the following key on worldspawn:

“_lightmapscale” “2.0”

And group brushes/patches where you want higher-detail shadows into a func_group with the following key:

“_lightmapscale” “1.0” (or “0.5” for 2x detail shadows)

y


(War Master) #5

What are the side effects, if any, of increase the samplesize? Does it have any effects visually speaking or in terms of bsp size?


(Emon) #6

Smaller BSP, and lowered image quality, which you may or may not notice.


(War Master) #7

I thought the colors were a little dull looking but it’s not bad. For one of my maps I have to put the _lightmapscale to 4.0 in the worldspawn to get the map to work.