Results 1 to 7 of 7

Thread: WARNING: GeneratePermanentShader - MAX_SHADERS hit

  1. #1

    WARNING: GeneratePermanentShader - MAX_SHADERS hit

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

  2. #2
    What game are you mapping for?

  3. #3

  4. #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)


  5. #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?

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

  7. #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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts