With cordite in the air, splintered steel, shell casings and powder burns, there’s only one explanation...
Old WQ3 forum - archived. Links may not work.

messy shaders

Postby Breli » Tue Jan 02, 2007 1:51 am

hi,

I wanted to copy the nice vine texture and the corresponding shader from L3thals lake map respectively from Socks POM map. Everything looks just fine in the editor. However, it doesn't work during the game (texture is not translucent).

most likely, I have managed to introduce a major brain fart in the shader code that all the smart people here see immediately ;)

Code: Select all
textures/wq3breli_plant/plant_vine06
{
   qer_editorimage textures/wq3breli_plant/plant_vine06.tga
   q3map_backShader textures/wq3breli_plant/plant_vine06_back
   q3map_vertexScale 2
   qer_alphafunc greater 0.5
   surfaceparm alphashadow
   surfaceparm trans
   surfaceparm nonsolid
   surfaceparm nomarks
   qer_trans 0.99
   {
      map textures/wq3breli_plant/plant_vine06.tga
      rgbGen vertex
      depthWrite
      alphaFunc GE128      
   }   
}

textures/wq3breli_plant/plant_vine06_back
{
   surfaceparm trans
   surfaceparm nonsolid
   surfaceparm nomarks
   {
      map textures/wq3breli_plant/plant_vine06.tga
      rgbGen const ( 0.2 0.2 0.2 )
      alphaFunc GE128      
   }   
}
SG name: =SG= BRELI

Harmonica: Did you bring a horse?
Gunmen: Looks like we are short on one horse!
Harmonica: No. You brought two too many.
User avatar
Breli
SG Team
 
Posts: 906
Joined: Mon Jul 18, 2005 10:08 am
Location: Germany



Postby ReD NeCKersoN » Tue Jan 02, 2007 4:19 am

I had the same problem with the pine trees in CB. The trees worked for Lethal but not for me. It had something to do with the "back" shader. Here's what I wound up with. I get "shader not found" in the editor but it obviously works in game. We never could really figure it out. But if I remember right it was cull none that at least made it work. The only other difference I see is a lack of qer_trans.
Code: Select all
textures/wq_coyotebluff/conifer
{
        qer_editorimage textures/wq_coyotebluff/conifer.tga
        q3map_backShader textures/wq_coyotebluff/conifer_back
        q3map_vertexScale 1.5
   qer_alphafunc greater 0.5
   surfaceparm alphashadow
   surfaceparm trans
   surfaceparm nomarks
        surfaceparm nonsolid
   cull none

   {
   map textures/wq_coyotebluff/conifer.tga
        rgbGen vertex
   depthWrite
   alphaFunc GE128      
   }   
}

textures/wq_coyotebluff/conifer_back
{
   surfaceparm trans
   surfaceparm nonsolid
   surfaceparm nomarks
     
   {
   map textures/wq_coyotebluff/conifer.tga
   rgbGen const ( 0.250 0.250 0.250 )
   alphaFunc GE128      
   }   
}
User avatar
ReD NeCKersoN
SG Team
 
Posts: 3245
Joined: Wed Mar 27, 2002 6:22 am
Location: VA, USA




Return to Editor's Forum

Show Sidebar
Show Sidebar

User Control Panel

cron