Created
February 24, 2016 16:15
-
-
Save rasteron/fbe28211759541af6657 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Uniforms.glsl" | |
#include "Samplers.glsl" | |
#include "Transform.glsl" | |
#include "ScreenPos.glsl" | |
varying vec2 vScreenPos; | |
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
void VS() | |
{ | |
mat4 modelMatrix = iModelMatrix; | |
vec3 worldPos = GetWorldPos(modelMatrix); | |
gl_Position = GetClipPos(worldPos); | |
vScreenPos = GetScreenPosPreDiv(gl_Position); | |
} | |
void PS() | |
{ | |
vec4 color = texture2D(sDiffMap, vScreenPos); | |
gl_FragColor = vec4(vec3(1.0, 1.0, 1.0) - color.rgb, color.a); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment