Need shader help : rotating a texture before translating


(NoSoup4U) #1

I have been searching and reading the several shaderlab tutorials/help guides, but I can’t seem to find the following effect.

I have one texture with an alpha layer (laserwall_01.tga), that has another texture scolling underneath it (laser_02a_blue.tga) (see example)


textures/etf_mg_metal_color/laserwall_01_blue
{
   qer_editorimage textures/etf_mg_metal_color/laserwall_01.tga
   q3map_lightimage textures/etf_mg_sfx_color/laser_02a_blue.tga
   surfaceparm nomarks

   {
      map textures/etf_mg_metal_color/laserwall_01.tga
   }
   {
      map textures/etf_mg_sfx_color/laser_02a_blue.tga
      tcmod scroll 0 2
      blendfunc add
   }
   {
      map textures/etf_mg_metal_color/laserwall_01.tga
      blendfunc blend
   }
   {
      map $lightmap
      blendfunc GL_DST_COLOR GL_ONE_MINUS_DST_ALPHA
   }
}

Now what I want to achieve (and has costed me several years of my life :slight_smile: ), is the bottom texture to be rotated BEFORE the tcmod_scroll phase kicks in.

At the moment, I have copied the laser_02a_blue.tga-texture (laser_02b_blue.tga) and rotated it (180 degrees) in photoshop ; And gave it an inverse tcmodscroll. (see example)


textures/etf_mg_metal_color/laserwall_01_blue_reverse
{
   qer_editorimage textures/etf_mg_metal_color/laserwall_01.tga
   q3map_lightimage textures/etf_mg_sfx_color/laser_02b_blue.tga
   surfaceparm nomarks

   {
      map textures/etf_mg_metal_color/laserwall_01.tga
   }
   {
      map textures/etf_mg_sfx_color/laser_02b_blue.tga
      tcmod scroll 0 -2
      blendfunc add
   }
   {
      map textures/etf_mg_metal_color/laserwall_01.tga
      blendfunc blend
   }
   {
      map $lightmap
      blendfunc GL_DST_COLOR GL_ONE_MINUS_DST_ALPHA
   }
}

Anyone can help me out with this one?

I somehow hope it will solve another problem I am having at the moment :
Some (afaik, shader corruption) error I get when playing a map :

WARNING: RE_AddPolyToScene: NULL poly shader

While it’s not bothering the gameplay, or having any negative effects in-game, it’s flooding the console.

Anyone here has a clue where I could start my search to solve that error ?
Thanks in advance.