Files
android_development/samples/RenderScript/MiscSamples/res/raw/shadercubev.glsl
Alex Sakhartchouk e430471134 Moving renderscript sdk samples to their correct location.
Change-Id: I27de909cf0dbd91319c0eefebd0184ecc5c12dc9
2011-02-22 11:41:40 -08:00

11 lines
291 B
GLSL

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;
}