shader move layer


(stealth6) #1

Is it possible to move a layer in a shader


textures/stealth4/gbar
{
	cull none
	noPicmip 
	surfaceparm trans 
	{
		map textures/stealth4/2bar.tga
		blendFunc GL_SRC_ALPHA GL_ONE
		rgbGen const ( 0.0 1.0 0.0 )
		tcmod scale 1 1
		tcMod scroll 0.3 0
	} 
	{
		map textures/stealth4/2bar.tga
		blendFunc GL_SRC_ALPHA GL_ONE
		rgbGen const ( 0.0 1.0 0.0 )
		tcmod scale 1 1
		tcMod scroll -0.4 0
	} 
}

atm I have 2 ‘layers’ 1 moving in one direction, and another moving in the opposite direction.
Now what I want to achieve is to move the x/y coords of the second layer. is that possible?

mm hard to explain :smiley: I want the second layer to have a certain offset.


(IndyJones) #2

animated gif would be helpfull.


(-SSF-Sage) #3

I’m not exactly sure of what you are trying to accomplish. But couldn’t you just offset it in radiant, then the second layer would have the offset from radiant, and the other layer would be moving so it would not matter.


(stealth6) #4

Attatched an image

On the left you can see the effect I am trying to create.
On the right you can see what I have now.

So at the moment I have 2 bars but the just stay on the same line, I want them to fly seperately.

ofc I could just take the left image, that’s besides the point :stuck_out_tongue: there I used 1 image with multiple bars and made 1 go left and 1 go right, so there I have the same problem actually it’s just ‘less’ noticeable.

What I want to do is move one bar up higher like you can see in the image. Is this possible with shaders? I’ve been trying some stuff but haven’t found it yet.

What sage said could be a solution, but then I need multiple brushes on the same place, I’m trying to do it with the shader.


(stealth6) #5

Ok :smiley:
Here’s another little test to try and explain what I mean:
http://www.xfire.com/video/388068/

In the video you can see the effect I want on the left and what I have now on the right.

The texture on the left is built up of 3 different textures placed on top of eachother moving in different directions. But each one of these 3 textures is built up of the same elements (the bars). So I am wondering if I can achieve the same effect with a shader and ONE texture (not three). Then I just move the bars in the shader. Is that possible? Hope you understand it now haha :smiley:

and for those wondering yes it is pretty pointless since the difference is only a few kilobytes in pk3 size, but I just want to know if it’s possible :smiley: I NEED to know! :smiley:


(Avoc) #6

No. It is not possible to offset the texture on a single brush or in a single shader, with only one texture. However, you can add several brushes and place them where you want, that would fake an offset.


(stealth6) #7

mm that’s a shame. Only problem with using a few brushes is that I have to do that EVERY time :s oh well multiple textures it is then hehe :stuck_out_tongue:

Thanks for the info :smiley:


(ailmanki) #8

Try this:
FS Particle Studio
Particle Studio