|
|
|
@ -68,6 +68,7 @@ public class BasicShadowRenderer implements SceneProcessor { |
|
|
|
|
private boolean noOccluders = false; |
|
|
|
|
private Vector3f[] points = new Vector3f[8]; |
|
|
|
|
private Vector3f direction = new Vector3f(); |
|
|
|
|
protected Texture2D dummyTex; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Creates a BasicShadowRenderer |
|
|
|
@ -80,6 +81,10 @@ public class BasicShadowRenderer implements SceneProcessor { |
|
|
|
|
shadowFB.setDepthTexture(shadowMap); |
|
|
|
|
shadowCam = new Camera(size, size); |
|
|
|
|
|
|
|
|
|
//DO NOT COMMENT THIS (it prevent the OSX incomplete read buffer crash)
|
|
|
|
|
dummyTex = new Texture2D(size, size, Format.RGBA8); |
|
|
|
|
shadowFB.setColorTexture(dummyTex); |
|
|
|
|
|
|
|
|
|
preshadowMat = new Material(manager, "Common/MatDefs/Shadow/PreShadow.j3md"); |
|
|
|
|
postshadowMat = new Material(manager, "Common/MatDefs/Shadow/BasicPostShadow.j3md"); |
|
|
|
|
postshadowMat.setTexture("ShadowMap", shadowMap); |
|
|
|
|