Files
frameworks_base/libs/rs/java/Samples/res/raw/shader2v.glsl
Alex Sakhartchouk 6b5222dd53 Perf test
Change-Id: I5cfc1b6dd438b13091993d4669e10fb2e49aaa06
2010-12-13 14:48:21 -08:00

18 lines
463 B
GLSL

varying vec3 varWorldPos;
varying vec3 varWorldNormal;
varying vec2 varTex0;
// This is where actual shader code begins
void main() {
vec4 objPos = ATTRIB_position;
vec4 worldPos = UNI_model * objPos;
gl_Position = UNI_proj * worldPos;
mat3 model3 = mat3(UNI_model[0].xyz, UNI_model[1].xyz, UNI_model[2].xyz);
vec3 worldNorm = model3 * ATTRIB_normal;
varWorldPos = worldPos.xyz;
varWorldNormal = worldNorm;
varTex0 = ATTRIB_texture0;
}