Monkey 2 » All Posts http://monkeycoder.co.nz/forums/forum/monkey-2-code-library/feed/ Fri, 19 Apr 2019 09:43:03 +0000 http://bbpress.org/?v=2.5.14-6684 en-US http://monkeycoder.co.nz/forums/topic/simple-image-shader-glsl/#post-16062 <![CDATA[Reply To: Simple image shader (GLSL)]]> http://monkeycoder.co.nz/forums/topic/simple-image-shader-glsl/#post-16062 Sun, 10 Feb 2019 23:10:16 +0000 DruggedBunny I’ve just updated this with some cool palette-selection/dither code to loosely represent a few different ‘retro’ systems…

Try it out at:

http://www.hi-toro.com/monkey2/retro_island/retro_island.html

Code at:

https://github.com/DruggedBunny/Retro-Island

Notes:

Hit R for retro mode: expect MASSIVE pause here on web, maybe 20-30 seconds or more! Need to somehow get this done during startup…

Hit [ and ] to cycle through a few cool ‘retro’ modes.

Hit H to hide text in retro mode.

Tested in Firefox, Chrome and Vivaldi on Windows 7 64-bit only. Download code from GitHub and build natively if it fails for you!

 

]]>
http://monkeycoder.co.nz/forums/topic/polygonal-decomposition-concavity-support/#post-16007 <![CDATA[Reply To: Polygonal Decomposition – Concavity Support]]> http://monkeycoder.co.nz/forums/topic/polygonal-decomposition-concavity-support/#post-16007 Sat, 26 Jan 2019 18:59:11 +0000 abakobo I have finnnallly finished the complex polygon (positive)partitionning. I had made a lot of mistakes and the problem was a bit difficult. But it’s there. It just won’t allow collinear&intersecting segment at the “edge” of the poly.
If anybody wants to try it, the code is attached. Run polytoolstest.monkey2 for demo. It is not decomposing to convex polys yet.

]]>
http://monkeycoder.co.nz/forums/topic/simple-image-shader-glsl/#post-16003 <![CDATA[Reply To: Simple image shader (GLSL)]]> http://monkeycoder.co.nz/forums/topic/simple-image-shader-glsl/#post-16003 Fri, 25 Jan 2019 08:27:27 +0000 DruggedBunny It’ll be the shaders needing tweaked, probably… I’m only testing on Firefox just for throwing up quick demos, but my own interest is desktop. As I mentioned, shaders and web browsers seem to be a minefield of misery.

I don’t think they do Safari for Windows these days, so…

]]>
http://monkeycoder.co.nz/forums/topic/simple-image-shader-glsl/#post-16002 <![CDATA[Reply To: Simple image shader (GLSL)]]> http://monkeycoder.co.nz/forums/topic/simple-image-shader-glsl/#post-16002 Fri, 25 Jan 2019 07:08:18 +0000 AdamStrange On safari, both don’t work

]]>
http://monkeycoder.co.nz/forums/topic/simple-image-shader-glsl/#post-16001 <![CDATA[Reply To: Simple image shader (GLSL)]]> http://monkeycoder.co.nz/forums/topic/simple-image-shader-glsl/#post-16001 Fri, 25 Jan 2019 05:43:17 +0000 DruggedBunny Crude C64 resolution/palette shader. (No attribute clash implemented or planned!)

C64 Island [WebGL, Firefox-tested only!]

Will update GitHub probably tomorrow night (GMT) or over the weekend, once I’ve tweaked it more and implemented switching between Speccy and C64 modes…

Next up will have to be simple Amiga 32 and 256-colour modes, maybe 320 x 200 and/or 640 x 512, and SNES?

]]>
http://monkeycoder.co.nz/forums/topic/simple-image-shader-glsl/#post-15961 <![CDATA[Reply To: Simple image shader (GLSL)]]> http://monkeycoder.co.nz/forums/topic/simple-image-shader-glsl/#post-15961 Sat, 19 Jan 2019 16:52:00 +0000 DruggedBunny Updated and placed code on GitHub.

WebGL version [Only testing on Firefox!]

]]>
http://monkeycoder.co.nz/forums/topic/polygonal-decomposition-concavity-support/#post-15950 <![CDATA[Reply To: Polygonal Decomposition – Concavity Support]]> http://monkeycoder.co.nz/forums/topic/polygonal-decomposition-concavity-support/#post-15950 Fri, 18 Jan 2019 08:41:41 +0000 Abe _King_ @abakobo –removed wrong reply— No shaders involved there! All primitive work, with special thanks to Ethernauts for his help 🙂

]]>
http://monkeycoder.co.nz/forums/topic/polygonal-decomposition-concavity-support/#post-15949 <![CDATA[Reply To: Polygonal Decomposition – Concavity Support]]> http://monkeycoder.co.nz/forums/topic/polygonal-decomposition-concavity-support/#post-15949 Fri, 18 Jan 2019 07:03:25 +0000 abakobo Ah Ok shader stufff!?

Yes splitting a convex to convex is pretty straightforward… thx again.

]]>
http://monkeycoder.co.nz/forums/topic/simple-image-shader-glsl/#post-15948 <![CDATA[Reply To: Simple image shader (GLSL)]]> http://monkeycoder.co.nz/forums/topic/simple-image-shader-glsl/#post-15948 Fri, 18 Jan 2019 03:48:51 +0000 DruggedBunny Also quite cool back in 256 x 192 but with colour clash turned off. (Separate link; again recommend full-screening it. Key L is still available to toggle low-res mode off.)

]]>
http://monkeycoder.co.nz/forums/topic/simple-image-shader-glsl/#post-15947 <![CDATA[Reply To: Simple image shader (GLSL)]]> http://monkeycoder.co.nz/forums/topic/simple-image-shader-glsl/#post-15947 Fri, 18 Jan 2019 03:39:29 +0000 DruggedBunny Well, 256 x 192 is rather a “challenging” candidate for turning a low-contrast, fairly washed-out, realtime rendered scene into 8 Spectrum colours (each with associated ‘dark’ version) with correct colour-clash, and without sampling every 8×8 block of pixels (a MASSIVE framerate hit since GLSL isn’t meant to read anything other than the ‘current’ pixel), it wasn’t feasible to select a suitable foreground and background colour that avoided constant flickering between the two as the scene changed, so I’ve amended the Spectrum’s display size.

Here’s how the scene would be rendered if the Spectrum’s display size was 1024 x 768 instead of 256 x 192, but still with correct colours and clash.

Full-screen it. (Only testing web version in Firefox, apologies.)

I’ll upload my code once I’m done messing about…

]]>