UNPKG

playcanvas

Version:

Open-source WebGL/WebGPU 3D engine for the web

33 lines (32 loc) 963 B
var gsplatCommon_default = ` #include "gsplatHelpersVS" #include "gsplatFormatVS" #include "gsplatStructsVS" #include "gsplatDeclarationsVS" #include "gsplatModifyVS" #include "gsplatEvalSHVS" #include "gsplatQuatToMat3VS" #include "gsplatReadVS" #include "gsplatSourceVS" #include "gsplatCenterVS" #include "gsplatCornerVS" #include "gsplatOutputVS" #if defined(SHADOW_PASS) || defined(PICK_PASS) || defined(PREPASS_PASS) uniform alphaClip: f32; #else uniform alphaClipForward: f32; #endif fn clipCorner(corner: ptr<function, SplatCorner>, alpha: half) { #if defined(SHADOW_PASS) || defined(PICK_PASS) || defined(PREPASS_PASS) let alphaClipValue = half(uniform.alphaClip); #else let alphaClipValue = half(uniform.alphaClipForward); #endif let clip = min(half(1.0), sqrt(max(half(0.0), log(alpha / alphaClipValue))) * half(0.5)); corner.offset = corner.offset * f32(clip); corner.uv = corner.uv * clip; } `; export { gsplatCommon_default as default };