mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-03 01:12:42 +08:00
8e7d92cbae
* fix skybox rotation with diffusemap * fix environment lighting negative value * add transfer clip pos
34 lines
800 B
Plaintext
34 lines
800 B
Plaintext
struct LightingResult
|
|
{
|
|
// material-dependent lighting data
|
|
vec3 diffuseColorWithLighting, specularColorWithLighting;
|
|
|
|
// pure lighting
|
|
vec3 directDiffuse, directSpecular;
|
|
vec3 environmentDiffuse, environmentSpecular;
|
|
float shadow, ao;
|
|
vec3 lightmapColor;
|
|
vec3 emissive;
|
|
|
|
// advanced
|
|
#if CC_SURFACES_LIGHTING_USE_FRESNEL
|
|
float fresnel;
|
|
#endif
|
|
|
|
#if CC_SURFACES_LIGHTING_TRANSMIT_SPECULAR
|
|
vec3 directTransmitSpecular, environmentTransmitSpecular;
|
|
#endif
|
|
#if CC_SURFACES_LIGHTING_TRANSMIT_DIFFUSE
|
|
vec3 directTransmitDiffuse, environmentTransmitDiffuse;
|
|
#endif
|
|
#if CC_SURFACES_LIGHTING_TRT
|
|
vec3 directTRT, environmentTRT;
|
|
vec3 specularColorWithLightingTRT;
|
|
#endif
|
|
#if CC_SURFACES_LIGHTING_TT
|
|
vec3 directTT;
|
|
vec3 diffuseColorWithLightingTT;
|
|
#endif
|
|
//vec3 scattered;
|
|
};
|