Title: Shader "tlight" and "tlightr" Post by: Peter Silie on June 06, 2010, 03:52:39 AM Hello,
maybe not the right place to drop my question, but i know, that some awsome developers are reading also ;) I try to make a new map for oa and in the darker passages of this level, i would like to make some hints for the right way. The texture package "dsi" includes a red and a blue arrow, which would fit my needs with one annoying point: the background of this arrows are not invisible. They look like a plate with an arrow on it. And the plates texture doesn´t fit my requirements. So i thought, that it would be much better, if the plate is invisible, so the arrows could be used on all other textures. I tried to modify the shader file (new one based on the original) but unsuccessful :( Here is the corresponding shader from pak0.pk3/scripts/oalite.shader: Code: textures/dsi/tlight I had the idea, to make a forth shader stage, where i mask all the unused pixels, but my attempts failed (blendfunc GT0 etc.) ??? Any ideas? Title: Re: Shader "tlight" and "tlightr" Post by: andrewj on June 06, 2010, 04:55:00 AM Is the arrow on a solid wall or a mid-air mostly-transparent brush?
For the transparent brush case, I think the shader logic would be: 1. draw the mask, depthWrite 2. draw the arrow, blendFunc filter, depthFunc equal 3. apply the lightmap as normal, depthFunc equal But it can be a lot easier to simply make a new texture! Title: Re: Shader "tlight" and "tlightr" Post by: Peter Silie on June 06, 2010, 04:58:58 AM The arrow is on a solid wall.
I thought, making just a new shader would be easier (and with less filesize) than creating new textures... Title: Re: Shader "tlight" and "tlightr" Post by: andrewj on June 06, 2010, 07:08:29 AM Well I can't think of a way to do what you're trying to do, and I suspect it is simply not possible (though I could be wrong).
I also think that the tlight.blend images may not be suitable as a mask, since they are meant to be a glow and this glow is larger than the actual arrow shape, extending into the plate area. Title: Re: Shader "tlight" and "tlightr" Post by: Peter Silie on June 06, 2010, 09:32:20 AM Simple fix:
i just made a triangle instead of a square. Title: Re: Shader "tlight" and "tlightr" Post by: andrewj on June 06, 2010, 09:53:46 PM Heh, that works too.
|