Scrolling texture behind transparent texture?

  • If you're asking a question make sure to set the thread type to be a question!

Delta_135

L1: Registered
Nov 3, 2014
5
0
Hej!

I've got what seems to a rather unique question;
how to get a not transparent texture to scroll behind a transparent texture. (or rather a texture with transparent parts in it)

Now i've been playing with it for a few hours now and i have gotten it to work, but only using the "VertexLitGeneric" shader mode. (with we all know is less then ideal for a brush texture)

So i looked around some more and found the "WorldTwoTextureBlend" witch seems to do what i need.

The problem is that; while i can make the "not transparent texture" appear behind the transparent texture i can't make it scroll individually, when i add the scroll proxy it scrolls both textures.

before i show you the .vmt file there are a few things i should probably explain first:

The $detail texture is the one on top (aka transparent texture)
and the $basetexture the one underneath and can be seen through part of the detail texture.

So all i need is to animate the $basetexture without animating the $detail texture. I know it might sound insane but as i said it works fine using VertexLitGeneric so i just need to find a light mapped equivalent which WorldTwoTextureBlend seems to fulfill for the most part.

Did that make sense? If not i'll try to reformulate it.

anyway here is the .VMT
Code:
WorldTwoTextureBlend
{
	$basetexture "nature/underworld_lava001"
	$surfaceprop Glass

	$detail "Metal/metaltruss001"
	$detailblendmode 2
	$detailscale 1

	%keywords "test"

	Proxies
	{
		TextureScroll
		{
			textureScrollVar $baseTextureTransform
			textureScrollRate 0.25
			textureScrollAngle 90
		}
	}
}
this wont work as intended but if you replace "WorldTwoTextureBlend" with "VertexLitGeneric" you should see what i mean. (yes the lighting on the brush will glitch, thats why i need different shader)

and yes i did try to other shaders but found none that could display a texture behind a transparent texture in the way i need.
 

Seba

DR. BIG FUCKER, PHD
aa
Jun 9, 2009
2,364
2,728
Is there a reason you can't make two materials and use two brushes? That'd make this a million times easier (maybe just possible, since what you're asking to change sounds hard-coded into shader parameters (although I might be wrong; does fubar know anything about this?)).
 

Delta_135

L1: Registered
Nov 3, 2014
5
0
Is there a reason you can't make two materials and use two brushes?

No, it'll just me easier for me to use one material. But wanted to be sure if it was possible since it seems like a thing that should be doable without to much trouble.
 

Vel0city

func_fish
aa
Dec 6, 2014
1,947
1,589
No, it'll just me easier for me to use one material. But wanted to be sure if it was possible since it seems like a thing that should be doable without to much trouble.

Ha.
Haha.
Hahaha.

Welcome to the Source engine, where a lot of things are supposed to be simple yet they aren't.
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,694
2,579
To be fair, how many engines allow the creation and implementation of custom shaders without making any modifications to the engine?