Home | History | Annotate | Download | only in miscsamples
      1 // Copyright (C) 2009 The Android Open Source Project
      2 //
      3 // Licensed under the Apache License, Version 2.0 (the "License");
      4 // you may not use this file except in compliance with the License.
      5 // You may obtain a copy of the License at
      6 //
      7 //      http://www.apache.org/licenses/LICENSE-2.0
      8 //
      9 // Unless required by applicable law or agreed to in writing, software
     10 // distributed under the License is distributed on an "AS IS" BASIS,
     11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     12 // See the License for the specific language governing permissions and
     13 // limitations under the License.
     14 
     15 #pragma version(1)
     16 
     17 #pragma rs java_package_name(com.example.android.rs.miscsamples)
     18 
     19 typedef struct VertexShaderConstants_s {
     20     rs_matrix4x4 model;
     21     rs_matrix4x4 proj;
     22     float4 light0_Posision;
     23     float light0_Diffuse;
     24     float light0_Specular;
     25     float light0_CosinePower;
     26 
     27     float4 light1_Posision;
     28     float light1_Diffuse;
     29     float light1_Specular;
     30     float light1_CosinePower;
     31 } VertexShaderConstants;
     32 
     33 typedef struct VertexShaderConstants2_s {
     34     rs_matrix4x4 model[2];
     35     rs_matrix4x4 proj;
     36     float4 light_Posision[2];
     37     float light_Diffuse[2];
     38     float light_Specular[2];
     39     float light_CosinePower[2];
     40 } VertexShaderConstants2;
     41 
     42 typedef struct VertexShaderConstants3_s {
     43     rs_matrix4x4 model;
     44     rs_matrix4x4 proj;
     45     float time;
     46 } VertexShaderConstants3;
     47 
     48 
     49 typedef struct FragentShaderConstants_s {
     50     float4 light0_DiffuseColor;
     51     float4 light0_SpecularColor;
     52 
     53     float4 light1_DiffuseColor;
     54     float4 light1_SpecularColor;
     55 } FragentShaderConstants;
     56 
     57 typedef struct FragentShaderConstants2_s {
     58     float4 light_DiffuseColor[2];
     59     float4 light_SpecularColor[2];
     60 } FragentShaderConstants2;
     61 
     62 typedef struct FragentShaderConstants3_s {
     63     float4 light0_DiffuseColor;
     64     float4 light0_SpecularColor;
     65     float4 light0_Posision;
     66     float light0_Diffuse;
     67     float light0_Specular;
     68     float light0_CosinePower;
     69 
     70     float4 light1_DiffuseColor;
     71     float4 light1_SpecularColor;
     72     float4 light1_Posision;
     73     float light1_Diffuse;
     74     float light1_Specular;
     75     float light1_CosinePower;
     76 } FragentShaderConstants3;
     77 
     78 typedef struct VertexShaderInputs_s {
     79     float4 position;
     80     float3 normal;
     81     float2 texture0;
     82 } VertexShaderInputs;
     83 
     84