mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-20 11:41:33 +00:00
Avoid negative x pow UB in linear bloom
This commit is contained in:
parent
0c6c71f6cb
commit
7113cef501
1 changed files with 3 additions and 2 deletions
|
@ -80,8 +80,9 @@ shared {
|
||||||
radius = max(radius, 0.1);
|
radius = max(radius, 0.1);
|
||||||
// hack: make the radius wider on the screen edges
|
// hack: make the radius wider on the screen edges
|
||||||
// (makes things in the corner of the screen look less "wrong" with not-extremely-low FOVs)
|
// (makes things in the corner of the screen look less "wrong" with not-extremely-low FOVs)
|
||||||
radius *= pow(texcoord.x*2.0-1.0, 2.0)+1.0;
|
texcoord = texcoord * 2.0 - vec2(1.0);
|
||||||
radius *= pow(texcoord.y*2.0-1.0, 2.0)+1.0;
|
radius *= texcoord.x * texcoord.x + 1.0;
|
||||||
|
radius *= texcoord.y * texcoord.y + 1.0;
|
||||||
return radius;
|
return radius;
|
||||||
}
|
}
|
||||||
vec3 powv(vec3 a, float x)
|
vec3 powv(vec3 a, float x)
|
||||||
|
|
Loading…
Reference in a new issue