enough-lawyer-1858
02/20/2023, 2:00 PMwitty-island-52596
02/20/2023, 3:33 PMglsl
gl_fragColor = vec4(1.0, 1.0, 1.0, 0.0);
mysterious-intern-42609
02/20/2023, 4:33 PMglsl
#pragma header
uniform float iTime;
uniform vec2 iResolution;
void main()
{
// uv (0 to 1)
vec2 uv = openfl_TextureCoordv;
// uv (-1 to 1, 0 - center)
uv.x = 2. * uv.x - 1.;
uv.y = 2. * uv.y - 1.;
float barrel_power = 0.80; // increase for BIGGER EYE!
float theta = atan(uv.y, uv.x);
float radius = length(uv);
radius = pow(radius, barrel_power);
uv.x = radius * cos(theta);
uv.y = radius * sin(theta);
// uv (0 to 1)
uv.x = 0.5 * (uv.x + 1.);
uv.y = 0.5 * (uv.y + 1.);
float chromo_x = 0.2;
float chromo_y = 0.2;
// output
gl_FragColor = vec4(flixel_texture2D(bitmap, vec2(uv.x - chromo_x*0.016, uv.y - chromo_y*0.009)).r, flixel_texture2D(bitmap, vec2(uv.x + chromo_x*0.0125, uv.y - chromo_y*0.004)).g, flixel_texture2D(bitmap, vec2(uv.x - chromo_x*0.0045, uv.y + chromo_y*0.0085)).b, 1.0);;
}
mysterious-intern-42609
02/20/2023, 4:33 PMwitty-island-52596
02/20/2023, 4:34 PMmysterious-intern-42609
02/20/2023, 4:35 PMmysterious-intern-42609
02/20/2023, 4:35 PMmysterious-intern-42609
02/20/2023, 4:35 PMmysterious-intern-42609
02/20/2023, 4:35 PMwitty-island-52596
02/20/2023, 4:35 PMmysterious-intern-42609
02/20/2023, 4:36 PMmysterious-intern-42609
02/20/2023, 4:36 PMwitty-island-52596
02/20/2023, 4:36 PMmysterious-intern-42609
02/20/2023, 4:37 PMwitty-island-52596
02/20/2023, 4:37 PMenough-lawyer-1858
02/20/2023, 4:37 PMwitty-island-52596
02/20/2023, 4:38 PMenough-lawyer-1858
02/20/2023, 4:38 PMenough-lawyer-1858
02/20/2023, 4:38 PMwitty-island-52596
02/20/2023, 4:39 PMwitty-island-52596
02/20/2023, 4:40 PMenough-lawyer-1858
02/20/2023, 4:40 PMwitty-island-52596
02/20/2023, 4:40 PMwitty-island-52596
02/20/2023, 4:41 PMmysterious-intern-42609
02/20/2023, 4:41 PMwitty-island-52596
02/20/2023, 4:41 PMwitty-island-52596
02/20/2023, 4:42 PMglsl
gl_FragColor = flixel_texture2D(bitmap, uv);
mysterious-intern-42609
02/20/2023, 4:43 PMwitty-island-52596
02/20/2023, 4:43 PMglsl
gl_FragColor = flixel_texture2D(bitmap, openfl_TextureCoordv);