"The best thing about a boolean is even if you are wrong, you are only off by a bit."
- Anonymous
More pages: 1 ... 11 ... 21 ... 31 ... 41 ... 51 ... 61 ... 71 ... 81 ... 91 ... 101 ... 111 112 113 114 115 116 117 118 119 120 121 122 ... 131 ... 141 ... 151 ... 161 ... 171 ... 181 ... 191 ... 201 ... 211 ... 221 ... 231 ... 241 ... 251 ... 261 ... 271 ... 281 ... 291 ... 301 ... 311 ... 321 ... 331 ... 341 ... 351 ... 361 ... 371 ... 381 ... 391 ... 401 ... 411 ... 421 ... 431 ... 438
Query FailedHumus
Thursday, February 24, 2011

Yeah, I'm aware of those. I didn't use that flag, but did the equivalent work manually instead. All those numbers are chosen specifically because they are very compressible with most of the low bits as zero. I wrote a small piece of code to generate compressible coordinates with "interesting" visuals. Then I manually went through the whole list of a couple of hundred candidates and kept good ones and threw away not so interesting ones, and then kept going until I had a few favorites left and got under 1024 bytes.

As for 1.0f/8192.0f, that's actually a very compressible number (0x39000000).

Seven
Thursday, February 24, 2011

Your shader seems very compact, so there's probably not much to gain there. But I see you're using quite a few floats (zoom locations f.e). By default, Crinkler will compress these loslessly, because all bits might be important in the context of a demo. But for many things in a 4k/1k such as camera paths or object locations, a reduced precision is good enough. So check the TRUNCATEFLOATS option of Crinkler if you're not using it already. Also, you're using some float constants (1.0f / 8192.0f) that might compress better if replaced by compress-friendly approximations. See iq's list here: http://www.iquilezles.org/www/articles/float4k/float4k.htm

Humus
Monday, February 21, 2011

I looked at 1kPack, but it appears to be made for asm coding. I don't feel motivated to rewrite it in asm to try it out.

I gave Shader Minifier a shot though, but it didn't save me anything over my handtrimmed shader. However, I noticed it got rid of the brackets in my while-loop, which was a useful idea. So using that trick and a little manual handtuning again I saved another 3 bytes. Yay! Not enough to bother making a new release though.

Seven
Wednesday, February 16, 2011

While Crinkler is without a doubt the best compressor for 4Ks, there a better alternative for 1Ks: 1kPack. You can find the download link here: http://www.pouet.net/prod.php?which=52796

It works by compressing the executable as an image, which can be decompressed by DirectX. So your intro does not technically contain its own decompressor anymore. Compression is worse than Crinkler, but for very small projects this is compensated enough by the no-decompressor savings.

And for 64K there is kkrunchy, which dissassembles your code and re-packs it as separate streams of prefix bytes, opcodes and operands for improved compression rates... As you can see, the larger your intro, the more complex your techniques can be

Also useful (and fairly new) is the Shader minifier (formerly GLSL minifier but it does HSLS too now):
http://www.pouet.net/prod.php?which=55176
This rewrites your shader, renaming the variables and functions for improved compression. It already beats several hand-optimized party winners.

sqrt[-1]
Wednesday, February 16, 2011

That is cool - I am going to have a go and see how small I can make a WebGL equivalent.

Humus
Tuesday, February 15, 2011

Nuninho1980: At 1024 bytes you cannot afford the luxury of enabling vsync. Setting the resolution would be a higher priority, and I cut that out as well.

NitroGL: Nope, but I have only tested on Vista 64, so there's a chance it's broken on XP. Or the driver might have trouble compiling the shader to the NV30 hardware.

NitroGL
Tuesday, February 15, 2011

Any special OS requirements on these?
They just crash on my NV30 XP laptop (GL2).

Nuninho1980
Monday, February 14, 2011

Hi! I have GTX480 w/ 266.58whql. I got min 118fps-zoom inner and 260fps-zoom outter at 1600x1200-FULL.

you should enabled vsync and MUST change to 64Hz for get pure smooth because any other vertical frequency (most LCD's at 60Hz) may get lag/micro-stutter. therefore, not to have pure smooth.

More pages: 1 ... 11 ... 21 ... 31 ... 41 ... 51 ... 61 ... 71 ... 81 ... 91 ... 101 ... 111 112 113 114 115 116 117 118 119 120 121 122 ... 131 ... 141 ... 151 ... 161 ... 171 ... 181 ... 191 ... 201 ... 211 ... 221 ... 231 ... 241 ... 251 ... 261 ... 271 ... 281 ... 291 ... 301 ... 311 ... 321 ... 331 ... 341 ... 351 ... 361 ... 371 ... 381 ... 391 ... 401 ... 411 ... 421 ... 431 ... 438