Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions Assets/FrostedGlass/Shaders/SeparableBlur.shader
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Shader "Hidden/SeparableGlassBlur" {
float4 offsets;

sampler2D _MainTex;

half4 _MainTex_ST;

v2f vert (appdata_img v) {
v2f o;
Expand All @@ -38,13 +40,13 @@ Shader "Hidden/SeparableGlassBlur" {
half4 frag (v2f i) : COLOR {
half4 color = float4 (0,0,0,0);

color += 0.40 * tex2D (_MainTex, i.uv);
color += 0.15 * tex2D (_MainTex, i.uv01.xy);
color += 0.15 * tex2D (_MainTex, i.uv01.zw);
color += 0.10 * tex2D (_MainTex, i.uv23.xy);
color += 0.10 * tex2D (_MainTex, i.uv23.zw);
color += 0.05 * tex2D (_MainTex, i.uv45.xy);
color += 0.05 * tex2D (_MainTex, i.uv45.zw);
color += 0.40 * tex2D (_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv, _MainTex_ST));
color += 0.15 * tex2D (_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv01.xy, _MainTex_ST));
color += 0.15 * tex2D (_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv01.zw, _MainTex_ST));
color += 0.10 * tex2D (_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv23.xy, _MainTex_ST));
color += 0.10 * tex2D (_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv23.zw, _MainTex_ST));
color += 0.05 * tex2D (_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv45.xy, _MainTex_ST));
color += 0.05 * tex2D (_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv45.zw, _MainTex_ST));

return color;
}
Expand Down