WoP's unique sky lens flare does not work well with the artificial sun created with the opengl2 sun rays function (r_drawSunRays). This is due to the following.
the sun rays function creates a kind of artificial sun spot on the sky, from which the sun rays are emitted. This white spot makes it more believable that there is a sun in the sky while the skybox doesn't provide it on the texture. WoP's sky lens flare feature does almost the same thing, it adds a white texture for the sun to create a believable light source and adds the lens flare textures on top of it. With both features enabled, these "suns" are now created on top of each other which makes it extra bright.
WoP's sky lens flare needs two keys in the world spawn of a map (skylensflare and skylensflare_dir) to define the lensflare script and position according to the Cartesian XYZ coordinate system (cg_printDir is helpful) while the sun rays feature takes the position from the skybox shaders q3map_sun, q3map_sunExt or q3gl2_sun which provide polar coordinates. You could convert one to the other with some math, but mappers usually don't, and find the "correct" position for the skybox sun by trial and error. So it's an estimate. This usually leads to a mismatch between the sky lens flare sun and the sun rays sun not being in the exact same place.
Possible solutions:
To solve 1: With the opengl2 renderer active and r_drawSunRays enabled, we should simply disable the sun texture of WoP's sky lens flare feature so the "suns" don't add up while the rest of the sky lens flare textures are drawn as usual.
To solve 2: Change WoP's sky lens flare feature to simply ignore the coordinates from the key in the world spawn and use the skybox shader sun, so omit skylensflare_dir.
Note: We cannot totally omit the key skylensflare in the world spawn because all skyboxes with a q3map_sun or such would directly enable the sky lens flare, also for maps who don't want it.
WoP's unique sky lens flare does not work well with the artificial sun created with the opengl2 sun rays function (r_drawSunRays). This is due to the following.
skylensflare
andskylensflare_dir
) to define the lensflare script and position according to the Cartesian XYZ coordinate system (cg_printDir
is helpful) while the sun rays feature takes the position from the skybox shaders q3map_sun, q3map_sunExt or q3gl2_sun which provide polar coordinates. You could convert one to the other with some math, but mappers usually don't, and find the "correct" position for the skybox sun by trial and error. So it's an estimate. This usually leads to a mismatch between the sky lens flare sun and the sun rays sun not being in the exact same place.Possible solutions:
r_drawSunRays
enabled, we should simply disable the sun texture of WoP's sky lens flare feature so the "suns" don't add up while the rest of the sky lens flare textures are drawn as usual.skylensflare_dir
.Note: We cannot totally omit the key
skylensflare
in the world spawn because all skyboxes with a q3map_sun or such would directly enable the sky lens flare, also for maps who don't want it.