@openhps/core
Version:
Open Hybrid Positioning System - Core component
81 lines (61 loc) • 1.7 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.vertex = exports.fragment = void 0;
const vertex = exports.vertex = /* glsl */`
uniform float scale;
attribute float lineDistance;
varying float vLineDistance;
void main() {
vLineDistance = scale * lineDistance;
}
`;
const fragment = exports.fragment = /* glsl */`
uniform vec3 diffuse;
uniform float opacity;
uniform float dashSize;
uniform float totalSize;
varying float vLineDistance;
void main() {
vec4 diffuseColor = vec4( diffuse, opacity );
if ( mod( vLineDistance, totalSize ) > dashSize ) {
discard;
}
vec3 outgoingLight = vec3( 0.0 );
outgoingLight = diffuseColor.rgb; // simple shader
}
`;