texture/shader problem


(WeeBull) #1

i’ve made 6 textures which i want to use for an animating texture, like the fire textures in textures/sfx. they are all 32 bit .tga’s with an alpha channel.
this is the shader i used, exactly the same as the fire shader in the sfx.shader

textures/weebulls_dm/teleport01
{	qer_editorimage textures/weebulls_dm/teleport01.tga
	q3map_surfacelight 1000
	cull none
	nofog
	surfaceparm nomarks
	surfaceparm nonsolid
	surfaceparm pointlight
	surfaceparm trans

	{
		animMap 10 textures/weebulls_dm/teleport01.tga textures/weebulls_dm/teleport02.tga textures/weebulls_dm/teleport03.tga textures/weebulls_dm/teleport04.tga textures/weebulls_dm/teleport05.tga
		blendFunc GL_ONE GL_ONE
		rgbGen wave inverseSawtooth 0 1 0 10
	}
	{
		animMap 10 textures/weebulls_dm/teleport02.tga textures/weebulls_dm/teleport03.tga textures/weebulls_dm/teleport04.tga textures/weebulls_dm/teleport05.tga textures/weebulls_dm/teleport01.tga
		blendFunc GL_ONE GL_ONE
		rgbGen wave sawtooth 0 1 0 10
	}
	{
		map textures/weebulls_dm/teleportball.tga
		blendFunc GL_ONE GL_ONE
		rgbGen wave sin .6 .2 0 .6
	}
}

my problem is that it doesn’t animate and the alpha channel doesn’t work. i see a blue glow around it, cuz the texture is blue and i see one of the textures, but it’s not animating. i can also see the parts which are black in the alpha channel, so i shouldn’t see these parts.

i’ve got another less important question. i’ve read in the shader manual something about deformVertexes autosprite(2), does this work in ET, if so, where do i have to put this line in the shader. i want to use this in the above shader.

thx in advance


(Shaderman) #2

If you copied a sfx shader and only changed the image paths, I guess there must be something wrong with your images (size? alpha channel?).

deformVertexes autosprite(2), does this work in ET, if so, where do i have to put this line in the shader.

deformVertexes is a general shader keyword (autosprite works in ET AFAIK) and must be used at the beginning of your shader, not in a shader stage.


(WeeBull) #3

i’ve uploaded one of them here, could someone take a look at it? i don’t see why it would be wrong.


(Shaderman) #4

Strange. I’ve modified your image and saved a copy as teleport02.tga. With these two images and this shader everything is fine.

textures/shaderman/teleport01
{
   qer_editorimage textures/shaderman/teleport01.tga
   q3map_surfacelight 1000
   cull none
   nofog
   surfaceparm nomarks
   surfaceparm nonsolid
   surfaceparm pointlight
   surfaceparm trans

   {
      animMap 10 textures/shaderman/teleport01.tga textures/shaderman/teleport02.tga
      blendFunc GL_ONE GL_ONE
      rgbGen wave inverseSawtooth 0 1 0 10
   }
   {
      animMap 10 textures/shaderman/teleport01.tga textures/shaderman/teleport02.tga
      blendFunc GL_ONE GL_ONE
      rgbGen wave sawtooth 0 1 0 10
   }
   {
      map textures/sfx/flameball.tga
      blendFunc GL_ONE GL_ONE
      rgbGen wave sin .6 .2 0 .6
   }
}

I only renamed the paths to shaderman, used those two images for the animation and replaced the image of the 3rd stage. Really strange… Maybe it’s something with your ET config (color depth or something)? Does the sfx/wilsflame1 shader work?


(WeeBull) #5

i’ve made a little testmap to test the sfx/wilsflame1 and it worked. next i put my shader in the testmap and for some reason it also worked so i added it to my real map and then i saw that i had a trigger_teleport around the brush with my shader on it and i decided to put that trigger in front of the brush instead of around it and it worked. i don’t know if it’s because i moved the trigger but at least it works now. and the autosprite thing also works fine. thx for taking the time to help me :smiley: