UNPKG

gpu-curtains

Version:

gpu-curtains is a 3D WebGPU rendering engine. It can be used as a standalone 3D engine, but also includes extra classes focused on mapping 3d objects to DOM elements; It allows users to synchronize values such as position, sizing, or scale between them.

10 lines (9 loc) 628 B
//#region src/core/shaders/chunks/fragment/body/get-PCF-shadows.ts /** Helper chunk to get the PCF soft shadow generated by all the {@link core/lights/DirectionalLight.DirectionalLight | DirectionalLight}, {@link core/lights/PointLight.PointLight | PointLight} and {@link core/lights/SpotLight.SpotLight | SpotLight}. */ const getPCFShadows = ` let pointShadows = getPCFPointShadows(worldPosition, fragmentPosition.xy); let directionalShadows = getPCFDirectionalShadows(worldPosition, fragmentPosition.xy); let spotShadows = getPCFSpotShadows(worldPosition, fragmentPosition.xy); `; //#endregion export { getPCFShadows };