• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022 Huawei Device Co., Ltd.
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 
16 #ifndef SHADERS_COMMON_3D_DEFAULT_MATERIAL_ENV_FRAGMENT_LAYOUT_COMMON_H
17 #define SHADERS_COMMON_3D_DEFAULT_MATERIAL_ENV_FRAGMENT_LAYOUT_COMMON_H
18 
19 // disable set 1 and 2
20 #define CORE3D_ENVIRONMENT_FRAG_LAYOUT
21 #include "3d/shaders/common/3d_dm_frag_layout_common.h"
22 #include "3d/shaders/common/3d_dm_structures_common.h"
23 #include "render/shaders/common/render_compatibility_common.h"
24 #include "render/shaders/common/render_post_process_structs_common.h"
25 
26 #ifdef VULKAN
27 
28 // sets
29 
30 // initial sets from default material
31 
32 layout(set = 0, binding = 2, std140) uniform uEnvironmentStructDataArray
33 {
34     DefaultMaterialEnvironmentStruct uEnvironmentDataArray[CORE_DEFAULT_MATERIAL_MAX_ENVIRONMENT_COUNT];
35 };
36 
37 layout(set = 3, binding = 0) uniform sampler2D uImgSampler;
38 layout(set = 3, binding = 1) uniform samplerCube uImgCubeSampler;
39 layout(set = 3, binding = 2) uniform samplerCube uImgCubeSamplerBlender;
40 
41 layout(constant_id = CORE_DM_CONSTANT_ID_ENV_TYPE) const uint CORE_DEFAULT_ENV_TYPE = 0;
42 
43 #else
44 
45 #endif
46 
47 #endif // SHADERS_COMMON_3D_DEFAULT_MATERIAL_ENV_FRAGMENT_LAYOUT_COMMON_H
48