It seems that Autosprite case not processed in setDeformUniforms method
suijingfeng opened this issue · 4 comments
Hello, thank you for this nice project ! I test your excellent render on openarena game, which very similar to quake 3 arena but still have small difference in shader material construction. My problem is that the rocket explosion visual effect not rendered correctly. I attached a picture
to illustrate the case:
After debugging a while, I find that it may caused by animmap
not handled correctly.
rocketExplosion
{
{
animmap 8 models/weaphits/rlboom/rlboom_1.tga models/weaphits/rlboom/rlboom_2.tga models/weaphits/rlboom/rlboom_3.tga models/weaphits/rlboom/rlboom_4.tga models/weaphits/rlboom/rlboom_5.tga models/weaphits/rlboom/rlboom_6.tga models/weaphits/rlboom/rlboom_7.tga models/weaphits/rlboom/rlboom_8.tga
blendfunc gl_one gl_src_alpha
rgbGen wave inversesawtooth 0 1 0 8
}
{
animmap 8 models/weaphits/rlboom/rlboom_2.tga models/weaphits/rlboom/rlboom_3.tga models/weaphits/rlboom/rlboom_4.tga models/weaphits/rlboom/rlboom_5.tga models/weaphits/rlboom/rlboom_6.tga models/weaphits/rlboom/rlboom_7.tga models/weaphits/rlboom/rlboom_8.tga models/weaphits/rlboom/rlboom_8.tga
blendfunc gl_one gl_src_alpha
rgbGen wave sawtooth 0 1 0 8
}
{
clampmap textures/oa/fiar.tga
blendfunc add
rgbGen wave inversesawtooth 0.1 0.8 0 1
tcMod rotate 77
tcMod stretch inversesawtooth 0.1 1 0 0.4
}
{
clampmap textures/oa/fiar2.tga
blendfunc add
rgbGen wave inversesawtooth 0 1 0 1
tcMod rotate 33
tcMod stretch sin 0.2 1 0 0.4
}
{
clampmap textures/oa/fiar.tga
blendfunc add
rgbGen wave sin 0 1 0 1
tcMod rotate -17
tcMod stretch sawtooth 0.1 1.5 0 1
}
{
clampmap textures/oa/fiar.tga
blendfunc add
rgbGen wave inversesawtooth 0.1 1 0 1
tcMod rotate -77
tcMod stretch sawtooth 0.4 0.8 0 1
}
}
I have no idea how to handle this as i am not familiar with bgfx, so I decide report to you.
Looks like a problem with soft sprites. See if setting r_softSprites
to 0 fixes it.
The black bar(stump?) do not showing on some map by setting r_softSprites to 0 on some maps, issues still exits on other maps :( , the flares on the tail of the rocket still not render correctly. as the following pictures shows:
Normally those effect are rendered by AutospriteDeform() function, when i comment this function in rendergl2 module, then those flares disappear as you render module does.
The first problem was caused by blendfunc gl_one gl_src_alpha
, which is the same as additive blend if alpha is 1, but scales dest color, so soft sprites where rendering as black where the softening effect kicks in as alpha value approached 0.
I can't get OA to build on windows to debug the other problems. I suspect there are local changes to the renderers in OA that change behavior. Autosprite deforms work fine in ioquake3 (handled here).
Thanks to you.