Game Development Community

Multipass shader on interior.

by Xavier "eXoDuS" Amado · in Torque Game Engine Advanced · 06/28/2004 (10:32 pm) · 8 replies

I have tried making a multipass shader using 2 textures, the one on top with transparent parts so that the one below is visible. This is done in the TSE demo in the 4th or 5th face of the rotating cube. I have done something simple like this:
datablock Material(blah) {
 baseTex[0] = "sometex";
 baseTex[1] = "nothertex";
};
But to my surprise it didnt work, the texture below was just rendered as a solid color (which was the color of the texture below, just that it was one of the tones as a solid texture. I then tried taking a look at the cube shader and it seemed I wasn't missing anything, althoug the cube was animated. I tried copying this shader over and use it with the same textures as in the rotating cube and it still didn't work, so I'm assuming that for some reason these kind of shaders don't work over interiors?

Anyone has any suggestions?

#1
06/29/2004 (12:21 am)
Are ya specifying multiple texture co-ordinates, perhaps?

Is this in a DTS shape or a DIF?
#2
06/29/2004 (5:21 am)
I would say on a dif because of the last sentence..

Quote:
I'm assuming that for some reason these kind of shaders don't work over interiors?
#3
06/29/2004 (10:02 am)
Indeed, not sure why I forgot to mention that. The same shader works on the cube (dts) but doesnt on my interior.
#4
06/30/2004 (12:34 pm)
That's odd, it should work on the interior as well. I think your problem might be a lack of an alpha channel in your textures. Look at the alpha channel on the cube example textures.
#5
06/30/2004 (1:13 pm)
No Brian, as I said, I can see through, but I see a solid color, please let me quote myself:

Quote:I tried copying this shader over and use it with the same textures as in the rotating cube and it still didn't work

Even with the same textures that the ones used in the cube I only see a solid color below. If you want I can send you the test dif and you can try it yourself with the cube textures.

EDIT: PS, could something be screwed when creating the dif? It's just a squared brush though, nothing fancy.
#6
06/30/2004 (5:19 pm)
OK, I'll take a look and see what's up. It's going to be a while though, I'm going on vacation next week.
#7
06/30/2004 (5:20 pm)
Oh ok, well, have a nice time :)
#8
07/02/2004 (11:30 am)
Ok, this should be on the bugs forum by now, but we are already here.
I went ahead and made a shape and exported it as .dts and applied the same shader and it worked.
But, I noticed more bugs/ugly features, the texture that was "under" (with some animation flags) seems to disappear at certain camera angles, and instead I get the same flat color I was seeing with the interior shape. When using a sine wave, at certain angles (I saw it happen looking straight down) the animation went faster than normal.

I'll let you know If I find anything else that might be a hint/clue.