UNPKG

playcanvas

Version:

PlayCanvas WebGL game engine

24 lines (22 loc) 576 B
var glossPS = ` #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 { glossPS as default };