I’m trying to port https://www.shadertoy.com/view/4djGW1 into OSL but I’m hitting a snag in the “fractal” function.
The original GLSL code has the lines:
mat2 m = mat2(c, s, -s, c); vec2 p = vec2(1.0, 0.0), r = p;
p = m*p;
The vec2 p line is particularly intriguing. I’m not sure what that’s doing at all.
OSL doesn’t appear to do 2x2 matrices (only 4x4) and the spec says OSL can’t multiply matrices and vectors. I’m not hugely knowledgeable about linear algebra but I don’t mind learning. Any advice? This should be possible in OSL, right?