Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <octane-oslintrin.h>
- shader textureSheet (
- output point uvOut = 0,
- int maxcount = 16
- [[int min=1, int max=10000]],
- int columns = 4
- [[int min=1, int max=100]],
- int rows = 4
- [[int min=1, int max=100]],
- color RandomTexture = color(1, 0, 0)
- )
- {
- color c2 = _evaluateDelayed(RandomTexture, 0.5, 0.5);
- int instRnd = (int) floor(c2[0]*maxcount);
- int column = instRnd % columns;
- int row = (int)floor(instRnd / columns);
- float U2 = (u + column) / columns;
- float V2 = (v + rows - row - 1) / rows;
- uvOut = point(U2, V2, 0);
- }
Advertisement
Add Comment
Please, Sign In to add comment