color = getColor(m_Texture, texCoord);
if ( (color.r+color.g+color.b)/3.0 < m_ExposureCutoff ) {
color = vec4(0.0);
}else{
color = pow(color,vec4(m_ExposurePow));
}
#endif
Jul 5, 2011 9:34:43 PM com.jme3.app.Application handleError
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
com.jme3.renderer.RendererException: compile error in:ShaderSource[name=Common/MatDefs/Post/bloomExtract15.frag, defines, type=Fragment] error:Fragment shader failed to compile with the following errors:
ERROR: 0:20: error(#155) Internal error wrong operand type built in unary operator function. Type: in sampler2DMS
ERROR: error(#273) 1 compilation errors. No code generated
I searched for a solution and i found "update your graphics driver - it is fixed already".
I updated my graphics driver (or more precisely the updater told me i am up-to-date already), but problem still remains.
I’m curious to see if you get this resolved. It looks like the error that one of my users gets since sometime around Alpha 4’s release but it worked before then.
I assume you are running the latest nightly build? Just checking.
vec4 textureFetch(in sampler2DMS tex,in vec2 texC, in int numSamples){
ivec2 iTexC = ivec2(texC * textureSize(tex));
vec4 color = vec4(0.0);
for (int i = 0; i < numSamples; i++){
color += texelFetch(tex, iTexC, i);
}
return color / numSamples;
}
Jul 6, 2011 12:46:27 AM com.jme3.app.Application handleError
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
com.jme3.renderer.RendererException: compile error in:ShaderSource[name=Common/MatDefs/Post/bloomExtract15.frag, defines, type=Fragment] error:Fragment shader failed to compile with the following errors:
ERROR: 0:20: error(#155) Internal error wrong operand type built in unary operator function. Type: in sampler2DMS
ERROR: error(#273) 1 compilation errors. No code generated
I have no idea. I’m also curious as to the solution because the error looked like black magic voodoo when I looked at the source last time. This may be something that @momoko_fan has to comment on.
I have one user who would really like it if this gets fixed but most can run just fine.
The part inside the “length > 3”-if merely gets the error message from the Shader (org.lwjgl.opengl.GL20).
This is actually LWJGL, which is another more basic OpenGL framework, but i guess you know that ;- )
But that means, that this error message is straight from the Shader / LWJGL:
Fragment shader failed to compile with the following errors:
ERROR: 0:20: error(#155) Internal error wrong operand type built in unary operator function. Type: in sampler2DMS
ERROR: error(#273) 1 compilation errors. No code generated
That part is easy to understand, it tells us which file it is.
That's all i got from looking at it.
The question remains: What does the error message mean, and how can we fix it?
Greetz Fino
p.s. when editing posts, it removes all empty lines. This is annoying. Can somebody fix that please?!
Basically, something with the type-definition of COLORTEXTURE in conjunction with the option/flag RESOLVE_MS in Common/ShaderLib/MultiSample.glsllib is wrong.
What the error message means (i think) is that a method is being called with a wrong type definition.
So my solution was to hard-wire the type of m_Texture to sampler2D and remove the import of MultiSample.glsllib by copying the relevant parts from there into the 2 affected files (that was “#extension GL_ARB_texture_multisample : enable” and inlining the function calls).
By doing so i REMOVED the RESOLVE_MS option. I have no clue what that is or what it does.
I leave the rest to you guys! For me it works now! It actually works! Like the glow effect … IT WORKS!!!
To confirm, I boot up GPU Shader Analyzer from AMD, select driver version 10.3, compile that shader and get the error you get. Then I switch to version 10.4 and the shader compiles successfully.