polyadvent

A game engine from scratch in C
git clone git://jb55.com/polyadvent
Log | Files | Refs | README

standard_vtxos.glsl (342B)


      1 vec4 v4_pos = vec4(position, 1.0);
      2 // data_out.normal = normal;
      3 // data_out.position = position;
      4 
      5 data_out.normal = mat3(transpose(inverse(model))) * normal;
      6 data_out.position = vec3(model * v4_pos);
      7 data_out.color_smooth = data_out.color = color;
      8 data_out.shadow_coord = depth_mvp * v4_pos;
      9 // TODO: move shadow coord calc from frag to here