Odd Shader Bug

6 replies [Last post]
Managorth Anora
Grim Sorcerer's picture
Offline
Joined: Dec 2010
Posts:

I've came across a shader bug while making a sky shader. I was playing around with the hellsky2 shader and decided to implement lightning in it, worked fine. So instead of having the lightning in the hellsky2 shader I decided to make a separate shader with the EXACT hellsky2 shader but with the lightning shader implemented, I named it hellsky2lightning and when I tested it, the sky was "giving off" lighting to the map, it was just dark. The sky worked perfectly except for one thing, the lighting. What's the problem?

This is the shader:
textures/skies/hellsky2lightning
{
qer_editorimage textures/skies/dimclouds.tga
surfaceparm noimpact
surfaceparm nolightmap

q3map_sun .9 .9 1 70 65 78
q3map_surfacelight 60
skyparms - 512 -
{
map textures/skies/dimclouds.tga
tcMod scroll 0.02 0
tcMod scale 1 1
depthWrite
}
{
animMap 2 textures/skies/zdh_lightning1k1b.tga textures/skies/empty1.tga textures/skies/empty1.tga textures/skies/zdh_lightning1k2b2.tga textures/skies/zdh_lightning1k3b.tga textures/skies/empty1.tga textures/skies/empty1.tga
blendFunc GL_ONE GL_ONE
rgbGen identity
rgbGen wave inverseSawtooth 0 1 0 2
tcMod scale 3 3
//tcMod scale 5 5
}
{
map textures/skies/dimclouds.tga
blendFunc GL_ONE GL_ONE
tcMod scroll 0.02 0.01
tcMod scale 3 3
}

}

It's the EXACT same shader of hellsky2 but with the lightning shader implemented.

epsiplayer
THE ONE AND ONLY
intact-epsilon's picture
Offline
Joined: Dec 2006
Posts:
Re: Odd Shader Bug

can you attach these files for proper tests:
textures/skies/zdh_lightning1k1b.tga
textures/skies/empty1.tga
textures/skies/zdh_lightning1k2b2.tga
textures/skies/zdh_lightning1k3b.tga

cause without them for me it works perfect ...

__________
epsislow


Managorth Anora
Grim Sorcerer's picture
Offline
Joined: Dec 2010
Posts:
Re: Odd Shader Bug

Here...

epsiplayer
THE ONE AND ONLY
intact-epsilon's picture
Offline
Joined: Dec 2006
Posts:
Re: Odd Shader Bug

one more thing :

Quote:
A sky shader can't have more than 2 layers in the shader script.

so no more then 2 stages for skyes =( ..
if it does it will generate more then 1000 vertexes and will throw an error : "Shader_max_vertexes hit in fillcloudskyside()"

__________
epsislow


Managorth Anora
Grim Sorcerer's picture
Offline
Joined: Dec 2010
Posts:
Re: Odd Shader Bug

Why not? That's stupid. The only problem I'm getting is no light.

epsiplayer
THE ONE AND ONLY
intact-epsilon's picture
Offline
Joined: Dec 2006
Posts:
Re: Odd Shader Bug

if i remove the 2nd stage it works:

I have no problem with the lighting ..
___________
epsislow


Managorth Anora
Grim Sorcerer's picture
Offline
Joined: Dec 2010
Posts:
Re: Odd Shader Bug

I'm not getting that problem, and you're going off-topic. You get that error when you go off the map. And I'm still getting the same bug regardless if I have more than 2 shaders.