playcanvas
Version:
Open-source WebGL/WebGPU 3D engine for the web
3 lines (2 loc) • 5.7 kB
TypeScript
declare const _default: "\n\n // globals\n float dAlpha = 1.0;\n\n // all passes handle opacity\n #if LIT_BLEND_TYPE != NONE || defined(LIT_ALPHA_TEST) || defined(LIT_ALPHA_TO_COVERAGE) || STD_OPACITY_DITHER != NONE\n #ifdef STD_OPACITY_TEXTURE_ALLOCATE\n uniform sampler2D texture_opacityMap;\n #endif\n #endif\n\n #ifdef FORWARD_PASS // ----------------\n\n // globals\n vec3 dAlbedo;\n vec3 dNormalW;\n vec3 dSpecularity = vec3(0.0);\n float dGlossiness = 0.0;\n\n #ifdef LIT_REFRACTION\n float dTransmission;\n float dThickness;\n #endif\n\n #ifdef LIT_SCENE_COLOR\n uniform sampler2D uSceneColorMap;\n #endif\n\n #ifdef LIT_SCREEN_SIZE\n uniform vec4 uScreenSize;\n #endif\n\n #ifdef LIT_TRANSFORMS\n uniform mat4 matrix_viewProjection;\n uniform mat4 matrix_model;\n #endif\n\n // parallax\n #ifdef STD_HEIGHT_MAP\n vec2 dUvOffset;\n #ifdef STD_HEIGHT_TEXTURE_ALLOCATE\n uniform sampler2D texture_heightMap;\n #endif\n #endif\n\n // diffuse\n #ifdef STD_DIFFUSE_TEXTURE_ALLOCATE\n uniform sampler2D texture_diffuseMap;\n #endif\n\n #ifdef STD_DIFFUSEDETAIL_TEXTURE_ALLOCATE\n uniform sampler2D texture_diffuseDetailMap;\n #endif\n\n // normal\n #ifdef STD_NORMAL_TEXTURE_ALLOCATE\n uniform sampler2D texture_normalMap;\n #endif\n\n #ifdef STD_NORMALDETAIL_TEXTURE_ALLOCATE\n uniform sampler2D texture_normalDetailMap;\n #endif\n\n // refraction\n #ifdef STD_THICKNESS_TEXTURE_ALLOCATE\n uniform sampler2D texture_thicknessMap;\n #endif\n #ifdef STD_REFRACTION_TEXTURE_ALLOCATE\n uniform sampler2D texture_refractionMap;\n #endif\n\n // iridescence\n #ifdef LIT_IRIDESCENCE\n float dIridescence;\n float dIridescenceThickness;\n\n #ifdef STD_IRIDESCENCE_THICKNESS_TEXTURE_ALLOCATE\n uniform sampler2D texture_iridescenceThicknessMap;\n #endif\n #ifdef STD_IRIDESCENCE_TEXTURE_ALLOCATE\n uniform sampler2D texture_iridescenceMap;\n #endif\n #endif\n\n #ifdef LIT_CLEARCOAT\n float ccSpecularity;\n float ccGlossiness;\n vec3 ccNormalW;\n #endif\n\n #ifdef LIT_GGX_SPECULAR\n float dAnisotropy;\n vec2 dAnisotropyRotation;\n #endif\n\n // specularity & glossiness\n #ifdef LIT_SPECULAR_OR_REFLECTION\n\n // sheen\n #ifdef LIT_SHEEN\n vec3 sSpecularity;\n float sGlossiness;\n\n #ifdef STD_SHEEN_TEXTURE_ALLOCATE\n uniform sampler2D texture_sheenMap;\n #endif\n #ifdef STD_SHEENGLOSS_TEXTURE_ALLOCATE\n uniform sampler2D texture_sheenGlossMap;\n #endif\n #endif\n\n // metalness\n #ifdef LIT_METALNESS\n float dMetalness;\n float dIor;\n\n #ifdef STD_METALNESS_TEXTURE_ALLOCATE\n uniform sampler2D texture_metalnessMap;\n #endif\n #endif\n\n // specularity factor\n #ifdef LIT_SPECULARITY_FACTOR\n float dSpecularityFactor;\n\n #ifdef STD_SPECULARITYFACTOR_TEXTURE_ALLOCATE\n uniform sampler2D texture_specularityFactorMap;\n #endif\n #endif\n\n // specular color\n #ifdef STD_SPECULAR_COLOR\n #ifdef STD_SPECULAR_TEXTURE_ALLOCATE\n uniform sampler2D texture_specularMap;\n #endif\n #endif\n\n // gloss\n #ifdef STD_GLOSS_TEXTURE_ALLOCATE\n uniform sampler2D texture_glossMap;\n #endif\n #endif\n\n // ao\n #ifdef STD_AO\n float dAo;\n #ifdef STD_AO_TEXTURE_ALLOCATE\n uniform sampler2D texture_aoMap;\n #endif\n #ifdef STD_AODETAIL_TEXTURE_ALLOCATE\n uniform sampler2D texture_aoDetailMap;\n #endif\n #endif\n\n // emission\n vec3 dEmission;\n #ifdef STD_EMISSIVE_TEXTURE_ALLOCATE\n uniform sampler2D texture_emissiveMap;\n #endif\n\n // clearcoat\n #ifdef LIT_CLEARCOAT\n #ifdef STD_CLEARCOAT_TEXTURE_ALLOCATE\n uniform sampler2D texture_clearCoatMap;\n #endif\n #ifdef STD_CLEARCOATGLOSS_TEXTURE_ALLOCATE\n uniform sampler2D texture_clearCoatGlossMap;\n #endif\n #ifdef STD_CLEARCOATNORMAL_TEXTURE_ALLOCATE\n uniform sampler2D texture_clearCoatNormalMap;\n #endif\n #endif\n \n // anisotropy\n #ifdef LIT_GGX_SPECULAR\n #ifdef STD_ANISOTROPY_TEXTURE_ALLOCATE\n uniform sampler2D texture_anisotropyMap;\n #endif\n #endif\n\n // lightmap\n #if defined(STD_LIGHTMAP) || defined(STD_LIGHT_VERTEX_COLOR)\n vec3 dLightmap;\n #ifdef STD_LIGHT_TEXTURE_ALLOCATE\n uniform sampler2D texture_lightMap;\n #endif\n #endif\n #endif\n\n // front end outputs to lit shader\n #include \"litShaderCorePS\"\n";
export default _default;