[gles2] [MyGUI] [decal pass] [tex_address_mode wrap] SOLVED

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
Post Reply
nero81af
Gnoblar
Posts: 21
Joined: Wed Mar 12, 2014 10:07 am
x 2

[gles2] [MyGUI] [decal pass] [tex_address_mode wrap] SOLVED

Post by nero81af »

Dear ogre community,

I'm trying a multipass material with ambient, per_light and decal pass. The glsl version of the shaders are working perfectly. The mesh shaded is a simple plane with parallax map and two shadow maps (two spot lights). The plane is created with ogre and I'm tiling uv maps (16 repetitions in u and 16 in v). The problem is that the decal pass is ignoring the wrap directive on material. Also the normal map in the per_light pass is correctly wrapped. Is this a known bug?

thanks everyone for helping me out!!

p.s.
using a singlepass material and only one light / shadow map everything works perfectly. Also the normal map in the per_light pass is correctly wrapped.
Last edited by nero81af on Tue Dec 02, 2014 12:44 am, edited 1 time in total.
nero81af
Gnoblar
Posts: 21
Joined: Wed Mar 12, 2014 10:07 am
x 2

Re: [gles2] [decal pass] [tex_address_mode wrap] bug

Post by nero81af »

I've tried out many systems (iphone android) including emulators and all give me the same behaviour. I'm quite sure it's a bug of the gles2 render system. Where texture parameters are passed to the decal pass? can be the StateCacheManager causing this? is there a way to force tex_address_mode via code to the decal pass of a technique? is there some platform specific behaviour I should check out?
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4304
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 135
Contact:

Re: [gles2] [decal pass] [tex_address_mode wrap] bug

Post by spacegaier »

Can you please create a JIRA ticket for the bug complete with an easy example to reproduce (materials, shader, etc.). Thank you.
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
nero81af
Gnoblar
Posts: 21
Joined: Wed Mar 12, 2014 10:07 am
x 2

Re: [gles2] [decal pass] [tex_address_mode wrap] bug

Post by nero81af »

ok! I'll try to
nero81af
Gnoblar
Posts: 21
Joined: Wed Mar 12, 2014 10:07 am
x 2

Re: [gles2] [decal pass] [tex_address_mode wrap] bug

Post by nero81af »

I could not create a simple example without including the specific case of my project. Btw I found out where the problem is. It's the state cache. If I force texture addressing without using the cache the problem seems solved. I'll try to understand why that happens and eventually submit a patch
nero81af
Gnoblar
Posts: 21
Joined: Wed Mar 12, 2014 10:07 am
x 2

Re: [gles2] [decal pass] [tex_address_mode wrap] bug

Post by nero81af »

Finally I've found out. The problem is a mix of state cache and MyGUI. Actually MyGUI is doing something that messes up with last object rendered which has a decal pass. What is happening is that mygui is clamping a texture ogre is using. I could not found out exactly why but simply disabling all texture units (instead of all but the first) in the begin() method of MyGUI OgreRenderManager line 490. So commenting out

mRenderSystem->_disableTextureUnitsFrom(1);

and adding before initializing texture settings

mRenderSystem->_disableTextureUnitsFrom(0);

solved the problem, so no ogre bug! :D
Post Reply