Skip to content

Commit

Permalink
shaders: Implement simple shaders.
Browse files Browse the repository at this point in the history
  • Loading branch information
CrossVR committed Nov 15, 2015
1 parent b9eaf80 commit d5b17cd
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cs/resources/shaders/gl/simple.vs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include "common.h"
#include "iostructs\v_model.h"

vf main (v_model v)
{
vf o;

o.hpos = mul (m_WVP, v.P); // xform, input in world coords
o.tc0 = v.tc; // copy tc

return o;
}
14 changes: 14 additions & 0 deletions cs/resources/shaders/gl/simple_color.vs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include "common.h"

out gl_PerVertex { vec4 gl_Position; };

layout(location = POSITION) in float4 P;

layout(location = COLOR0) out float4 C;

uniform float4 tfactor;
void main ()
{
gl_Position = mul (m_WVP, P); // xform, input in world coords
C = tfactor;
}

0 comments on commit d5b17cd

Please sign in to comment.