Skip to content

Commit

Permalink
Merge pull request #6155 from mgsx-dev/misc/shadowLightDeprecation
Browse files Browse the repository at this point in the history
remove Directional shadows deprecation
  • Loading branch information
mgsx-dev committed Sep 2, 2020
2 parents 0a88cce + e07d9f6 commit 2b58d87
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
4 changes: 2 additions & 2 deletions gdx/src/com/badlogic/gdx/graphics/g3d/Environment.java
Expand Up @@ -28,8 +28,8 @@
import com.badlogic.gdx.utils.GdxRuntimeException;

public class Environment extends Attributes {
/** @deprecated Experimental, likely to change, do not use! */
@Deprecated

/** Shadow map used to render shadows */
public ShadowMap shadowMap;

public Environment () {
Expand Down
Expand Up @@ -28,9 +28,7 @@
import com.badlogic.gdx.math.Vector3;
import com.badlogic.gdx.utils.Disposable;

/** @deprecated Experimental, likely to change, do not use!
* @author Xoppa */
@Deprecated
/** @author Xoppa */
public class DirectionalShadowLight extends DirectionalLight implements ShadowMap, Disposable {
protected FrameBuffer fbo;
protected Camera cam;
Expand All @@ -39,8 +37,6 @@ public class DirectionalShadowLight extends DirectionalLight implements ShadowMa
protected final Vector3 tmpV = new Vector3();
protected final TextureDescriptor textureDesc;

/** @deprecated Experimental, likely to change, do not use! */
@Deprecated
public DirectionalShadowLight (int shadowMapWidth, int shadowMapHeight, float shadowViewportWidth, float shadowViewportHeight,
float shadowNear, float shadowFar) {
fbo = new FrameBuffer(Format.RGBA8888, shadowMapWidth, shadowMapHeight, true);
Expand All @@ -59,10 +55,8 @@ public void update (final Camera camera) {
}

public void update (final Vector3 center, final Vector3 forward) {
// cam.position.set(10,10,10);
cam.position.set(direction).scl(-halfDepth).add(center);
cam.direction.set(direction).nor();
// cam.up.set(forward).nor();
cam.normalizeUp();
cam.update();
}
Expand Down

0 comments on commit 2b58d87

Please sign in to comment.