This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uniform vec3 color; | |
uniform vec3 borderColor; | |
uniform float borderWidth; | |
varying vec2 vUv; | |
// Technique based on Inigo Quilez's 'Analytic checkers pattern filtering' | |
// https://iquilezles.org/articles/checkerfiltering/ | |
float border(in vec2 uv, in vec2 ddx, in vec2 ddy) { | |
// filter kernel | |
vec2 w = max(abs(ddx), abs(ddy)) + 0.001; |