This is the fragment shader, it uses a default vertex shader. Use the camera as the texture, it’s quite odd. It switches parts of the image to negative, the rest is normal
@Monkeyman32123 - you define variables collor and joeeb, but you don’t give them any values before using them in a formula. That’s probably why you get strange results.
If you want to insert values for them from Codea, then you need to define them before the main function like this (and assign them values in your Codea code)
Oh, I’m sorry, I think my intentions were misunderstood. I was trying to make a different effect but this is what came out; I know why, I just liked the effect but thank you very much for the help! (The effect I was trying to make is that fun glitchy thing that happens when you wiggle an NES cartridge or, as a better [more modern] example: the faux glitchiness at the beginning of the game FEZ by the immaculate Phil Phish).
As a side note, however, this fragment shader I made does not work (at all) and yet all it does is some computation then leave the pixel unchanged.
And it still wouldn’t update in the lab (perhaps a shader lab glitch). But really I don’t see the issue with any of the other lines as they didn’t affect the ones above, and there were no other state settings of gl_FragColor. It just seemed to not like the code, I guess. The code is supposed to be a porting of a stereoscopic 3D image generator from a different shading language, but the port didn’t work, then I found that even the normal parts didn’t work.
That code looks ok, but it is possible there is a hidden unprintable character that came along for the ride. To check this, copy the code into a plain text editor, and then copy it back out and paste back into Codea.
Alternately, I would do it the other way round and start with the standard fragment shader code, and add lines from your image generator, just a couple at a time
I’ve left the bindings as “Cargo Bot: Codea Icon”. I erased everything in the white space and redid the tabs and spaces. I pasted the fragment into a new blank shader (to be sure the vertex was unaffected, and still nothing. I cannot figure it out for the life of me.
Weird. But after realizing I had problems in other apps as well, I restarted my iPad entirely and it suddenly worked. Well, I say worked but that’s a lie, it was horribly dysfunctional. So then I decided to try porting one that was in a more similar shader language, and the effect came out being much closer to working, but not producing the second part of the image that turns it 3D when viewed correctly. That version is here (I’m not asking for help, but figured id post it for if anyone else is interested, as I would really like to get it working).