Jump to content

Home

MP Shader trouble...


FoolInTheWave

Recommended Posts

I was adding a shader to the default Kyle skin, here is the shader:

 

models/players/kyle/kyle_head
{
   {
       map models/players/kyle/kyle_head
       rgbGen lightingDiffuse
       //alphaFunc GE128
   }
   {
       map models/players/kyle/kyle_head
       blendFunc GL_SRC_ALPHA GL_ONE
       alphaGen lightingSpecular
 detail
   }
}

models/players/kyle/kyle_legs
{
   {
       map models/players/kyle/kyle_legs
       rgbGen lightingDiffuse
       //alphaFunc GE128
   }
   {
      map models/players/kyle/kyle_legs
       blendFunc GL_SRC_ALPHA GL_ONE
       alphaGen lightingSpecular
 detail
   }
}

models/players/kyle/kyle_legs_blue
{
   {
       map models/players/kyle/kyle_legs_blue
       rgbGen lightingDiffuse
       //alphaFunc GE128
   }
   {
      map models/players/kyle/kyle_legs_blue
       blendFunc GL_SRC_ALPHA GL_ONE
       alphaGen lightingSpecular
 detail
   }
}

models/players/kyle/kyle_legs_red
{
   {
       map models/players/kyle/kyle_legs_red
       rgbGen lightingDiffuse
       //alphaFunc GE128
   }
   {
       map models/players/kyle/kyle_legs_red
       blendFunc GL_SRC_ALPHA GL_ONE
       alphaGen lightingSpecular
 detail
   }
}


models/players/kyle/basic_hand
{
   {
       map models/players/kyle/basic_hand
       rgbGen lightingDiffuse
       //alphaFunc GE128
   }
   {
       map models/players/kyle/basic_hand
       blendFunc GL_SRC_ALPHA GL_ONE
       alphaGen lightingSpecular
 detail
   }
}

models/players/kyle/kyle_torso
{
   {
       map models/players/kyle/kyle_torso
       rgbGen lightingDiffuse
       //alphaFunc GE128
   }
   {
       map models/players/kyle/kyle_torso
       blendFunc GL_SRC_ALPHA GL_ONE
       alphaGen lightingSpecular
 detail
   }
}

models/players/kyle/kyle_torso_blue
{
   {
       map models/players/kyle/kyle_torso_blue
       rgbGen lightingDiffuse
       //alphaFunc GE128
   }
   {
       map models/players/kyle/kyle_torso_blue
       blendFunc GL_SRC_ALPHA GL_ONE
       alphaGen lightingSpecular
 detail
   }
}

models/players/kyle/kyle_torso_red
{
   {
       map models/players/kyle/kyle_torso_red
       rgbGen lightingDiffuse
       //alphaFunc GE128
   }
   {
       map models/players/kyle/kyle_torso_red
       blendFunc GL_SRC_ALPHA GL_ONE
       alphaGen lightingSpecular
 detail
   }
}


models/players/kyle/kyle_extras
{
   {
       map models/players/kyle/kyle_extras
       rgbGen lightingDiffuse
       //alphaFunc GE128
   }
   {
       map models/players/kyle/kyle_extras
       blendFunc GL_SRC_ALPHA GL_ONE
       alphaGen lightingSpecular
 detail
   }
}

models/players/kyle/kyle_extras_blue
{
   {
       map models/players/kyle/kyle_extras_blue
       rgbGen lightingDiffuse
       //alphaFunc GE128
   }
   {
       map models/players/kyle/kyle_extras_blue
       blendFunc GL_SRC_ALPHA GL_ONE
       alphaGen lightingSpecular
 detail
   }
}

models/players/kyle/kyle_extras_red
{
   {
       map models/players/kyle/kyle_extras_red
       rgbGen lightingDiffuse
       //alphaFunc GE128
   }
   {
       map models/players/kyle/kyle_extras_red
       blendFunc GL_SRC_ALPHA GL_ONE
       alphaGen lightingSpecular
 detail
   }
}

models/players/kyle/mouth_eyes
{
   {
       map models/players/kyle/mouth_eyes
       rgbGen lightingDiffuse
       //alphaFunc GE128
   }
   {
       map models/players/kyle/mouth_eyes
       blendFunc GL_SRC_ALPHA GL_ONE
       alphaGen lightingSpecular
 detail
   }
}

models/players/kyle/kyle_face
{
   {
       map models/players/kyle/kyle_face
       rgbGen lightingDiffuse
       //alphaFunc GE128
   }
   {
       map models/players/kyle/kyle_face
       blendFunc GL_SRC_ALPHA GL_ONE
       alphaGen lightingSpecular
 detail
   }
}

 

Now, the shader works fine in single player. But when I go to play multiplayer, the Kyle model is missing parts of the skin and I get error messages regarding the shader as follows:

 

WARNING: expecting '{', found 'blendFunc' instead in shader 'models/players/kyle/kyle_torso
WARNING: expecting '{', found 'blendFunc' instead in shader 'models/players/kyle/kyle_extras
WARNING: expecting '{', found 'blendFunc' instead in shader 'models/players/kyle/kyle_hand
WARNING: expecting '{', found 'blendFunc' instead in shader 'models/players/kyle/kyle_face
WARNING: expecting '{', found 'blendFunc' instead in shader 'models/players/kyle/kyle_mouth_eyes

 

Is there any way to make this shader work in multiplayer?

Link to comment
Share on other sites

Well, I just found out that putting the player.shader file in my pk3 only helped the problem and didn't solve it entirely. :( What I'm trying to do is add new shaders to all of the default skins in Jedi Academy. About half of the skins work with the shaders in multiplayer and I keep getting the same warnings for my shaders. Is there any way to make this fully compatible with multiplayer?

 

Any help would be appreciated as I want to finish this mod and start working on the JK2 version.

Link to comment
Share on other sites

Well, here's how I got it to work. I had all shaders for each character assigned to their own shader file (i.e. Kyle's shaders were in a Kyle.shader file). So what I did is compiled all of the files into the players.shader file which is in the assets1.pk3. Made sure every shader was spaced correctly and it worked like a charm. Works in the default multiplayer, JKA+, and Moviebattles. I'm sure it works with any other multiplayer mod out there too.

 

Still have to finish shaders for the ships and vehicles and this mod should be done. Then I have to whip up a JK2 version and both versions should be out soon.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...