Created
August 21, 2015 09:46
-
-
Save rasteron/2019a4890e0d6311297f 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" | |
#include "Lighting.glsl" | |
varying vec2 vScreenPos; | |
void VS() | |
{ | |
mat4 modelMatrix = iModelMatrix; | |
vec3 worldPos = GetWorldPos(modelMatrix); | |
gl_Position = GetClipPos(worldPos); | |
vScreenPos = GetScreenPosPreDiv(gl_Position); | |
} | |
void PS() | |
{ | |
vec3 rgb = texture2D(sDiffMap, vScreenPos).rgb; | |
gl_FragColor.r = dot(rgb, vec3(.393, .769, .189)); | |
gl_FragColor.g = dot(rgb, vec3(.349, .686, .168)); | |
gl_FragColor.b = dot(rgb, vec3(.272, .534, .131)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment