Log In  

(originally posted in https://www.lexaloffle.com/bbs/?tid=33995 - I tried to not spam the forum but it turns out you can't post two carts in one thread if you want them both to show up in splore.)

Cart #catatatunnel2-0 | 2019-04-22 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Shift/tab removes the text. Setting the scale to about 10 makes the interlaced versions look sort of okay.

Based on https://lodev.org/cgtutor/tunnel.html

P#63818 2019-04-22 05:40 ( Edited 2019-04-22 06:02)


Ooh this is quite mesmerizing! The huge range of options is definitely a neat touch, too.

P#63820 2019-04-22 06:10

Awesome stuff. I don't have a chance to look at the code, but the line version seems to run a lot faster with no apparent difference compared to the pset version. Why include the pset version at all?

P#63923 2019-04-24 06:19

Thanks for the nice comments :)

If you turn the animation off & flick through the modes you'll see the difference. The line version skips roughly every 3rd pixel so it's a bit lower res than the pixel version. (in the code, it's the 'for x=0,127,xstep' part - change the value of xstep for better / worse resolution)

It also doesn't hold up too well against large scales - it tries to exploit cases where neighbouring on-screen pixels are part of the same pixel in the texture (and then not drawing them), but for larger scales the drawn texture gets smaller, so it can't skip as many pixels, and eventually it tanks.

The pset version's perf is constant no matter what you throw at it, and it's 1:1 resolution - my eyes appreciated it after a few hours of staring at lines anyway :)

P#63955 2019-04-25 01:50 ( Edited 2019-04-25 02:15)

[Please log in to post a comment]