Hello dear friends
Recently i was trying to port a shadertoy shader to SparkSL but apparently there’s something weird going on
although % is not supported by the current version of SparkSL and we have to use mod(x, y) instead, but in this particular case it doesn’t work. seems like mod is only works with floats not ints…
i would be highly appreciated if somebody helped me out about this.
here is my half converted code along with target shadertoy shader.
My experience shows that actually mod is not the same as %, although mod may be replaced by % in many shaders and it works well, but for example, in shaders that need to save frames, this formula cannot be used. Because the frame may not be seen in full And half of the previous frame and half of the current frame can be seen if the mod is used