Page 2 of 2
Posted: Tue Oct 14, 2008 6:01 pm
by jph_wacheski
again some sweet additions,. I am wondering how to access the new extra textures from the shader? the bitmap stack will be fun for more complex generated maps,. nice

Posted: Tue Oct 14, 2008 6:24 pm
by VilleK
jph_wacheski wrote:I am wondering how to access the new extra textures from the shader?
Hmm... looks like I may have forgotten a step here. I thought the textures were available in glsl by default, but apparently they need to be assigned to uniform variables.
http://nehe.gamedev.net/data/articles/a ... article=21
So ZGE needs to predefine names such as "sampler2D texture0" which then can be used in the shader code. I someone knows of another way then please let me know.
Posted: Tue Oct 14, 2008 6:32 pm
by VilleK
Kjell and Kattle, thanks for the files and detailed examples! I'll look into it.
Posted: Wed Oct 15, 2008 1:31 pm
by Kjell
Hej Ville,
Something appears to have broken the Expression property of the Repeat Component. It seems to always loop forever, no matter what expression you use. A bug-fix would be nice
Also, the Array-out-of-bounds checking seems to use the incorrect Dimensions. When for example using 3 dimension, the count of dimension one seems to be the limit for the third parameter. Plus, the limit is one integer too high .. I can write to index [0,0,3] of a Array with dimensions of 3,1,1.
K
Posted: Wed Oct 15, 2008 2:51 pm
by VilleK
I've updated the beta again today with some small bugfixes.
- Kattle: The crash with bitmap-stacking is now gone. Also fixed bug with ZoomRotate which gave different results runtime compared with designer.
- JPH: Use variables "tex1","tex2","tex3" to access textures from shaders. Check out example in ShaderDemo.
- Kjell: I've updated the mip-mapping code so it should give better results now.
Regarding your latest bugreport, Kjell: I just tried "return this.iteration<2;" and it works. Do you have a example when it fails?
Posted: Wed Oct 15, 2008 3:06 pm
by Kjell
Hej Ville,
You're right .. after restarting ZGE it worked again. I managed to reproduce the bug though. First enter a expression that makes use of a Array, for example "return Array[0,0,this.Iteration] != 0;" .. which doesn't work correctly when you haven't filled the Array properly, then when you change the expression to for example return "this.Iteration < 2;", it loops forever. Perhaps a Array should be filled with 0's upon creation automatically?
K
Posted: Mon Oct 20, 2008 2:35 pm
by VilleK
Updated again with bug-fixes:
- Time is reset with every preview-start in designer
- Arrays interval checking fixed (including bug with repeat-component)
- Arrays are initialized with zeros
- Shift-Delete no longer deletes the current treenode while typing in a expression
If no more serious bugs are discovered then I'll make this a proper release in a few days before working on more features.