[Solved] SSAO shaders compilation error since revision 9330

Hi!



This is my first post here, so please be nice if my remark is not appropriate or not well located (I hesitated with this commit’s topic in the dev forum…), because i’m not really used to jmonkey forums.

I’ve updated to the 2012-04-30 nightly build yesterday, and it seems that the 9330 commit leads to an error for me when compiling SSAO shaders: the alpha parameter in the normal.frag shader is not declared if you do not have DIFFUSEMAP_ALPHA defined and I use the Unshaded material sometimes with no diffuse map… Is it strange or did I misunderstand something ?



[java]

#ifdef DIFFUSEMAP_ALPHA

float alpha=texture2D(m_DiffuseMap,texCoord).a;

#endif

gl_FragColor = vec4(normal.xy* 0.5 + 0.5,-normal.z* 0.5 + 0.5, alpha);

[/java]



It would work if we had:

[java]

float alpha = 1.0;

#ifdef DIFFUSEMAP_ALPHA

alpha=texture2D(m_DiffuseMap,texCoord).a;

#endif

gl_FragColor = vec4(normal.xy* 0.5 + 0.5,-normal.z* 0.5 + 0.5, alpha);

[/java]



Thanks



Koris

2 Likes

I know it’s not quite the same description but could it be connected to:

http://hub.jmonkeyengine.org/groups/development-discussion-jme3/forum/topic/transparency-and-shadows-possible-breaking-change/

?

Yes, that’s the same commit, though not precisely the same topic. If I optain no answer here, i’ll try on the dev forum!

true!

that’s a bug, thanks for pointing it out!



it’s fixed in last svn

http://code.google.com/p/jmonkeyengine/source/detail?r=9341

1 Like

That is what i call reactivity! Thanks!