Browse Source

libobs: Add DrawOpaque for rect effect

Needed by Syphon Client.
jpark37 4 years ago
parent
commit
b70161bc67
1 changed files with 14 additions and 0 deletions
  1. 14 0
      libobs/data/default_rect.effect

+ 14 - 0
libobs/data/default_rect.effect

@@ -25,6 +25,11 @@ float4 PSDrawBare(VertInOut vert_in) : TARGET
 	return image.Sample(def_sampler, vert_in.uv);
 }
 
+float4 PSDrawOpaque(VertInOut vert_in) : TARGET
+{
+	return float4(image.Sample(def_sampler, vert_in.uv).rgb, 1.0);
+}
+
 technique Draw
 {
 	pass
@@ -33,3 +38,12 @@ technique Draw
 		pixel_shader  = PSDrawBare(vert_in);
 	}
 }
+
+technique DrawOpaque
+{
+	pass
+	{
+		vertex_shader = VSDefault(vert_in);
+		pixel_shader  = PSDrawOpaque(vert_in);
+	}
+}