Alex Sakhartchouk | af83e79 | 2010-08-27 16:10:55 -0700 | [diff] [blame] | 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.android.samples) |
| 18 | |
| 19 | typedef struct VertexShaderConstants_s { |
| 20 | rs_matrix4x4 model; |
Alex Sakhartchouk | e7ae69f | 2010-09-14 09:50:43 -0700 | [diff] [blame] | 21 | rs_matrix4x4 proj; |
Alex Sakhartchouk | 54929cc | 2010-11-08 15:10:52 -0800 | [diff] [blame^] | 22 | float4 light0_Posision; |
Alex Sakhartchouk | af83e79 | 2010-08-27 16:10:55 -0700 | [diff] [blame] | 23 | float light0_Diffuse; |
| 24 | float light0_Specular; |
| 25 | float light0_CosinePower; |
| 26 | |
Alex Sakhartchouk | 54929cc | 2010-11-08 15:10:52 -0800 | [diff] [blame^] | 27 | float4 light1_Posision; |
Alex Sakhartchouk | af83e79 | 2010-08-27 16:10:55 -0700 | [diff] [blame] | 28 | float light1_Diffuse; |
| 29 | float light1_Specular; |
| 30 | float light1_CosinePower; |
Alex Sakhartchouk | af83e79 | 2010-08-27 16:10:55 -0700 | [diff] [blame] | 31 | } VertexShaderConstants; |
| 32 | |
Alex Sakhartchouk | 54929cc | 2010-11-08 15:10:52 -0800 | [diff] [blame^] | 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 | |
Alex Sakhartchouk | af83e79 | 2010-08-27 16:10:55 -0700 | [diff] [blame] | 42 | typedef struct FragentShaderConstants_s { |
Alex Sakhartchouk | 54929cc | 2010-11-08 15:10:52 -0800 | [diff] [blame^] | 43 | float4 light0_DiffuseColor; |
| 44 | float4 light0_SpecularColor; |
Alex Sakhartchouk | af83e79 | 2010-08-27 16:10:55 -0700 | [diff] [blame] | 45 | |
Alex Sakhartchouk | 54929cc | 2010-11-08 15:10:52 -0800 | [diff] [blame^] | 46 | float4 light1_DiffuseColor; |
| 47 | float4 light1_SpecularColor; |
Alex Sakhartchouk | af83e79 | 2010-08-27 16:10:55 -0700 | [diff] [blame] | 48 | } FragentShaderConstants; |
| 49 | |
Alex Sakhartchouk | 54929cc | 2010-11-08 15:10:52 -0800 | [diff] [blame^] | 50 | typedef struct FragentShaderConstants2_s { |
| 51 | float4 light_DiffuseColor[2]; |
| 52 | float4 light_SpecularColor[2]; |
| 53 | } FragentShaderConstants2; |
| 54 | |
Alex Sakhartchouk | af83e79 | 2010-08-27 16:10:55 -0700 | [diff] [blame] | 55 | typedef struct VertexShaderInputs_s { |
| 56 | float4 position; |
| 57 | float3 normal; |
Alex Sakhartchouk | e7ae69f | 2010-09-14 09:50:43 -0700 | [diff] [blame] | 58 | float2 texture0; |
Alex Sakhartchouk | af83e79 | 2010-08-27 16:10:55 -0700 | [diff] [blame] | 59 | } VertexShaderInputs; |
| 60 | |