mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-26 06:20:48 +00:00
Make square particles gamma-correct, work around Intel Windows bug
I guess it makes sense to apply gamma to the color, we do the same for the standard round particles. Also, this way the fragment shader for square particles references the uniCommon UBO (gamma is part of it) - apparently the Intel HD4000 (from Ivy Bridge) GPU driver for Windows has a bug that uniform blocks that exist in the shader source but aren't actually used can't be found (with glGetUniformBlockIndex(prog, name)), which we treat as an error in gl3_shaders.c initShader3D(). fixes #391
This commit is contained in:
parent
0ef064b21d
commit
98b24654b6
1 changed files with 6 additions and 1 deletions
|
@ -703,7 +703,12 @@ static const char* fragmentSrcParticlesSquare = MULTILINE_STRING(
|
|||
|
||||
void main()
|
||||
{
|
||||
outColor = passColor;
|
||||
// outColor = passColor;
|
||||
// so far we didn't use gamma correction for square particles, but this way
|
||||
// uniCommon is referenced so hopefully Intels Ivy Bridge HD4000 GPU driver
|
||||
// for Windows stops shitting itself (see https://github.com/yquake2/yquake2/issues/391)
|
||||
outColor.rgb = pow(passColor.rgb, vec3(gamma));
|
||||
outColor.a = passColor.a;
|
||||
}
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue