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
float utilityFunction(float t, float value) | |
{ | |
return t; | |
} | |
float subFunction(float t, vec2 uv) | |
{ | |
return utilityFunction(t, texture(iChannel0, uv)[0]); | |
} |
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
float aastep(float t, float value) { | |
return t; | |
} |
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
float aastep(float t, float value) { | |
return step(t, value); | |
} | |
float tex(float t, vec2 uv) { | |
return aastep(t, texture(u_glyphs, uv)[channel]); | |
} |
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
precision mediump float; | |
layout(location = 0) out vec4 fragColor; | |
uniform sampler2D u_glyphs; | |
uniform vec4 u_color; | |
uniform float u_aaStepScale; | |
uniform int u_aaSampling; | |
varying vec2 v_uv; |
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
#include <chrono> | |
#include <iostream> | |
int main() | |
{ | |
auto start = std::chrono::high_resolution_clock::now(); | |
std::cout << std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now() - start).count() << "ms" << std::endl; | |
} |