Work in progress

This commit is contained in:
Sam Gateau 2015-09-11 15:25:33 -07:00
parent f51f17b267
commit cf1f5b8771
2 changed files with 13 additions and 1 deletions

View file

@ -70,4 +70,5 @@ DeferredFragment unpackDeferredFragment(vec2 texcoord) {
return frag;
}
<@endif@>

View file

@ -21,8 +21,12 @@
// Everything about light
<@include model/Light.slh@>
<@include gpu/Transform.slh@>
<$declareStandardTransform()$>
// The view Matrix
uniform mat4 invViewMat;
//uniform mat4 invViewMat;
in vec4 _texCoord0;
out vec4 _fragColor;
@ -38,6 +42,10 @@ void main(void) {
discard;
}
// Need the camera inv view mat
TransformCamera cam = getTransformCamera();
mat4 invViewMat = cam._viewInverse;
// Need the light now
Light light = getLight();
@ -86,5 +94,8 @@ void main(void) {
_fragColor = vec4(edgeCoord * edgeCoord * getLightColor(light), 0.0);
}
}
_fragColor = vec4(frag.position.xyz, 1);
}