11 lines
391 B
Python
11 lines
391 B
Python
import math
|
|
from pixel import Pixel
|
|
|
|
def main(pixel: Pixel, resolution: tuple, frag_coord: tuple, time: float): # default shader when creating a new shader on shadertoy
|
|
uv = (frag_coord[0] / resolution[0], frag_coord[1] / resolution[1])
|
|
|
|
pixel.background_color.set(
|
|
0.5 + 0.5 * math.cos(time + uv[0]),
|
|
0.5 + 0.5 * math.cos(time + uv[1] + 2),
|
|
0.5 + 0.5 * math.cos(time + uv[0] + 4)
|
|
) |