diff --git a/osu.Game.Resources/Shaders/sh_Bloom.fs b/osu.Game.Resources/Shaders/sh_Bloom.fs deleted file mode 100644 index 6f9683d..0000000 --- a/osu.Game.Resources/Shaders/sh_Bloom.fs +++ /dev/null @@ -1,77 +0,0 @@ -#ifdef GL_ES - precision mediump float; -#endif - -varying vec4 v_Colour; -varying vec2 v_TexCoord; - -uniform sampler2D m_Sampler; - -//Width to sample from -uniform float mag; - -//Alpha value -uniform float alpha; - -uniform float redtint; - -//Operate on a high range (0.5 - 1.0) or the full range (0.0 - 1.0) -uniform bool hirange; - -#ifndef GL_ES - const vec2 offsets[12] = vec2[12] - ( - vec2(-0.326212, -0.405805), - vec2(-0.840144, -0.073580), - vec2(-0.695914, 0.457137), - vec2(-0.203345, 0.620716), - vec2(0.962340, -0.194983), - vec2(0.473434, -0.480026), - vec2(0.519456, 0.767022), - vec2(0.185461, -0.893124), - vec2(0.507431, 0.064425), - vec2(0.896420, 0.412458), - vec2(-0.321940, -0.932615), - vec2(-0.791559, -0.597705) - ); -#endif - -void main(void) -{ -#ifdef GL_ES - vec2 offsets[12]; - offsets[0] = vec2(-0.326212, -0.405805); - offsets[1] = vec2(-0.840144, -0.073580); - offsets[2] = vec2(-0.695914, 0.457137); - offsets[3] = vec2(-0.203345, 0.620716); - offsets[4] = vec2(0.962340, -0.194983); - offsets[5] = vec2(0.473434, -0.480026); - offsets[6] = vec2(0.519456, 0.767022); - offsets[7] = vec2(0.185461, -0.893124); - offsets[8] = vec2(0.507431, 0.064425); - offsets[9] = vec2(0.896420, 0.412458); - offsets[10] = vec2(-0.321940, -0.932615); - offsets[11] = vec2(-0.791559, -0.597705); -#endif - - vec4 sum = pow(texture2D(m_Sampler, v_TexCoord), vec4(2.0)); - - //Accumulate the colour from 12 neighbouring pixels - for (int i = 0; i < 12; i++) - sum += pow(texture2D(m_Sampler, v_TexCoord + (offsets[i] * mag)), vec4(2.0)); - - //Average the sum - sum /= 13.0; - sum = sqrt(sum); - - //Fix alpha - sum.a *= alpha; - - //Expand the higher range if applicable - if (hirange) - sum.rgb = (sum.rgb - 0.5) * 2.0; - - sum.r += redtint; - - gl_FragColor = v_Colour * sum; -} \ No newline at end of file diff --git a/osu.Game.Resources/Shaders/sh_Blur2D.h b/osu.Game.Resources/Shaders/sh_Blur2D.h deleted file mode 100644 index f960985..0000000 --- a/osu.Game.Resources/Shaders/sh_Blur2D.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifdef GL_ES - precision mediump float; -#endif - -vec4 blur(sampler2D tex, int radius, vec2 direction, vec2 texCoord, vec2 texSize) -{ - vec4 sum = vec4(0.0, 0.0, 0.0, 0.0); - - sum += pow(texture2D(tex, texCoord), vec4(2.0)); - //Probably not the smartest way to do this - //cap at radius = 200 for D3D unrolling - for (int i = 1; i <= 200; i++) - { - sum += pow(texture2D(tex, texCoord + direction * float(i) / texSize), vec4(2.0)); - sum += pow(texture2D(tex, texCoord + direction * float(-i) / texSize), vec4(2.0)); - if (i == radius) - break; - } - sum /= float(radius) * 2.0 + 1.0; - sum = sqrt(sum); - - return sum; -} \ No newline at end of file diff --git a/osu.Game.Resources/Shaders/sh_BlurHorizontal.fs b/osu.Game.Resources/Shaders/sh_BlurHorizontal.fs deleted file mode 100644 index 72c9495..0000000 --- a/osu.Game.Resources/Shaders/sh_BlurHorizontal.fs +++ /dev/null @@ -1,19 +0,0 @@ -#ifdef GL_ES - precision mediump float; -#endif - -#include "sh_Blur2D.h"; - -varying vec4 v_Colour; -varying vec2 v_TexCoord; - -uniform sampler2D m_Sampler; - -uniform vec2 texSize; - -uniform int radius; - -void main(void) -{ - gl_FragColor = v_Colour * blur(m_Sampler, radius, vec2(1.0, 0.0), v_TexCoord, texSize); -} \ No newline at end of file diff --git a/osu.Game.Resources/Shaders/sh_BlurVertical.fs b/osu.Game.Resources/Shaders/sh_BlurVertical.fs deleted file mode 100644 index 97613a2..0000000 --- a/osu.Game.Resources/Shaders/sh_BlurVertical.fs +++ /dev/null @@ -1,19 +0,0 @@ -#ifdef GL_ES - precision mediump float; -#endif - -#include "sh_Blur2D.h"; - -varying vec4 v_Colour; -varying vec2 v_TexCoord; - -uniform sampler2D m_Sampler; - -uniform vec2 texSize; - -uniform int radius; - -void main(void) -{ - gl_FragColor = v_Colour * blur(m_Sampler, radius, vec2(0.0, 1.0), v_TexCoord, texSize); -} \ No newline at end of file diff --git a/osu.Game.Resources/Shaders/sh_Colour.fs b/osu.Game.Resources/Shaders/sh_Colour.fs deleted file mode 100644 index fad4e3f..0000000 --- a/osu.Game.Resources/Shaders/sh_Colour.fs +++ /dev/null @@ -1,10 +0,0 @@ -#ifdef GL_ES - precision mediump float; -#endif - -varying vec4 v_Colour; - -void main(void) -{ - gl_FragColor = v_Colour; -} \ No newline at end of file diff --git a/osu.Game.Resources/Shaders/sh_Colour.vs b/osu.Game.Resources/Shaders/sh_Colour.vs deleted file mode 100644 index 0f6675f..0000000 --- a/osu.Game.Resources/Shaders/sh_Colour.vs +++ /dev/null @@ -1,12 +0,0 @@ -attribute vec2 m_Position; -attribute vec4 m_Colour; - -varying vec4 v_Colour; - -uniform mat4 g_ProjMatrix; - -void main(void) -{ - gl_Position = g_ProjMatrix * vec4(m_Position.xy, 1.0, 1.0); - v_Colour = m_Colour; -} \ No newline at end of file diff --git a/osu.Game.Resources/Shaders/sh_Particle.vs b/osu.Game.Resources/Shaders/sh_Particle.vs deleted file mode 100644 index 8c26959..0000000 --- a/osu.Game.Resources/Shaders/sh_Particle.vs +++ /dev/null @@ -1,23 +0,0 @@ -attribute vec2 m_Position; -attribute vec2 m_TexCoord; -attribute float m_Time; -attribute vec2 m_Direction; - -varying vec4 v_Colour; -varying vec2 v_TexCoord; - -uniform mat4 g_ProjMatrix; -uniform float g_FadeClock; -uniform float g_Gravity; - -void main(void) -{ - vec2 targetPosition = - m_Position + - m_Direction * clamp((g_FadeClock + 100.0) / (m_Time + 100.0), 0.0, 1.0) + - vec2(0.0, g_Gravity * g_FadeClock * g_FadeClock / 1000000.0); - - gl_Position = g_ProjMatrix * vec4(targetPosition, 1.0, 1.0); - v_Colour = vec4(1.0, 1.0, 1.0, 1.0 - clamp(g_FadeClock / m_Time, 0.0, 1.0)); - v_TexCoord = m_TexCoord; -} \ No newline at end of file diff --git a/osu.Game.Resources/Shaders/sh_Position.vs b/osu.Game.Resources/Shaders/sh_Position.vs deleted file mode 100644 index ed4fdf6..0000000 --- a/osu.Game.Resources/Shaders/sh_Position.vs +++ /dev/null @@ -1,11 +0,0 @@ -attribute vec2 m_Position; - -varying vec2 v_Position; - -uniform mat4 g_ProjMatrix; - -void main(void) -{ - gl_Position = g_ProjMatrix * vec4(m_Position.xy, 1.0, 1.0); - v_Position = m_Position; -} \ No newline at end of file diff --git a/osu.Game.Resources/Shaders/sh_Texture.fs b/osu.Game.Resources/Shaders/sh_Texture.fs deleted file mode 100644 index 9444c8a..0000000 --- a/osu.Game.Resources/Shaders/sh_Texture.fs +++ /dev/null @@ -1,13 +0,0 @@ -#ifdef GL_ES - precision mediump float; -#endif - -varying vec4 v_Colour; -varying vec2 v_TexCoord; - -uniform sampler2D m_Sampler; - -void main(void) -{ - gl_FragColor = v_Colour * texture2D(m_Sampler, v_TexCoord, -0.7); -} \ No newline at end of file diff --git a/osu.Game.Resources/Shaders/sh_Texture2D.vs b/osu.Game.Resources/Shaders/sh_Texture2D.vs deleted file mode 100644 index 4e4c919..0000000 --- a/osu.Game.Resources/Shaders/sh_Texture2D.vs +++ /dev/null @@ -1,15 +0,0 @@ -attribute vec2 m_Position; -attribute vec4 m_Colour; -attribute vec2 m_TexCoord; - -varying vec4 v_Colour; -varying vec2 v_TexCoord; - -uniform mat4 g_ProjMatrix; - -void main(void) -{ - gl_Position = g_ProjMatrix * vec4(m_Position, 1.0, 1.0); - v_Colour = m_Colour; - v_TexCoord = m_TexCoord; -} \ No newline at end of file diff --git a/osu.Game.Resources/Shaders/sh_Texture3D.vs b/osu.Game.Resources/Shaders/sh_Texture3D.vs deleted file mode 100644 index 9eddf51..0000000 --- a/osu.Game.Resources/Shaders/sh_Texture3D.vs +++ /dev/null @@ -1,15 +0,0 @@ -attribute vec3 m_Position; -attribute vec4 m_Colour; -attribute vec2 m_TexCoord; - -varying vec4 v_Colour; -varying vec2 v_TexCoord; - -uniform mat4 g_ProjMatrix; - -void main(void) -{ - gl_Position = g_ProjMatrix * vec4(m_Position, 1.0); - v_Colour = m_Colour; - v_TexCoord = m_TexCoord; -} \ No newline at end of file diff --git a/osu.Game.Resources/osu.Game.Resources.csproj b/osu.Game.Resources/osu.Game.Resources.csproj index 7e27051..97e8b26 100644 --- a/osu.Game.Resources/osu.Game.Resources.csproj +++ b/osu.Game.Resources/osu.Game.Resources.csproj @@ -41,19 +41,8 @@ - - - - - - - - - - -