MCPcopy Create free account
hub / github.com/amandaghassaei/gpu-io / wrappedLineColorProgram

Function wrappedLineColorProgram

src/Programs.ts:547–564  ·  view source on GitHub ↗
(composer: GPUComposer)

Source from the content-addressed store, hash-verified

545 * @private
546 */
547export function wrappedLineColorProgram(composer: GPUComposer) {
548 return new GPUProgram(composer, {
549 name: `wrappedLineColor`,
550 fragmentShader: `
551in vec2 v_lineWrapping;
552uniform vec4 u_value;
553out vec4 out_result;
554void main() {
555 // Check if this line has wrapped.
556 if ((v_lineWrapping.x != 0.0 && v_lineWrapping.x != 1.0) || (v_lineWrapping.y != 0.0 && v_lineWrapping.y != 1.0)) {
557 // Render nothing.
558 discard;
559 return;
560 }
561 out_result = vec4(u_value);
562}`,
563 });
564}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected