diff options
Diffstat (limited to 'tests/RenderScriptTests/MiscSamples/res/raw/shaderarrayf.glsl')
-rw-r--r-- | tests/RenderScriptTests/MiscSamples/res/raw/shaderarrayf.glsl | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/RenderScriptTests/MiscSamples/res/raw/shaderarrayf.glsl b/tests/RenderScriptTests/MiscSamples/res/raw/shaderarrayf.glsl new file mode 100644 index 0000000..238ecad --- /dev/null +++ b/tests/RenderScriptTests/MiscSamples/res/raw/shaderarrayf.glsl @@ -0,0 +1,16 @@ + +varying lowp float light0_Diffuse; +varying lowp float light0_Specular; +varying lowp float light1_Diffuse; +varying lowp float light1_Specular; +varying vec2 varTex0; + +void main() { + vec2 t0 = varTex0.xy; + lowp vec4 col = texture2D(UNI_Tex0, t0).rgba; + col.xyz = col.xyz * (light0_Diffuse * UNI_light_DiffuseColor[0].xyz + light1_Diffuse * UNI_light_DiffuseColor[1].xyz); + col.xyz += light0_Specular * UNI_light_SpecularColor[0].xyz; + col.xyz += light1_Specular * UNI_light_SpecularColor[1].xyz; + gl_FragColor = col; +} + |