Author Topic: Custom Shaders  (Read 4837 times)

NAB622

  • Posts: 6
  • Turrets: +1/-1
Custom Shaders
« on: February 16, 2008, 07:41:59 am »
Hello, it's me. Nobody knows who I am. Nobody cares. I love my anonymity! And I'm gonna be so annoying to everyone here.

Anyways, someone I know decided to take a break from the Jedi Academy modding community and make a Tremulous map. I'm tagging along with him, but I have run into a major issue. I cannot get any custom shaders to work. All I get is the gray-and-white grid squares appearing. I also get a message in the console saying that the textures have failed to load. I did /sv_pure 0, but that didn't help, either.

I have put the shaders in shaderlist.txt, so I don't think that's the problem. Radiant and Jedi Academy can load the shaders fine, but Tremulous can't. Why would this be? I need my shaders!!

Here's the code for one of the shaders:

Code: [Select]
textures/testmap/portal
{
qer_editorimage textures/imp_mine/kplate3
surfaceparm nomarks
surfaceparm nonsolid
surfaceparm nonopaque
surfaceparm trans
q3map_nolightmap
q3map_novertexshadows
    {
        map $whiteimage
        blendFunc GL_ONE GL_ONE
        rgbGen wave sin -999.5 1000 0 0.064
    }
    {
        map textures/spiral_graphics/cape_amethyst
        blendFunc GL_ONE GL_SRC_ALPHA
        rgbGen wave sin 0.35 0.04 1 0.6
        alphaGen const 0.6
        tcMod rotate 35
    }
    {
        map textures/spiral_graphics/starburst
        blendFunc GL_ONE GL_SRC_ALPHA
        rgbGen const ( 0.380000 0.380000 0.380000 )
        alphaGen const 0.9
        tcMod rotate 325
    }
}

textures/testmap/portal2
{
qer_editorimage textures/common/water_1
surfaceparm nomarks
surfaceparm nonsolid
surfaceparm nonopaque
surfaceparm trans
q3map_nolightmap
q3map_novertexshadows
    {
        map $whiteimage
        blendFunc GL_ONE GL_ONE
        rgbGen wave sin -999 1000 0 0.2
    }
    {
        map $whiteimage
        blendFunc GL_ONE GL_ONE
        rgbGen wave sin -999 1000 0 0.35
    }
    {
        map textures/spiral_graphics/spiral
        blendFunc GL_ONE GL_ONE
        rgbGen const ( 0.500000 0.500000 0.500000 )
        alphaGen const 0.2
        tcMod scroll 6 -0.2
    }
    {
        map textures/spiral_graphics/cape_amethyst
        blendFunc GL_ONE GL_SRC_ALPHA
        rgbGen wave sin 0.25 0.06 1 0.5
        alphaGen const 0.8
        tcMod rotate 35
    }
}


It's a shame, because I wanted to port a JA map (legally) to Tremulous, but I can't do it because the shader didn't work. It would be so much fun, too.
« Last Edit: February 16, 2008, 07:46:34 am by NAB622 »

Lava Croft

  • Guest
Re: Custom Shaders
« Reply #1 on: February 16, 2008, 07:54:19 am »
If the shaders do not load, it should output error messages to the console. Care to post those?

NAB622

  • Posts: 6
  • Turrets: +1/-1
Re: Custom Shaders
« Reply #2 on: February 16, 2008, 06:43:58 pm »
I also get a message in the console saying that the textures have failed to load.

The exact message is this:


I've check the directories over and over, I know they're all saved as baseline JPG's...and I also tried PK3ing them. Nothing helped.

NAB622

  • Posts: 6
  • Turrets: +1/-1
Re: Custom Shaders
« Reply #3 on: February 18, 2008, 10:32:02 pm »
Let's try a different approach, then - what do you do to make a shader in tremulous? Is it exactly the same as Q3, except they just go into the 'scripts' folder instead of a 'shaders' folder?

If that's all, then I'll have to try some things with those textures.

Odin

  • Spam Killer
  • *
  • Posts: 1767
  • Turrets: +113/-204
    • My Website
Re: Custom Shaders
« Reply #4 on: February 18, 2008, 10:36:21 pm »
Try adding the extensions to the textures that are referenced.

Example: Change cape_amethyst to cape_amethyst.jpg.
« Last Edit: February 18, 2008, 10:38:20 pm by Odin »

NAB622

  • Posts: 6
  • Turrets: +1/-1
Re: Custom Shaders
« Reply #5 on: February 20, 2008, 08:34:44 pm »
...........!!!!!!!!!!!!!!!!! IT WORKS!!!

Thanks.....it would have taken me FOREVER to notice that. I wonder why Tremulous needs the file extensions added.

Odin

  • Spam Killer
  • *
  • Posts: 1767
  • Turrets: +113/-204
    • My Website
Re: Custom Shaders
« Reply #6 on: February 21, 2008, 02:21:09 am »
Maybe because JA might use tga files only. They might also reference other shaders inside other shaders.

Kaleo

  • Posts: 2098
  • Turrets: +176/-220
    • KaleoDesign
Re: Custom Shaders
« Reply #7 on: February 21, 2008, 09:11:00 am »
Maybe because JA might use tga files only. They might also reference other shaders inside other shaders.

Nope. Uses jpgs... Might just be all the fucking that LA did to idTech3 to make JA
Quote from: Stannum
Thou canst not kill that which doth not live,
but you can blow it into chunky kibbles!
I has a cookie, and u can has a cookie, but i no givs u mai cookie...

Rhez

  • Posts: 46
  • Turrets: +3/-4
Re: Custom Shaders
« Reply #8 on: February 24, 2008, 01:31:25 am »
this may be too off topic but i need to ask a question for the FAQ (it was moved to this topic) and I need all of your help: when I was playing a server on Tremulous and was on the human team i noticed that I can't scroll to my third upgrade and last upgrade, it'll go back to the previous upgrade selected. So then the problem is still not fixed, but I always needed to scroll fast to select my third or last upgrade and click to use it, but i need this problem fixed, so... help? PS this is my first post!!!