mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
c4c95e9e59
* add sky.effect with surface shader surface shader code style * get ready for chunks reorganizing * Delete default_skybox_diffusion.png.meta * add depth functions * add meta
56 lines
1.3 KiB
Plaintext
56 lines
1.3 KiB
Plaintext
// defines
|
|
//#todo: #10131 Redmi5A = 1
|
|
#pragma define-meta CC_DISABLE_STRUCTURE_IN_FRAGMENT_SHADER range([0, 1])
|
|
|
|
#pragma define CC_PIPELINE_TYPE_FORWARD 0
|
|
#pragma define CC_PIPELINE_TYPE_DEFERRED 1
|
|
#pragma define-meta CC_PIPELINE_TYPE range([0, 1])
|
|
#pragma define-meta CC_FORCE_FORWARD_SHADING
|
|
|
|
|
|
// Surface
|
|
#include <shading-entries/data-structures/fs-input>
|
|
|
|
// Uniforms--UBO
|
|
#include <cc-global>
|
|
#if (CC_PIPELINE_TYPE == CC_PIPELINE_TYPE_FORWARD || CC_FORCE_FORWARD_SHADING)
|
|
#if CC_FORWARD_ADD
|
|
#include <cc-forward-light>
|
|
#endif
|
|
#endif
|
|
|
|
// Uniforms--Tex
|
|
#include <cc-shadow>
|
|
#if CC_USE_IBL
|
|
#include <cc-environment>
|
|
#if CC_USE_DIFFUSEMAP
|
|
#include <cc-diffusemap>
|
|
#endif
|
|
#endif
|
|
|
|
// Base
|
|
#include <common>
|
|
#include <texture-lod>
|
|
#include <packing>
|
|
#include <unpack>
|
|
#include <aces>
|
|
#include <gamma>
|
|
#include <common/math/number>
|
|
#include <common/math/coordinates>
|
|
#include <octahedron-transform>
|
|
#include <common/mesh/material>
|
|
#include <common/texture/cubemap>
|
|
|
|
// Functional
|
|
#include <builtin/internal-functions/shadow-map>
|
|
#include <builtin/internal-functions/fog>
|
|
|
|
#if CC_SURFACES_USE_LIGHT_MAP && !CC_SURFACES_USE_BATCHING && !CC_FORWARD_ADD
|
|
#include <builtin/uniforms/cc-light-map>
|
|
#include <common/lighting/light-map>
|
|
#endif
|
|
|
|
|
|
// Debug view
|
|
#include <common/debug/debug-view-define>
|