Files
frameworks_base/libs/rs/java/Samples/res/raw/shadercubev.glsl
Alex Sakhartchouk 67f2e442a3 Support for cubemaps.
Change-Id: Iaf6087f614451a8e233b3e5bc49c834ab0ad08ee
2010-11-18 15:27:28 -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;
}