-
Notifications
You must be signed in to change notification settings - Fork 103
Description
For some reason, jMonkeyEngine SDK (alpha 3) locks up when scrolling through some of my shader files in the "Projects" window. I think it is getting hung up on determining which icon to display for them. Most shader files seem to display fine, with a green gear & blue palette(?) icon (or just a blank page). However, when I try to scroll really fast to files that seem to lock things up, they have a small white page with a red ? on it. The whole SDK locks up & becomes unresponsive. I need to force close the application. It always locks up on some specific files...
Can you check for a possible lockup situation when determining shader file icons...? Any other possible explanation?
Example SimpleLight.frag file that appears to start the lockup process in my project:
#define FRAGMENT_SHADER
#import "Common/ShaderLib/GLSLCompat.glsllib"
uniform sampler2D m_Texture;
uniform sampler2D m_NoiseTexture;
#ifdef HAS_COLOR
uniform vec4 m_Color;
#endif
uniform vec2 m_Alpha;
varying float zdist;
varying vec3 vNormal;
varying vec2 texCoord1;
void main(){
#ifdef HAS_TEXTURE
vec4 texcolor = texture2D(m_Texture, texCoord1);
#ifdef HAS_COLOR
texcolor *= m_Color;
#endif
#ifdef HAS_NOISETEXTURE
texcolor.rgb *= texture2D(m_NoiseTexture, texCoord1).rgb;
#endif
#else
vec4 texcolor = m_Color;
#endif
// basic light direction
gl_FragColor.rgb = texcolor.rgb * (vNormal.y * 0.5 + vNormal.x * 0.2 + 0.6);
#ifdef HAS_ALPHA
gl_FragColor.a = texcolor.a * m_Alpha.x;
#else
gl_FragColor.a = texcolor.a;
#endif
}