Learning Ogl And Shaders? This Can Be Of Use To You


paeryn said:
Ahh, I was using -other_up and -invert_cull. Removing -invert_cull gives the proper scene.

And in-case you're wondering, the girl renders at 8-10 fps, the tie-fighter at 28-40 (it does fill the screen when at 28) these were done with -screen 800x420:16@60 which fills the screen apart from the taskbar and title bar.

You can commit the changes as you wish. The compiler settings you had should work with the other toolset that's around here somewhere (codesourcery based) but I use the Ångstrom gcc-4.3 one. But I think the CXX line needs adding as the only time $(CC) is being called is for the final linking.
Ah, that was a sneaky one. I was already considering an angry email to IMGTEC ; )

And you're very right i'd be interested in the fps. Which shader was that, btw - the default one (normal orientation visualizer)? Even so, fps is not bad for a 105K- and 28K-vertex heavy models, respectively (and drawn twice : ). May i ask you to run a few short tests on the phong shaders when you have the time? For the purpose build the app with -D__DONT_CLIP__ option and run the app with each of the two models. At runtime:

1. press [p] once for 1-light per-pixel phong
2. press [p] second time for 1-light per-pixel phong using a normalizer cubemap (that one is rather redundant, but it's there for legacy reasons)
3. press [p] third time for 3-light per-pixel phong

Again, many thanks for all the help!
 
Last edited by a moderator:
I didn't realise that 'p' cycled through options... When it got to the 3-light version I got the missing vec4v error (errornously reported as vec4). Removing the GLSL_QUIRK_ARRAY_PRINCIPLE_ELEMENT=1 fixes this.
Pressing 'k' gives similar error regarding missing mat4 parameter 'bone'.

Onto fps. min/max/avg for one complete revolution
Code:
   Mesh             basic        1-light      normalizer   3-light
darth_vader_tie     29/41/37     12/34/27     16/35/29     9/25/19
girl                8.7/8.9/8.8  8.3/8.6/8.5  7.1/8.0/7.9  4.6/7.2/5.5
 
thanks, Paeryn, useful results all around. re the missing bone parameter - looking at the first log that you posted from nths-jass, it appears the skeleton snapshot file is not loaded at all. could you try the latest version? i reshuffled some resources locations, and actually made the skinning shaders digestable to the 530 (original 32-bone array was using up the entire vertex shader uniforms space).
 
Sorry, I've found out why bone_array.bin wasn't being loaded - it hadn't copied to my SD card. It works now it's there.

I've added extra CFLAGS to use NEON, and removed the -I and -L options as they just point to the standard dirs. When I added them they pointed to different places (to where lib3ds was).

Code:
	CFLAGS += -DSUPPORT_X11 -mcpu=cortex-a8 -ftree-vectorize -mfloat-abi=softfp -mfpu=neon
	CLINKFLAGS += -lGLESv2 -lEGL -lIMGegl -lsrv_um -lX11 -lXdmcp -lXau

New fps timings, the previous ones were wrong (I'd typed -D__DONT_CLIP), I've added the skinning (phong, not morph-normal) fps too.
Code:
   Mesh             basic        1-light      normalizer   3-light      skinning(phong)
darth_vader_tie     24/30/27     12/22/17     14/24/20     6/12/9       9/14/12
girl                8.6/8.9/8.8  8.3/8.5/8.5  7.6/8.0/7.9  4.5/4.7/4.6  3.6/3.8/3.7
 
Hmm, interesting results there. It seems that using a normalize cubemap could be beneficial on some occasions after all.. I knew keeping it around would pay off eventually ; )

Paeryn, may I ask you to also try the Ahmed model? It's the only mesh that actually has skinning attributes, so the skinning shader could so something useful with it. Also, it's the only one that has complexity remotely suitable for real-time.

BTW, i think removing the secondary view would make more sense for these performance tests. For the purpose I've added another command-line parameter, -no_mini_view - just grab latest from the repo. You'll still need -D__DONT_CLIP__, though.

ps: Makefile was updated as per your latest post.
 
Not tried the updated version yet, but running the Ahmed model causes a lockup in libIMGegl when rotated about 90 degrees, trying to run the program again afterwards locks the whole system.
I'll look into it later (if wifi stays up long enough for a remote debugging session :angry: )
 
paeryn: consider using usbnet
darkblu: instead of merging close vertices you should degenerate and index all meshes to triangle-strips stored in IBOs and VBOs. That gave a massive speed-up in my projects.
Personally, I didn't benchmark the map-buffer extension - but that could also be faster.
 
paeryn said:
Not tried the updated version yet, but running the Ahmed model causes a lockup in libIMGegl when rotated about 90 degrees, trying to run the program again afterwards locks the whole system.
I'll look into it later (if wifi stays up long enough for a remote debugging session :angry: )
Was that with one of the skinning shaders? if so, and if at that moment you did not have the 27-bone version of the shader (versus 32-bone one), then I could imagine that silently blowing up the system (although, why not immediately, but after some time?). But otherwise Ahmed is not any heavier than any of the other meshes we've ran. It just has a few more vertex attributes, but still less than the 8 allowed.

JayFoxRox said:
darkblu: instead of merging close vertices you should degenerate and index all meshes to triangle-strips stored in IBOs and VBOs. That gave a massive speed-up in my projects.
Personally, I didn't benchmark the map-buffer extension - but that could also be faster.
The whole 3ds support is a bit iffy right now - very few attributes read, the whole O(N^2) topology optimisation is an overkill, etc. Generally, I do plan to move in the direction of tristrips (could indeed pay on SoC gpu's), but re mapped buffers - those should not make any difference in the case when the meshes are static (which is the case here).
 
Last edited by a moderator:
if wifi stays up long enough for a remote debugging session

Code:
ibi-pandora $ sudo iwconfig wlan0 power off

Works for me .. my development Pandora has had a solid connection for two days now ..
 
heya, just a heads-up that .3ds models reading now handles texcoord attributes, so you can load your textured 3ds models in ntsh-jass and throw at them some fancy GLSL shaders. while sitting on a park bench ; )

here's how Dragons_Slayer's great Scrooge McDuck model from the 256x256x256 thread would look on the pandora with vanilla Phong-Blinn lighting from 3 sources:
4896257383_9cdeca4c66_z_d.jpg

(image was not taken on pandora. used FSAA x4 is doable on the pandora, though)
 
Hi
First i'm a total noob in GL/GLES/Shaders and so on .
I have steup my toolchain based on Codesourcery lite 2009q3 and Codeblocks under Windows.
To test my toolchain i have taken your GLES X11 example (the latest with the improvements with Paeryn ) and have made a project .
Since don't have my Pandora :unsure: i have compiled the example and opened a thread on this forum to test (on a real Pandora )if the app works ok.
See at http://www.gp32x.de/board/index.php?/topic/56453-little-gles-pandora-test/page__gopid__914892&#entry914892
Gruso kindly try to run it but the program seems have problem to load the *.glslv and *.glslf files.

So if someone more smart (than me ) would give it a try and understand how this not work properly i will be gratefull.

Sorry for the offtopic.

Farox
 
Last edited by a moderator:
Back
Top