Hi! I have an alpha channel/ perhaps shader problem.


(secs.) #1

And was wondering if anyone here is photoshoptically inclined here?

It is a vine texture perhaps shader problem, I doubt it’s the latter.
I have made the texture, created the alpha channel. Saved to 32bit.
All looks well. The shader loads properly in radiant, curry shows it to be working perfectly, all areas to be transparent are transparent.
But… when a test map is compiled using it, the blacked out alphas still show.
This is the shader.
textures/thephhortress/vined
{
qer_editorimage textures/thephhortress/vined.tga
surfaceparm trans
surfaceparm alphashadow
surfaceparm nonsolid
surfaceparm nomarks
cull none
nopicmip
{
map textures/thephhortress/vined.tga
blendFunc GL_ONE GL_ZERO

alphaFunc GE128
	depthWrite
	rgbGen identity
}
{
	map $lightmap
	rgbGen identity
	blendFunc GL_DST_COLOR GL_ZERO
	depthFunc equal
}

}

Anybody have any ideas? or did I provide enough info?

Thanks!


(Loffy) #2

Hi!
Working on a map? Or just a test-map? ET?
Anyhow, make sure the shader is listed in the “shaderlist.txt” in the etmain/scripts-folder. Hm, but you said it loads in radiant? So maybe this is not the problem. However, is it loaded in the compiler?
Frankly, I know too little about shaders. Want to help though.
The simple alphashaderstuff I have, in my shader, says “rgbGen vertex” - whereas you have “rgbGen identity”. Could that be it?
// Loffy


(sock) #3

Create this shader instead:-


textures/thephhortress/vined
{
	cull disable
	nomipmaps
	nopicmip
	surfaceparm nomarks
	surfaceparm nonsolid
	surfaceparm alphashadow
	surfaceparm pointlight
	surfaceparm trans
	implicitMask -
}

Sock
:moo:


(secs.) #4

Thanks for the replies.

I’m interested in mapping ET, but currently trying to finish a q3 map. Which if makes a difference on someones reply, I’m sorry…should have thrown that in. I’ve lurked these forums since ET came out, and seems to have valuable info.

Sock~ that being said, is that a shader code specific for ET? When I load it in curry it shows an empty box, no shader error or anything, just doesn’t draw anything. That is kind of leading me to believe it is an alpha channel problem perhaps?

The original shader code is from Lloyd’s’ vine shaders. My created shader shows fine in curry, which is frustrating.

I’ve spent about the last 48hrs.googling “alpha channel” tutorials and q3 alpha tutorials, searched every forum I could come up with. Basically, everything I’ve read say’s I’m doing it right…but obviously not :smiley:

Thanks for the suggestions!


(rgoer) #5

ImplicitMask is ET-specific, yes. This is, however, the “Editing Wolfenstein: Enemy Territory” forum ;^)


(sock) #6

Yes the shader example I gave you is for ET only. It was a special syntax that Ydnar added to the shader language. I assumed you wanted information on ET as you are on an ET forum! :wink:

Sock
:moo:


(secs.) #7

Yes, I noticed it was an et forum. :smiley:

Being roughly in the same boat when it comes to texture creation for alpha channels and all, I thought I’d ask.


(Detoeni) #8

Try this:

textures/folder/texture
{
qer_editorimage textures/folder/texture.tga
qer_trans .5
nopicmip
surfaceparm nonsolid
polygonOffset //you might need to remove this
entityMergable //you might need to remove this, not sure if it works in q3, should do
{
map textures/folder/texture.tga
alphaFunc GE128
depthWrite
rgbGen identity
}
{
map $lightmap
blendfunc filter
rgbGen identity
tcGen lightmap
depthFunc equal
}

}