Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl
| #define COMMON_UNIFORMS_LIB | #define COMMON_UNIFORMS_LIB | ||||
| #if !defined(USE_GPU_SHADER_CREATE_INFO) | |||||
| /* keep in sync with CommonUniformBlock */ | |||||
| layout(std140) uniform common_block | layout(std140) uniform common_block | ||||
| { | { | ||||
| mat4 pastViewProjectionMatrix; | mat4 pastViewProjectionMatrix; | ||||
| vec4 hizUvScale; /* To correct mip level texel misalignment */ | vec4 hizUvScale; /* To correct mip level texel misalignment */ | ||||
| /* Ambient Occlusion */ | /* Ambient Occlusion */ | ||||
| vec4 aoParameters[2]; | vec4 aoParameters[2]; | ||||
| /* Volumetric */ | /* Volumetric */ | ||||
| ivec4 volTexSize; | ivec4 volTexSize; | ||||
| Show All 32 Lines | layout(std140) uniform common_block | ||||
| float rayDepth; | float rayDepth; | ||||
| float alphaHashOffset; | float alphaHashOffset; | ||||
| float alphaHashScale; | float alphaHashScale; | ||||
| /* Misc */ | /* Misc */ | ||||
| vec4 cameraUvScaleBias; | vec4 cameraUvScaleBias; | ||||
| vec4 planarClipPlane; | vec4 planarClipPlane; | ||||
| }; | }; | ||||
| #endif /* !USE_GPU_SHADER_CREATE_INFO */ | |||||
| #ifdef USE_GPU_SHADER_CREATE_INFO | |||||
| # ifndef EEVEE_SHADER_SHARED_H | |||||
| # error Missing eevee_legacy_common_lib additional create info on shader create info | |||||
| # endif | |||||
| #endif | |||||
| /* rayType (keep in sync with ray_type) */ | /* rayType (keep in sync with ray_type) */ | ||||
| #define EEVEE_RAY_CAMERA 0 | #define EEVEE_RAY_CAMERA 0 | ||||
| #define EEVEE_RAY_SHADOW 1 | #define EEVEE_RAY_SHADOW 1 | ||||
| #define EEVEE_RAY_DIFFUSE 2 | #define EEVEE_RAY_DIFFUSE 2 | ||||
| #define EEVEE_RAY_GLOSSY 3 | #define EEVEE_RAY_GLOSSY 3 | ||||
| /* aoParameters */ | /* aoParameters */ | ||||
| #define aoDistance aoParameters[0].x | #define aoDistance aoParameters[0].x | ||||
| Show All 15 Lines | |||||