Jump to content

Home

Alpha Shader Fullbright Problem


Calandil

Recommended Posts

I've added a alpha channel to the texture for one of my map objects. The transparency works great, but the shader is making the texture fully lit.

 

Here is the shader I'm using, taken from this website :

 

models/map_objects/ships/custom

{

surfaceparm trans

cull none

nopicmip

 

{

map models/map_objects/ships/custom.tga

tcMod scale 3 3

blendFunc GL_ONE GL_ZERO

alphaFunc GE128

depthWrite

rgbGen identity

}

{

map $lightmap

rgbGen identity

blendFunc GL_DST_COLOR GL_ZERO

depthFunc equal

}

}

 

 

I also tried using the sample shader from the Quake 3 Shader Manual, but the transparency doesn't work (not sure if Jedi Outcast handles alpha channels differently or not.)

 

I've tried analyzing the shader to see what's wrong, but I'm afraid I've still got a lot to learn.

 

Got any tips on how to fix it?

 

 

 

 

 

 

UPDATE:

Well I figured it out by looking the shader for some of the map_object trees and plants. (I guess I should do more research before I get trigger happy with the posts ;))

 

In case anyone else is wanting to put an alpha channel on a texture for a .md3, you have to make it nolightmap and onlyvertexlighting. Here is an example shader that worked for me:

 

models/map_objects/customefolder/custometexture

{

q3map_nolightmap

q3map_onlyvertexlighting

cull disable

{

map models/map_objects/customefolder/custometexture

alphaFunc GE128

rgbGen vertex

}

}

 

Also if you have problems with seeing the edges when looking through the transparent part, try taking out the "cull disable" line and it should fix it.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...