Fix: Blindness radius when zooming (#23130)
* Fix Zoom while Blind * Fix Zoom while Blind (ContentEyeComponent->EyeComponent)
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
uniform highp float ZOOM;
|
||||
|
||||
highp vec4 circle(in highp vec2 uv, in highp vec2 pos, highp float rad, in highp vec3 color) {
|
||||
highp float d = length(pos - uv) - rad;
|
||||
highp float t = clamp(d, 0.0, 1.0);
|
||||
@@ -7,10 +9,10 @@ void fragment(){
|
||||
highp vec2 uv = FRAGCOORD.xy;
|
||||
highp vec2 res_xy = vec2(1.0/SCREEN_PIXEL_SIZE.x, 1.0/SCREEN_PIXEL_SIZE.y);
|
||||
highp vec2 center = res_xy*0.5;
|
||||
highp float radius = 0.05 * res_xy.y;
|
||||
highp float radius = 0.05 * res_xy.y / ZOOM;
|
||||
|
||||
highp vec4 layer1 = vec4(vec3(0.0), 0.0);
|
||||
|
||||
|
||||
highp vec4 layer2 = circle(uv, center, radius, vec3(0.0));
|
||||
|
||||
COLOR = mix(layer1, layer2, layer2.a);
|
||||
|
||||
Reference in New Issue
Block a user