Latest nightly broke sky & PSSM shadows

In latest nightly, commit number 7792 broke loading of sky.

Output of “TestSkyLoading.java” from JMETests:

[java]SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]

com.jme3.renderer.RendererException: compile error in:ShaderSource[name=Common/MatDefs/Misc/Sky.vert, defines, type=Vertex] error:0(23) : error C1008: undefined variable “g_WorldMatrix”

[/java]

What I found is that its called ViewMatrix not WorldMatrix.

Also, I think they removed so that you dont have to have g_ in front of everything now…

I got similar error for sky and also pssm shadow is broken too



Jul 1, 2011 3:22:23 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/Shadow/PostShadowPSSM.vert, defines, type=Vertex] error:0:17(20): error: out' qualifier in declaration of projCoord0’ only valid for function parameters in (null).

0:18(20): error: out' qualifier in declaration of projCoord1’ only valid for function parameters in (null).

0:19(20): error: out' qualifier in declaration of projCoord2’ only valid for function parameters in (null).

0:20(20): error: out' qualifier in declaration of projCoord3’ only valid for function parameters in (null).

0:22(25): error: out' qualifier in declaration of shadowPosition’ only valid for function parameters in (null).

0:24(19): error: in' qualifier in declaration of inPosition’ only valid for function parameters in (null).

Is adding

uniform mat4 g_WorldMatrix;

on top of Sky.vert solving the problem?



Seems that patch was only half-applied.

I can’t comment on the TestSky, but sky loads perfectly in my game.

@abies Adding uniform mat4 g_WorldMatrix; to Sky.vert solves the problem.



I can confirm that PSSM shadows also doesn’t work. Log:



[java]

com.jme3.renderer.RendererException: compile error in:ShaderSource[name=Common/MatDefs/Shadow/PostShadowPSSM.vert, defines, type=Vertex] error:0(17) : error C5060: out can’t be used with non-varying projCoord0

0(18) : error C5060: out can’t be used with non-varying projCoord1

0(19) : error C5060: out can’t be used with non-varying projCoord2

0(20) : error C5060: out can’t be used with non-varying projCoord3

0(22) : error C5060: out can’t be used with non-varying shadowPosition

[/java]

Okay should be fixed now