Jump to content

invisible light sources (shader)


Recommended Posts

Posted

title might be a bit misleading...

 

anyway I've been trying to make a texture give off a blue light and that works just fine

but i want the texture to be 100% transparent so it looks like the light is coming out of no were

 

yes, i know about the light entry in radiant and that you can color it

but just wanna see if it can be done.

 

here is the shader i've been playing around with it for the past 2 days

 

 

textures/lights/blue
{
qer_editorimage textures/lights/blue
q3map_surfacelight 4000
surfaceparm nodamage
surfaceparm nomarks
surfaceparm nonsolid
surfaceparm nonopaque
{
map $lightmap
}
{
map textures/lights/blue
blendFunc GL_SRC_ALPHA_SATURATE GL_ONE_MINUS_DST_ALPHA
}
{
map textures/lights/blue
blendFunc GL_SRC_ALPHA GL_SRC_ALPHA
rgbGen wave sin 0 0 1 10
}
}

 

​but no matter what i do it wont go transparent, ether i get a blue box or a black box witch emit blue light

and if i add "surfaceparm nodraw" it wont emit any light what so ever

Posted

have you tried just taking the shader for nodraw, caulk or trigger etc and adding the surface light stuff?

Posted

nope doesn't work

just gives me a black blue-light emitting brush

Odd. What do you actually need this for?

Posted

just trying to find another way to add light

using normal light entry's take a while to get right

so i thought it might go a bit faster to use shader light

 

but it's only an experiment so i can live without it

Posted

Well if you were wanting to use a shader light, why not just apply it to the texture on your actual light source, instead of making a separate invisible one?

Posted

I'm quite sure there is a way to make the surface transparent.. Check a water texture for the specific keyword. Oh and if you're really lazy you could just make a transparent png and use that xD

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...