playing with q3map2
Posted: Tue Aug 23, 2011 11:02 pm
I am working on a map at the moment.
I am extensively using light emitting/non solid/detail/invisible brushes to create lights. this is done with the following shader:
what it looks like ig on a test room:
with r_showtris, we can see the light emitting brush:
after discussing this on cmm's irc, we wondered if using extensively that kind of brushes would impact fps, and since lights are calculated at compile-time if it was possible to get ride of those brushes.
well it turns out that a "dirty/very likely to provoke the armagedon" implementation can be writtten in 10 lines of code inside q3map2 and an extra surfaceparm directive:
with the modified q3map2:
I am extensively using light emitting/non solid/detail/invisible brushes to create lights. this is done with the following shader:
Code: Select all
textures/test/inv_light
{
q3map_lightColor .1 .1 .3
q3map_surfacelight 300
q3map_nolightmap
surfaceparm nomarks
surfaceparm nonsolid
surfaceparm trans
surfaceparm nolightmap
surfaceparm detail
surfaceparm strip // :)
qer_editorimage textures/7g_light/blue.tga
qer_trans 0.6
{
map $whiteimage
rgbGen const ( 0.000000 0.000000 0.000000 )
blendFunc GL_ONE GL_ONE
}
}
what it looks like ig on a test room:
with r_showtris, we can see the light emitting brush:
after discussing this on cmm's irc, we wondered if using extensively that kind of brushes would impact fps, and since lights are calculated at compile-time if it was possible to get ride of those brushes.
well it turns out that a "dirty/very likely to provoke the armagedon" implementation can be writtten in 10 lines of code inside q3map2 and an extra surfaceparm directive:
with the modified q3map2: