[Gtkradiant] problem with shader

Dirk noisyb at gmx.net
Wed Apr 30 14:24:37 CDT 2008


...are you using lightmap? if you enable vertex (which is the default in 
ioq3, i believe) the surfaces are white...



Tim Aerdts wrote:
> Hi Dirk,
> 
> I tried this and got the following result :)
> 
> textures/test/red
> {
>     {
>     map $whiteimage
>     rgbGen const ( 1.0 0.0 0.0 )
>     }
>     {
>     map $lightmap
>     rgbGen identity
>     blendFunc filter
>     }
> }
> 
> With this result
> http://fragger.quakedev.com/other/screens/xperiment00219.jpg
> 
> Hope it helps, which engine are you using?
> 
> Greetings,
> Fragger
> 
> On Wed, Apr 30, 2008 at 11:46 AM, Dirk <noisyb at gmx.net> wrote:
> 
>> Forest Hale wrote:
>>> Dirk wrote:
>>>> i want a shader that does just make a red surface
>>>>
>>>> textures/test/red
>>>> {
>>>>    {
>>>>    map $whiteimage
>>>>    rgbGen const ( 1.0 0.0 0.0 )
>>>>    blendFunc add
>>>>    }
>>>>    {
>>>>    map $lightmap
>>>>    rgbGen identity
>>>>    blendFunc filter
>>>>    }
>>>> }
>>>>
>>>> ...but why is it transparent?
>>>>
>>>> Can anyone help? or point me to a place where someone can help? I have
>>>> had a look at the Q3A shader manual.. but this is the best I can come
>> up
>>>> with after having read it...
>>> Your first pass has a blendFunc, therefore it is transparent.
>>>
>> i need that blendfunc in the first pass or the surface will be just
>> white... or should i make 3 "passes"(?) and add the rgbGen in the 2nd?
>> how would/should that look like (syntax-wise)?
>>
>> i'm a total shader noob and everything above is the result of try and
>> error and barely understanding the cryptic shader manual... i figured in
>> the meantime that blendfunc is a GL function and that 'add' and 'filter'
>> are just synonyms for sfilter and dfilter stuff... and that's pretty
>> much it... shader files seem to be some script language to program the
>> GPU using GL... :D
>>
>> someone please show me how this shader has to look like to do things
>> right... i want a single, nontransparent color on the surface...
>>
>> (and maybe how to do a single rgba color on a surface using a shader...
>> but i might be able to figure that out myself then...)
>>
>> Thank you!
>>
>>
>> _______________________________________________
>> Gtkradiant mailing list
>> Gtkradiant at zerowing.idsoftware.com
>> http://zerowing.idsoftware.com/cgi-bin/mailman/listinfo/gtkradiant
>>
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Gtkradiant mailing list
> Gtkradiant at zerowing.idsoftware.com
> http://zerowing.idsoftware.com/cgi-bin/mailman/listinfo/gtkradiant




More information about the Gtkradiant mailing list