blob: 3f51785b6f7f538bee660951127b1d8d17b20762 [file] [log] [blame]
Alex Sakhartchoukaf83e792010-08-27 16:10:55 -07001// 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
19typedef struct VertexShaderConstants_s {
20 rs_matrix4x4 model;
Alex Sakhartchouke7ae69f2010-09-14 09:50:43 -070021 rs_matrix4x4 proj;
Alex Sakhartchouk54929cc2010-11-08 15:10:52 -080022 float4 light0_Posision;
Alex Sakhartchoukaf83e792010-08-27 16:10:55 -070023 float light0_Diffuse;
24 float light0_Specular;
25 float light0_CosinePower;
26
Alex Sakhartchouk54929cc2010-11-08 15:10:52 -080027 float4 light1_Posision;
Alex Sakhartchoukaf83e792010-08-27 16:10:55 -070028 float light1_Diffuse;
29 float light1_Specular;
30 float light1_CosinePower;
Alex Sakhartchoukaf83e792010-08-27 16:10:55 -070031} VertexShaderConstants;
32
Alex Sakhartchouk54929cc2010-11-08 15:10:52 -080033typedef 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 Sakhartchoukaf83e792010-08-27 16:10:55 -070042typedef struct FragentShaderConstants_s {
Alex Sakhartchouk54929cc2010-11-08 15:10:52 -080043 float4 light0_DiffuseColor;
44 float4 light0_SpecularColor;
Alex Sakhartchoukaf83e792010-08-27 16:10:55 -070045
Alex Sakhartchouk54929cc2010-11-08 15:10:52 -080046 float4 light1_DiffuseColor;
47 float4 light1_SpecularColor;
Alex Sakhartchoukaf83e792010-08-27 16:10:55 -070048} FragentShaderConstants;
49
Alex Sakhartchouk54929cc2010-11-08 15:10:52 -080050typedef struct FragentShaderConstants2_s {
51 float4 light_DiffuseColor[2];
52 float4 light_SpecularColor[2];
53} FragentShaderConstants2;
54
Alex Sakhartchoukaf83e792010-08-27 16:10:55 -070055typedef struct VertexShaderInputs_s {
56 float4 position;
57 float3 normal;
Alex Sakhartchouke7ae69f2010-09-14 09:50:43 -070058 float2 texture0;
Alex Sakhartchoukaf83e792010-08-27 16:10:55 -070059} VertexShaderInputs;
60