Author Topic: Shaders appearing white  (Read 3281 times)

Josellis

  • Posts: 43
  • Turrets: +0/-0
    • http://planeart.byethost7.com
Shaders appearing white
« on: January 06, 2008, 09:34:54 pm »
I have been working on my first map for a few weeks now, and I have tried to place shaders (most for light, some for metalsteps), and all my shaders appear white. They are functional (they emit light and they sound like metal), they just are plain white. I have read the Quake III Arena Shader Manual, however it uses some language which I find confusing...

Odin

  • Spam Killer
  • *
  • Posts: 1767
  • Turrets: +113/-204
    • My Website
Re: Shaders appearing white
« Reply #1 on: January 06, 2008, 11:20:28 pm »
Can you post the shader?

Josellis

  • Posts: 43
  • Turrets: +0/-0
    • http://planeart.byethost7.com
Re: Shaders appearing white
« Reply #2 on: January 09, 2008, 09:36:41 pm »
Here is the shader. I have copied the script for a light shader and a grill shader from another map and it seems to work, however the others don't.

Code: [Select]
textures/priapulus/trans_grill //works
{
qer_editorimage textures/priapulus/trans_grill.tga
surfaceparm trans
surfaceparm nomarks
surfaceparm metalsteps
cull none

{
map textures/priapulus/trans_grill.tga
alphafunc GE128
depthwrite
}
{
map $lightmap
depthfunc equal
blendfunc filter
}
}

textures/priapulus/light_long_orange //works
{
surfaceparm trans
surfaceparm nomarks
q3map_surfacelight 15000
qer_editorimage textures/priapulus/light_long_orange.blend.jpg
{
map textures/priapulus/light_long_orange
blendfunc gl_dst_color gl_src_alpha
}
{
map textures/priapulus/light_long_orange
blendfunc gl_dst_color gl_src_alpha
}
}

textures/priapulus/light_short_orange //works
{
surfaceparm trans
surfaceparm nomarks
q3map_surfacelight 15000
qer_editorimage textures/priapulus/light_long_orange.blend.tga
{
map textures/priapulus/light_long_orange
blendfunc gl_dst_color gl_src_alpha
}
{
map textures/priapulus/light_long_orange
blendfunc gl_dst_color gl_src_alpha
}
}

textures/priapulus/light_long_white //works
{
surfaceparm trans
surfaceparm nomarks
q3map_surfacelight 15000
qer_editorimage textures/priapulus/light_long_white.blend.tga
{
map textures/priapulus/light_long_orange
blendfunc gl_dst_color gl_src_alpha
}
{
map textures/priapulus/light_long_orange
blendfunc gl_dst_color gl_src_alpha
}
}

textures/priapulus/light_short_white //works
{
surfaceparm trans
surfaceparm nomarks
q3map_surfacelight 15000
qer_editorimage textures/priapulus/light_long_white.blend.tga
{
map textures/priapulus/light_long_orange
blendfunc gl_dst_color gl_src_alpha
}
{
map textures/priapulus/light_long_orange
blendfunc gl_dst_color gl_src_alpha
}
}

textures/priapulus/metal077_light
{
q3map_surfaceLight 50
surfaceparm metalsteps
{
map textures/priapulus/metal077_light.tga
rgbGen identity
depthWrite
}
{
map $lightmap
rgbGen identity
tcGen lightmap
}
}

textures/priapulus/metal097
{
surfaceparm metalsteps
{
map textures/priapulus/metal097.jpg
rgbGen identity
depthWrite
}
{
map $lightmap
rgbGen identity
tcGen lightmap
}
}

textures/priapulus/u_floor_pan5
{
surfaceparm metalsteps
{
map textures/priapulus/u_floor_pan5.jpg
rgbGen identity
depthWrite
}
{
map $lightmap
rgbGen identity
tcGen lightmap
}
}

textures/priapulus/achtung_clang_128
{
surfaceparm metalsteps
{
map textures/priapulus/achtung_clang_128.jpg
rgbGen identity
depthWrite
}
{
map $lightmap
rgbGen identity
tcGen lightmap
}
}


btw, there probably are a few very obvious and silly mistakes, but as I said before, this is my first map, and the Quake III shader manual is mostly gibberish.

Odin

  • Spam Killer
  • *
  • Posts: 1767
  • Turrets: +113/-204
    • My Website
Re: Shaders appearing white
« Reply #3 on: January 09, 2008, 11:33:55 pm »
Can you post the texture?

Bizarre

  • Posts: 18
  • Turrets: +2/-8
Re: Shaders appearing white
« Reply #4 on: January 10, 2008, 02:29:05 pm »
Any screenshots yet?

Taiyo.uk

  • Posts: 2309
  • Turrets: +222/-191
    • Haos Redro
Re: Shaders appearing white
« Reply #5 on: January 10, 2008, 03:14:53 pm »
The shaders that aren't commented as working have no blendFunc in the lightmap stage. Try adding blendFunc filter.

Ingar

  • Tremulous Developers
  • *
  • Posts: 554
  • Turrets: +302/-7
    • Ingar's projects on the Web
Re: Shaders appearing white
« Reply #6 on: January 10, 2008, 07:37:43 pm »
q3map knows a nice trick if you only want to add a metal step sound to a texture:

Code: [Select]
textures/sirius/e8clangfloor05:q3map
{
        surfaceparm metalsteps
}

Search chapter 1 of the shader manual for :q3map Suffix