@jmaasing said:
I gave it a spin but on my Linux + GeForce GT520 I get
I'm totally lost when it comes to shaders so I don't even know how to start fixing this :)
Try setting language to GLSL120 in the Material Definition files. If this is the problem, I'll update the posted code.
It looks like this in the mat defs:
[java]Technique {
VertexShader GLSL100: Shaders/BasicShadowPost.vert
FragmentShader GLSL100: Shaders/BasicShadowPost.frag[/java]
Switch it to:
[java]Technique {
VertexShader GLSL120: Shaders/BasicShadowPost.vert
FragmentShader GLSL120: Shaders/BasicShadowPost.frag[/java]
Yeah, without knowing I guess it might be something like that so I already tried like you said. This is the result:
GLSL110
com.jme3.renderer.RendererException: Shader link failure, shader:Shader[numSources=2, numUniforms=2, shaderSources=[ShaderSource[name=Shaders/BasicShadowPre.vert, defines, type=Vertex, language=GLSL110], ShaderSource[name=Shaders/BasicShadowPre.frag, defines, type=Fragment, language=GLSL110]]] info:Vertex info
0(7) : error C5052: gl_FragColor is not accessible in this profile
GLSL120
com.jme3.renderer.RendererException: Shader link failure, shader:Shader[numSources=2, numUniforms=2, shaderSources=[ShaderSource[name=Shaders/BasicShadowPre.vert, defines, type=Vertex, language=GLSL120], ShaderSource[name=Shaders/BasicShadowPre.frag, defines, type=Fragment, language=GLSL120]]] info:Vertex info
0(7) : error C5052: gl_FragColor is not accessible in this profile
GLSL140
com.jme3.renderer.RendererException: Shader link failure, shader:Shader[numSources=2, numUniforms=2, shaderSources=[ShaderSource[name=Shaders/BasicShadowPre.vert, defines, type=Vertex, language=GLSL140], ShaderSource[name=Shaders/BasicShadowPre.frag, defines, type=Fragment, language=GLSL140]]] info:Vertex info
0(2) : warning C7555: 'varying' is deprecated, use 'in/out' instead
0(7) : warning C7533: global variable gl_FragColor is deprecated after version 120
0(7) : error C5052: gl_FragColor is not accessible in this profile
On a related note, at one time I forgot to remove the pssm processor like this:
[java] ...setting up pssm
viewPort.addProcessor(pssmShadowRenderer);
@t0neg0d said: @jmaasing
Sorry... got tied up with work. Here is the reason. In the mat def for BasicShadowPre.j3md, remove
[java]RenderState {
FaceCull Front
DepthTest On
DepthWrite On
PolyOffset 0 0
ColorWrite Off <<< THIS!!!
}[/java]
No that's not it (at least not the main problem), the solution was that it really helps if you put the fragment shader in the .frag file and the vertex shader in the .vert file :) Sorry to bother you with my stupidity
@jmaasing said:
No that's not it (at least not the main problem), the solution was that it really helps if you put the fragment shader in the .frag file and the vertex shader in the .vert file :) Sorry to bother you with my stupidity
@t0neg0d said: @jmaasing
Sorry... got tied up with work. Here is the reason. In the mat def for BasicShadowPre.j3md, remove
[java]RenderState {
FaceCull Front
DepthTest On
DepthWrite On
PolyOffset 0 0
ColorWrite Off <<< THIS!!!
}[/java]
uh....don't do this really...
This is to avoid to completely render the objects and just render depth (needed for the shadow maps).
Removing this line just make it slower and you have a complete render wasted....