Files
cocos4/editor/assets/chunks/cc-global.chunk
T
2020-08-14 23:09:51 +08:00

27 lines
1.5 KiB
Plaintext

// Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd.
// have to specify precisions explicitly
// if shared among stages with different precisions
#pragma builtin(global)
layout(set = 0, binding = 0) uniform CCGlobal {
highp vec4 cc_time; // x: global time since started in seconds, y: delta time for current frame, z: total frames since started
mediump vec4 cc_screenSize; // xy: screen size, zw: inverse screen size
mediump vec4 cc_screenScale; // xy: screen scale, zw: inverse screen scale
mediump vec4 cc_nativeSize; // xy: shading size, zw: inverse shading size
highp mat4 cc_matView; // view matrix
highp mat4 cc_matViewInv; // inverse view matrix
highp mat4 cc_matProj; // projection matrix
highp mat4 cc_matProjInv; // inverse projection matrix
highp mat4 cc_matViewProj; // view-projection matrix
highp mat4 cc_matViewProjInv; // inverse view-projection matrix
highp vec4 cc_cameraPos; // xyz: camera position
mediump vec4 cc_exposure; // x: exposure, y: inverse exposure, z: HDR flag, w: exposure scale
mediump vec4 cc_mainLitDir; // xyz: main direcitonal light direction
mediump vec4 cc_mainLitColor; // xyz: main direcitonal light color, w: intensity
mediump vec4 cc_ambientSky; //xyz: sky illumination color, w: intensity
mediump vec4 cc_ambientGround; // xyz: ground albedo color, w: envmap LOD
mediump vec4 cc_fogColor; // xyzw: global fog color
mediump vec4 cc_fogBase; // xyz: fogStart, fogEnd, fogDensity
mediump vec4 cc_fogAdd; // xyz: fogTop, fogRange, fogAtten
};