Open Aciz opened 1 year ago
The "weirdness" seems to be the detail part of the shader
At the moment I'm not sure if I've derped in the port or if this also affects Quake3e.
Seems to work fine on q3e/oDFe, both OpenGL and Vulkan.
Never mind, on another map I do have issues (dfwc2012-3), but this seems to be limited to OpenGL. I see 0 lightmapped surfaces with r_vbo 1
.
Maybe @ec- has some ideas where we can look.
As I said above, not sure if this is because of external lightmaps or something entirely different.
I can test tomorrow in ET with a map I know for a fact that uses internal lightmaps. Did not check if dfwc2012-3 used internal or extlmhack
Doesn't seem to be limited to external lightmaps, this map (Snatch 3) uses internal lightmaps. DFWC2012-3 is also using internals.
Is that map also available in Q3 to check there
Snatch 3? No, but the reason I brought that up is that it's one of the few ET maps that uses internal lightmaps, which is the standard for most (especially older) Q3 maps, which also have this problem, therefore I doubt it's got anything to do with internal/external lightmaps.
\r_lightmap is a debug feature which:
Personally I wouldn't bother making code more complex so just disable \r_vbo if you need \r_lightmap for some reason, for now
I did find that this code block,
https://github.com/etfdevs/ETe/blob/master/src/renderer/tr_shade.c#L1237-L1245
Does not have VBO equivalent but I tried implementing as the following it and it made no visual difference.
if ( r_lightmap->integer && ( pStage->bundle[0].isLightmap || pStage->bundle[1].isLightmap ) ) {
stateBits &= ~(GLS_SRCBLEND_BITS | GLS_DSTBLEND_BITS);
stateBits |= (GLS_SRCBLEND_ONE | GLS_DSTBLEND_ZERO);
}
Another note, I guess I might want to check the fading code above the r_lightmap block too as I do not know if that is implemented either. :sweat_smile: But do not know what effects make use of it to verify broken-ness.
r_vbo 0; r_lightmap 1
r_vbo 1; r_lightmap 1
r_vbo 0; r_lightmap 1
(Oasis is compiled with-approx
so some surfaces are expected to not have lightmap)r_vbo 1; r_lightmap 1
Looking closer at the surfaces with vbo + lightmap, there is some weirdness with blending going on![2022-09-26-183806-oasis](https://user-images.githubusercontent.com/14221121/192320308-c0cf0556-e299-444a-8dc8-dcba35e9bfcb.jpg)
And as a bonus:![2022-09-26-184033-oasis](https://user-images.githubusercontent.com/14221121/192320706-5aa119bf-9e4c-4188-9c9f-0c4cd482936f.jpg)
r_detailtextures 0; r_vbo 1; r_lightmap 1
is completely borked, with only very few surfaces being lightmapped (the canopys in this scene)