Forums > Jitter

Help creating poltocar shader in jit.gl.pix

December 1, 2011 | 11:35 pm

Thanks to Wesley’s advice around shaders, I’ve dived head first into Gen. I’m trying to create a poltocar shader in jit.gl.pix… but I’m not a shader geometry guru (yet ;). After unsuccessful attempts hacking examples/jitter-examples/gen/jit.gl.pix.cartopol.maxpat, I tried to simplify using cartopol and poltocar objects. I get displacement, but not classic cartopol or poltocar. I’d greatly appreciate any help achieving poltocar in jit.gl.pix.

Work in progress copied below.

Thanks!

– Pasted Max Patch, click to expand. –

December 1, 2011 | 11:59 pm

I think it’s because you’re using [norm] instead of [snorm]. norm ranges from [0, 1]. snorm ranges from [-1, 1].

– Pasted Max Patch, click to expand. –

December 2, 2011 | 1:49 am

Thanks for the reply, Wes! Unfortunately, while changing from [norm] to [snorm] creates a cool effect, it still looks very dissimilar to the same effects in Photoshop (which I’m assuming to be a valid benchmark). Since you added chilis.jpg to the file, I’ve attached screen grabs of chilis.jpg processed with cartopol in both Photoshop and Gen. I’ve also done the same for poltocar.

Note also that the results of the simple cartopol object alone are significantly different from those achieved with the jit.gl.pix.cartopol.maxpat example patch provided with Max 6. (I didn’t grab an image of that, but I can if helpful.

Thanks again!

Attachments:
  1. cartopolimages.zip

December 2, 2011 | 4:00 am

For this cartopol and poltocar stuff, photoshop has designed a filter with similar names that happen to use those functions and also do some shifting, scaling, and swizzling of coordinates. cartopol and poltocar are your standard polar rect functions in the gen world

– Pasted Max Patch, click to expand. –
– Pasted Max Patch, click to expand. –

Enjoy!


December 2, 2011 | 4:44 pm

Thanks, Wes! You rock! ;)


Viewing 5 posts - 1 through 5 (of 5 total)