summaryrefslogtreecommitdiffstats
path: root/libs/rs/java/Samples/res/raw/shadercubev.glsl
blob: 70f5cd64e371e86c9837d8bea5b0feec413d68a5 (plain)
1
2
3
4
5
6
7
8
9
10
varying vec3 worldNormal;

// This is where actual shader code begins
void main() {
   vec4 worldPos = UNI_model * ATTRIB_position;
   gl_Position = UNI_proj * worldPos;

   mat3 model3 = mat3(UNI_model[0].xyz, UNI_model[1].xyz, UNI_model[2].xyz);
   worldNormal = model3 * ATTRIB_normal;
}