@Capehill Suffix sounds easer way imho ? just something like .snd and all good. Interesting how it done on original ShaderToy...
Btw, do you know how easy replace iChannel with something NULL, so shaders which use iChannel can be tested also without (i just collecting bug reports and trying to test as much as possible).
Nice shader! Seems to trigger crash in glCompileShader and then somewhere in Nova. Maybe that's the same crash as reported earlier?
If you have something like "uniform sampler2D iChannel0" but you don't bind the texture (glBindTexture) and texture unit (glUniform1i(samplerLocation, x)), it should display white colour when sampled.
@Capehill I just go more easy way, just doing this:
float t;
instead of original's:
float t = texture(iChannel0,ditheruv/256.0,-100.0).x*spread/float(iterations);
And it still crashes. And crashes similar to your crashreport before, meaning that it probably share the roots. The same r9,0(r3), and r3 about the same as in your crash report.
Updated your BZ with new info. Need to find what is common in them, or maybe just stripping out one or another till small possible chunk which trigger crash.
EDIT:
Debugged a bit your crash-example, and find out that it crashes because of calling "temp -= bitz[7-inc];" in 4 places. For sake of test just comment out lines : 74,109,143 and 177. Then shader didn't crash (didn't produce anything good either, but didn't crash).
I also checked my one when it crash and it crashes when call "c += trace(P,V,H, t);" (where trace some big function too).
Currently all i can see, its -= and += things , and that both call external functions , so maybe it somehow related to the same "noise" issue , just this time happens to crash instead of visuall glitches ? Also in both cases it happens inside of for (int x = 0; x < y; x ++)
Edited by kas1e on 2020/5/7 20:48:40 Edited by kas1e on 2020/5/7 20:50:05 Edited by kas1e on 2020/5/7 20:56:02
Just uploaded version 1.1 with basic iChannel support. Changes:
1.1 - Add iChannel0...3 texture support. Each channel must be loaded manually at the moment. - Add iChannelResolution0...3 support. - Add stack cookie and log stack usage at the exit. - Display a message box in case shader or texture loading fails, instead of exiting.
1.0 - First version
Also added some of those Shadertoy shaders you found.
@Capehill Oh cool ! Want to check now some simple shaders with textures, so should i do something-somewhere to load texture ? Modify original shaders ?
EDIT: ah i see, its manually from the menu, time to test!
No need to modify anything but unfortunately you need to load iChannels using RMB menu. I plan to improve the user interface later. There is a "textures" directory, too. There is also a shader called ichannel_test.frag.
@Capehill Yeah, sorted it out, and already found shadertoy's shaders which works with textures!
But seems also found a bug with loading of ichannel : visually, there is diagonal line from X0,Y0, to X1,Y1. Like screen is split on 2 triangles. You can see it even by your testcase shader, by just loading ichannel1 , that line visibly even with abstract1.jpg texture.
Doh. iChannelResolution seems to be an array of vec3 instead of 4 separate vec3 uniforms. I need to fix that. Do you have some example shader which is using it?
Quote:
bug with loading of ichannel : visually, there is diagonal line
Diagonal line seems to appear when texture filtering is set to GL_LINEAR_MIPMAP_LINEAR. I have changed this to GL_LINEAR now as a workaround.
Version 1.2 is available now:
- Fix: iChannelResolution is an array of vec3s. - Workaround: use GL_LINEAR texture filtering to avoid diagonal line where triangles meet.
Edited by Capehill on 2020/5/10 11:36:12 Edited by Capehill on 2020/5/10 17:23:11
Doh. iChannelResolution seems to be an array of vec3 instead of 4 separate vec3 uniforms. I need to fix that. Do you have some example shader which is using it?
Yeah, for example that one wasn't working in v1.1 , but works now in 1.2 :
Diagonal line seems to appear when texture filtering is set to GL_LINEAR_MIPMAP_LINEAR. I have changed this to GL_LINEAR now as a workaround.
Yeah, works in 1.2 ! Is it w3dnova or ogles2 bug ? (so just we can report it while it find).
There is also some list of report/suggestions (if you want them of course :) ) :
1). tooltype to enable/disable VSYNC by default
2). VSYNC seems to be sometime 30 fps ? Should be 60 all the time ? For example sometime i got 30 fps with vsync,then disable vsync and have 100-200, which mean it can be 60.
3). Currently, to make iChannel works, firstly we need to load shader and only then iChannel. If load iChannel first and then shaders, then iChannel didn't take in account. Possible to made it also works when load textures, and then shader too after ?
4). If it easy to implement, then good to have iDate support (not many, but some shaders use it), example:
The archive contains two folders "working" and "glitch". The fragment shaders in glitch usualy comment whats wrong in the filename after the _ (underline).
Check "more colorful than average.frag" and "klk's Simple Plasma.frag" inside the archive if you like colors :)
If it helps improving the shader compiler / graphics driver i can also upload an archive with the shaders having compilation problems and the shaders showing heavy rendering glitches.
@IamSONIC I also made some big base of shaders working/non-working (and non working ones split on errors, etc). So better for Hans will be if we will merge it all, and made proper bug report for single issue.
For example, there lots of : need xxx SGPRS, which exceeds the maximum of 102 and need xxx VGPRs, which exceeds the maximum of 256, which can be just one single bug report called "increase number of potencially used SGRPS and VGPRs and put there just a list of shaders which is want it.
Another bug report its bunch of shaders which didn't compiles, because of one error , so one bug report. Another one another.
There also shaders which share the same root : produsing some bloky noise. Those ones also for one single bug report.
Some shaders cause crashes (those ones already reported in one single report, there a very little crashed ones, 2 or 3).
Some shaders produce wrong colors , those ones also for single bug report should come if errors the same.
In other words, if you doesn't mind , i can grab your archive, combine and sort it with my one, and create proper bug reports.
I think at least we can pinpoint something from it and made live of Hans easy to cleary point out what wrong. My idea is to just grab the small-noise-bad one, and try to rewrite it bit by bit, to see when bug is gone. Then it will be easy to report roots, and easy to Hans or Daniel to fix.
@Capehill And another moment : seems with 1.2 something start to be wrong (or, i just lucky only now), as i find some issues cause crash/freeze. First time i noticed when just unpack 1.2 , and tried to run some shader : freeze. Ok, can be anything, reboot. Then, after 2 failed shader (can't compile) cpu go to 100%, and close gadget didn't works. Ok, reboot. Then for a while everything correct and works. Now, i got a crash when on working shader with textures tried to press close gadget, and shader joy crashed , ignore DSI cause freeze. Sadly didn't save crashlog. With 1.1 never had that. But maybe pure luck, if nothing were changed except things you wrote in history.
@IamSONIC Got both archives, sorting them out :) Thanks!
It would be cool if you share the shaders as an archive. It's arduous to get them via the shadertoys urls on OS4. Or do you have some "shortcut" to grab them on OS4 directly?
@IamSONIC I just grab then on PC by selecting code, and PC connected via Zita-ftpd with amiga, and so i come to shaders directory via totalcommander on PC, then shift+f4 for create new file via notepad++ , put it there, save, and its already on os4 side in right place. But surely can pack them all and upload