nice text

This commit is contained in:
Rakarake 2026-02-27 22:14:16 +01:00
parent 9adaa9171a
commit d7966375f1
2 changed files with 13 additions and 4 deletions

View file

@ -28,5 +28,5 @@ void mainImage(out vec4 fragColor, in vec2 fragCoord) {
//hor_lines = sin(iTime * 3.0 +hor_lines * 2.0 + uv.y / 50.0);
//fragColor = vec4(uv.x, uv.y, 1.0, 1.0);
fragColor = vec4(hor_lines * 0.7, inverse_distance, inverse_distance, 1.0);
fragColor = vec4(hor_lines * 0.7, inverse_distance * 0.55, inverse_distance * 0.75, 1.0);
}

View file

@ -11,6 +11,10 @@
#include "wayland.h"
#include <string.h>
void print_help(FILE *channel, char *bin_path) {
fprintf(channel, "Usage: %s [OPTION]... [PATH]\n", bin_path);
}
int main(int argc, char *argv[]) {
char *shader_path = NULL;
int output_type = OUTPUT_WINDOW;
@ -19,7 +23,11 @@ int main(int argc, char *argv[]) {
int output_count;
// syntax: --window for a normal window or --layer for a wallpaper
for (int i = 1; i < argc; i++) {
if (strcmp("--window", argv[i]) == 0) {
if (strcmp("--help", argv[i]) == 0) {
print_help(stdout, argv[0]);
return 0;
}
else if (strcmp("--window", argv[i]) == 0) {
output_type = OUTPUT_WINDOW;
currently_reading_output = false;
}
@ -41,14 +49,15 @@ int main(int argc, char *argv[]) {
else if (!currently_reading_output) {
// path to fragment shader
if (shader_path != NULL) {
fprintf(stderr, "tried supplying '%s' as a shader file while one has already been selected\n", argv[i]);
fprintf(stderr, "Tried supplying '%s' as a shader file while one has already been selected.\n", argv[i]);
return 1;
}
shader_path = argv[i];
}
}
if (shader_path == NULL) {
printf("need to supply path to shader\n");
fprintf(stderr, "Need to supply path to shader!\n");
print_help(stderr, argv[0]);
return 1;
}