[Gtkradiant] problem with shader

Dirk noisyb at gmx.net
Wed Apr 30 13:46:37 CDT 2008


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!




More information about the Gtkradiant mailing list