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) • 367 B
JavaScript
//#region src/core/shaders/chunks/fragment/body/get-diffuse.ts
/**
* Set the `diffuseColor` (`vec3f`) and the diffuse component reduced by metalness `diffuseContribution` (`vec3f`) values.
*/
const getDiffuse = `
var diffuseColor: vec3f = outputColor.rgb;
var diffuseContribution: vec3f = outputColor.rgb * (1.0 - metallic);`;
//#endregion
export { getDiffuse };