use of org.rajawali3d.postprocessing.passes.ShadowPass in project Rajawali by Rajawali.
the class ShadowEffect method initialize.
@Override
public void initialize(Renderer renderer) {
mShadowRenderTarget = new RenderTarget("shadowRT" + hashCode(), mShadowMapSize, mShadowMapSize, 0, 0, false, false, GLES20.GL_TEXTURE_2D, Config.ARGB_8888, FilterType.LINEAR, WrapType.CLAMP);
renderer.addRenderTarget(mShadowRenderTarget);
ShadowPass pass1 = new ShadowPass(ShadowPassType.CREATE_SHADOW_MAP, mScene, mCamera, mLight, mShadowRenderTarget);
addPass(pass1);
ShadowPass pass2 = new ShadowPass(ShadowPassType.APPLY_SHADOW_MAP, mScene, mCamera, mLight, mShadowRenderTarget);
mShadowMapMaterial = pass1.getShadowMapMaterial();
mShadowMapMaterial.setShadowInfluence(mShadowInfluence);
pass2.setShadowMapMaterial(pass1.getShadowMapMaterial());
addPass(pass2);
}
Aggregations