playcanvas
Version:
Open-source WebGL/WebGPU 3D engine for the web
34 lines (27 loc) • 762 B
JavaScript
var gloss_default = (
/* wgsl */
`
uniform material_gloss: f32;
fn getGlossiness() {
dGlossiness = 1.0;
dGlossiness = dGlossiness * uniform.material_gloss;
dGlossiness = dGlossiness * textureSampleBias({STD_GLOSS_TEXTURE_NAME}, {STD_GLOSS_TEXTURE_NAME}Sampler, {STD_GLOSS_TEXTURE_UV}, uniform.textureBias).{STD_GLOSS_TEXTURE_CHANNEL};
dGlossiness = dGlossiness * saturate(vVertexColor.{STD_GLOSS_VERTEX_CHANNEL});
dGlossiness = 1.0 - dGlossiness;
dGlossiness = dGlossiness + 0.0000001;
}
`
);
export {
gloss_default as default
};