h.smali
.class public Lh7/h;
.super Lg7/a;
.source "FillLightFilter.java"
# interfaces
.implements Lg7/e;
# instance fields
.field public i:F
.field public j:I
.field public k:I
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method public constructor <init>()V
.registers 2
invoke-direct {p0}, Lg7/a;-><init>()V
const/high16 v0, 0x3f000000 # 0.5f
iput v0, p0, Lh7/h;->i:F
const/4 v0, -0x1
iput v0, p0, Lh7/h;->j:I
iput v0, p0, Lh7/h;->k:I
return-void
.end method
# virtual methods
.method public a(I)V
.registers 4
invoke-super {p0, p1}, Lg7/a;->a(I)V
const-string v0, "mult"
invoke-static {p1, v0}, Landroid/opengl/GLES20;->glGetUniformLocation(ILjava/lang/String;)I
move-result v1
iput v1, p0, Lh7/h;->j:I
invoke-static {v1, v0}, Ls7/a;->a(ILjava/lang/String;)V
const-string v0, "igamma"
invoke-static {p1, v0}, Landroid/opengl/GLES20;->glGetUniformLocation(ILjava/lang/String;)I
move-result p1
iput p1, p0, Lh7/h;->k:I
invoke-static {p1, v0}, Ls7/a;->a(ILjava/lang/String;)V
return-void
.end method
.method public b(F)V
.registers 2
invoke-virtual {p0, p1}, Lh7/h;->c(F)V
return-void
.end method
.method public b(J[F)V
.registers 6
.param p1 # J
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
invoke-super {p0, p1, p2, p3}, Lg7/a;->b(J[F)V
iget p1, p0, Lh7/h;->i:F
const/high16 p2, 0x3f800000 # 1.0f
sub-float p1, p2, p1
const p3, 0x3f333333 # 0.7f
mul-float p1, p1, p3
const v0, 0x3e99999a # 0.3f
add-float/2addr p1, v0
div-float p1, p2, p1
iget v1, p0, Lh7/h;->j:I
invoke-static {v1, p1}, Landroid/opengl/GLES20;->glUniform1f(IF)V
const-string v1, "glUniform1f"
invoke-static {v1}, Ls7/a;->a(Ljava/lang/String;)V
mul-float p3, p3, p1
add-float/2addr p3, v0
div-float/2addr p2, p3
iget p1, p0, Lh7/h;->k:I
invoke-static {p1, p2}, Landroid/opengl/GLES20;->glUniform1f(IF)V
invoke-static {v1}, Ls7/a;->a(Ljava/lang/String;)V
return-void
.end method
.method public c()Ljava/lang/String;
.registers 2
.annotation build Landroidx/annotation/NonNull;
.end annotation
const-string v0, "#extension GL_OES_EGL_image_external : require\nprecision mediump float;\nuniform samplerExternalOES sTexture;\nuniform float mult;\nuniform float igamma;\nvarying vec2 vTextureCoord;\nvoid main() {\n const vec3 color_weights = vec3(0.25, 0.5, 0.25);\n vec4 color = texture2D(sTexture, vTextureCoord);\n float lightmask = dot(color.rgb, color_weights);\n float backmask = (1.0 - lightmask);\n vec3 ones = vec3(1.0, 1.0, 1.0);\n vec3 diff = pow(mult * color.rgb, igamma * ones) - color.rgb;\n diff = min(diff, 1.0);\n vec3 new_color = min(color.rgb + diff * backmask, 1.0);\n gl_FragColor = vec4(new_color, color.a);\n}\n"
return-object v0
.end method
.method public c(F)V
.registers 4
const/4 v0, 0x0
cmpg-float v1, p1, v0
if-gez v1, :cond_6
const/4 p1, 0x0
:cond_6
const/high16 v0, 0x3f800000 # 1.0f
cmpl-float v1, p1, v0
if-lez v1, :cond_e
const/high16 p1, 0x3f800000 # 1.0f
:cond_e
iput p1, p0, Lh7/h;->i:F
return-void
.end method
.method public d()F
.registers 2
invoke-virtual {p0}, Lh7/h;->g()F
move-result v0
return v0
.end method
.method public g()F
.registers 2
iget v0, p0, Lh7/h;->i:F
return v0
.end method
.method public onDestroy()V
.registers 2
invoke-super {p0}, Lg7/a;->onDestroy()V
const/4 v0, -0x1
iput v0, p0, Lh7/h;->j:I
iput v0, p0, Lh7/h;->k:I
return-void
.end method