UNPKG

playcanvas

Version:

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

25 lines (24 loc) 588 B
var gloss_default = ` #ifdef STD_GLOSS_CONSTANT uniform float material_gloss; #endif void getGlossiness() { dGlossiness = 1.0; #ifdef STD_GLOSS_CONSTANT dGlossiness *= material_gloss; #endif #ifdef STD_GLOSS_TEXTURE dGlossiness *= texture2DBias({STD_GLOSS_TEXTURE_NAME}, {STD_GLOSS_TEXTURE_UV}, textureBias).{STD_GLOSS_TEXTURE_CHANNEL}; #endif #ifdef STD_GLOSS_VERTEX dGlossiness *= saturate(vVertexColor.{STD_GLOSS_VERTEX_CHANNEL}); #endif #ifdef STD_GLOSS_INVERT dGlossiness = 1.0 - dGlossiness; #endif dGlossiness += 0.0000001; } `; export { gloss_default as default };