summaryrefslogtreecommitdiff
path: root/src/main/resources/assets/notenoughupdates/shaders/program/sobel.vsh
diff options
context:
space:
mode:
authorMoulberry <jjenour@student.unimelb.edu.au>2020-08-09 07:08:32 +1000
committerGitHub <noreply@github.com>2020-08-09 07:08:32 +1000
commitd313a5c81a553881123c1e478c96a34e07517db4 (patch)
tree36b1abb309ae0f96c378c3c1b917bb9f54bb0234 /src/main/resources/assets/notenoughupdates/shaders/program/sobel.vsh
parentf7d3491def0f7498d7bf0d547445f75f0c515912 (diff)
parent0d3a0d7355dac828a97977730bc3acc4dee7e1b4 (diff)
downloadNotEnoughUpdates-1.2-REL.tar.gz
NotEnoughUpdates-1.2-REL.tar.bz2
NotEnoughUpdates-1.2-REL.zip
Merge pull request #17 from Moulberry/beta1.2.3-BETA1.2.2-BETA1.2.1-BETA1.2-REL
Beta
Diffstat (limited to 'src/main/resources/assets/notenoughupdates/shaders/program/sobel.vsh')
-rw-r--r--src/main/resources/assets/notenoughupdates/shaders/program/sobel.vsh20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main/resources/assets/notenoughupdates/shaders/program/sobel.vsh b/src/main/resources/assets/notenoughupdates/shaders/program/sobel.vsh
new file mode 100644
index 00000000..21b17369
--- /dev/null
+++ b/src/main/resources/assets/notenoughupdates/shaders/program/sobel.vsh
@@ -0,0 +1,20 @@
+#version 120
+
+attribute vec4 Position;
+
+uniform mat4 ProjMat;
+uniform vec2 InSize;
+uniform vec2 OutSize;
+
+varying vec2 texCoord;
+varying vec2 oneTexel;
+
+void main(){
+ vec4 outPos = ProjMat * vec4(Position.xy, 0.0, 1.0);
+ gl_Position = vec4(outPos.xy, 0.2, 1.0);
+
+ oneTexel = 1.0 / InSize;
+
+ texCoord = Position.xy / OutSize;
+ texCoord.y = 1.0 - texCoord.y;
+}