def main(self): p: g.vec2 = 2. * self.gl_FragCoord.xy p *= 4 p = g.mod(p, 4.0) - 2.0 for i in range(0, 4): p = self.get_p(p) #abs(p) / _gl.dot(p, p) - 0.63 p *= 2.0 p = p / 2.0 de: float = abs(g.dot(p, g.vec2(g.cos(self.iTime), g.sin(self.iTime)))) gl_FragColor = g.vec4(g.vec3(de), 1.0) gl_FragColor = g.texture2D(self.textureObj, self.gl_FragCoord.xy) gl_FragColor.r = (g.sin(self.iTime) + 1) / 2
def main(self): gl_FragColor = g.vec4( max( g.dot(g.normalize(self.pixlenormal), g.normalize(self.tolight)), 0.07))
def get_p(self, p: g.vec2) -> g.vec2: return abs(p) / g.dot(p, p) - 0.63