浏览代码

libobs: Fix bilinear lowres RGBA as well

Jim 3 年之前
父节点
当前提交
a33a5d2151
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      libobs/data/bilinear_lowres_scale.effect

+ 2 - 3
libobs/data/bilinear_lowres_scale.effect

@@ -89,9 +89,8 @@ float4 PSDrawLowresBilinearRGBAMultiplyTonemap(VertData f_in) : TARGET
 float4 PSDrawLowresBilinearRGBADivide(VertData f_in) : TARGET
 {
 	float4 rgba = DrawLowresBilinear(f_in);
-	float alpha = rgba.a;
-	float multiplier = (alpha > 0.0) ? (1.0 / alpha) : 0.0;
-	return float4(rgba.rgb * multiplier, alpha);
+	rgba.rgb *= max(1. / rgba.a, 0.);
+	return rgba;
 }
 
 technique Draw