mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-11 13:25:53 -04:00
Merge branch 'linearbloom' into 'master'
Avoid negative base pow UB in linear bloom See merge request OpenMW/openmw!4702
This commit is contained in:
commit
a74b6690a7
@ -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…
x
Reference in New Issue
Block a user