Jump to content

Shader issue


Recommended Posts

As the title says, I'm having an issue with the shader file for my map.
The glow appears to work, but its had an unexpected (and unwanted) side effect, the shader is now see through.
 

Spoiler

4O2RbAe.jpg


Realistically the shader itself isn't complex and is fairly standard, so I'm not sure exactly what the issue is?
I typically use the same shader for all my lights and light source3s, and can't recall having this issue previously.
Did I F-up the shader?

 

Spoiler

TEXTURES/PK02/PK02_LIGHT03_C10K
     {
               qer_editorimage TEXTURES/PK02/PK02_LIGHT03_C
               q3map_surfacelight 10000
               q3map_backSplash 0.5 8
               q3map_nolightmap
               q3map_lightRGB 1 1 1
   {
                        map TEXTURES/PK02/PK02_LIGHT03_C
                        blendFunc GL_DST_COLOR GL_ZERO
                        rgbGen const ( 1.00 1.00 1.00 )
               }
{
                        map TEXTURES/PK02/PK02_LIGHT03_I
                        blendFunc GL_ONE GL_ONE
                        rgbGen const ( 1.00 1.00 1.00 )
                        glow
               }
     }

Any thoughts or input would be greatly appreciated.

Check out some of my previous works:
JK Hub - [Editor: Zero Raven]

Link to comment

Both stages of your shader have a blendFunc on them, so they end up blending into what's behind them.

Assuming you want the shader to be lightmapped, just add a lightmap stage before the other two, with no blendFunc on it. The texture will then blend into the lightmap, instead of the background.

Sorry for the formatting errors, I'm on mobile:

Spoiler

TEXTURES/PK02/PK02_LIGHT03_C10K
     {
               qer_editorimage TEXTURES/PK02/PK02_LIGHT03_C
               q3map_surfacelight 10000
               q3map_backSplash 0.5 8
               q3map_nolightmap
               q3map_lightRGB 1 1 1
   {

map $lightmap

}

{
                        map TEXTURES/PK02/PK02_LIGHT03_C
                        blendFunc GL_DST_COLOR GL_ZERO
                        rgbGen const ( 1.00 1.00 1.00 )
               }
{
                        map TEXTURES/PK02/PK02_LIGHT03_I
                        blendFunc GL_ONE GL_ONE
                        rgbGen const ( 1.00 1.00 1.00 )
                        glow
               }
     }

Edit: Also, rgbGen const ( 1.00 1.00 1.00 ) does nothing, you can just remove it.

Edited by NAB622
ooeJack and ZeroRaven like this
Link to comment

environment mapping with a ligth shader can create really weird results, you may have to put a real low number on it. But i think i have seen it before, in an Immenor map where he experimented with ligths, reflective floors and creating the metallic shine. It was a concept map, dont think he ever released it.

Link to comment

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...