Page 1 of 1

Fixing “alphaGen lightingSpecular keyword not supported”

Posted: Fri Feb 27, 2015 7:26 pm UTC
by illwieckz
Hi, some old map I try to port get this kind of message:

Code: Select all

WARNING: alphaGen lightingSpecular keyword not supported in shader 'textures/transit/stannum_wall_shinybluemetal1'
WARNING: alphaGen lightingSpecular keyword not supported in shader 'textures/transit/stannum_tin'


And some textures are overbrighten, it seems related:

Image
Image

How can I fix that, or workaround that?

Edit, the shader are:

Code: Select all

textures/transit/stannum_tin
{
   qer_editorimage textures/transit/tin
   {
      rgbGen identity
      map $lightmap
   }
   {
      map textures/transit/tin
      blendFunc GL_DST_COLOR GL_SRC_ALPHA
      rgbGen identity
      alphaGen lightingSpecular
   }
}

Code: Select all

textures/transit/stannum_wall_shinybluemetal1
{
   {
      map $lightmap
      rgbgen identity     
   }
   {
      map textures/transit/stannum_wall_shinybluemetal1
      blendFunc GL_DST_COLOR GL_SRC_ALPHA
      rgbGen identity
      alphaGen lightingSpecular
   }         
}

Re: Fixing “alphaGen lightingSpecular keyword not supported”

Posted: Fri Feb 27, 2015 10:26 pm UTC
by Viech
I wouldn't know, but somewhere in the XreaL shader manual there should be a solution. :wink:

Re: Fixing “alphaGen lightingSpecular keyword not supported”

Posted: Sat Feb 28, 2015 8:33 pm UTC
by illwieckz
Well, I don't found how to do, the XreaL shader manuel list a specularMap keyword but I don't know how to use it. :confused:

But if I replace that:

Code: Select all

textures/transit/stannum_tin
{
   qer_editorimage textures/transit/tin
   {
      rgbGen identity
      map $lightmap
   }
   {
      map textures/transit/tin
      blendFunc GL_DST_COLOR GL_SRC_ALPHA
      rgbGen identity
      alphaGen lightingSpecular
   }
}


By that:

Code: Select all

textures/transit/stannum_tin
{
   diffuseMap textures/transit/tin
}


I lose the shiny effect but the map is playable:

Image
Image

So if I do not manage to port these unsupported shaders, perhaps I will release the maps with this bad workaround.

Re: Fixing “alphaGen lightingSpecular keyword not supported”

Posted: Wed Mar 04, 2015 4:28 pm UTC
by illwieckz
Tip for people porting maps: if the object is a transparent object (mirror, glass), does not use “diffuseMap” as a workaround (or the object will be mat), keep the whole shader and comment out only the line “alphaGen lightingSpecular”, it's a an acceptable workaround in many cases.

Also, in many case you can use “alphaGen const 0.7” as a workaround to “alphaGen portal 256”, it's only a workaround (you lose functionnalities), but the map will probably be playable with this kind of trick. For example on ancient-remains map, the grass must disappear in front of the the player while he walks. But with this broken line the grass does not appear at all. If you only comment out this line, the grass appears with some weird effect (grass textures from behind appears in front of). If you use “alphaGen const 0.7”, the grass appears, is a little transparent (so you see in front of you), and the more grass there is the more opaque it is, which is acceptable.

You can also use this trick on mirrors (with a lower value) when there is dirty textures on them that must not be opaque !

These tricks are only workaround, you lose functionalities ! So if someone has an idea to correctly port these unsupported shader from Q3 shader to XreaL shader, feel free to explain!
:grin: