summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-01-27 02:24:16 +0500
committerilotterytea <iltsu@alright.party>2025-01-27 02:24:16 +0500
commitb3e4b13a4dea6a0d076384a7587850fa621c8d3c (patch)
tree64239224d0b0baa04b44c8b5ca298e080076e10e
parent94b835e0589bc91f47014234bfdc42aa8edde048 (diff)
upd: lights
-rw-r--r--core/src/main/java/kz/ilotterytea/frogartha/screens/GameScreen.java23
1 files changed, 15 insertions, 8 deletions
diff --git a/core/src/main/java/kz/ilotterytea/frogartha/screens/GameScreen.java b/core/src/main/java/kz/ilotterytea/frogartha/screens/GameScreen.java
index 801f8dd..12f54bb 100644
--- a/core/src/main/java/kz/ilotterytea/frogartha/screens/GameScreen.java
+++ b/core/src/main/java/kz/ilotterytea/frogartha/screens/GameScreen.java
@@ -95,6 +95,8 @@ public class GameScreen implements Screen {
stage.act(delta);
stage.draw();
+ System.out.println(playerEntity.getPosition());
+
if (game.getSessionClient().hasThrown()) {
game.setScreen(new KickScreen());
}
@@ -142,18 +144,23 @@ public class GameScreen implements Screen {
sceneManager.setCamera(camera);
DirectionalShadowLight light = new DirectionalShadowLight(1024, 1024, 60f, 60f, 1f, 300f);
- light.set(new Color(0xdcccffff), -1f, -0.8f, -0.2f);
- light.intensity = 5f;
+ light.set(new Color(0x101010ff), -1f, -0.8f, -0.2f);
+ light.intensity = 0.1f;
sceneManager.environment.add(light);
sceneManager.environment.shadowMap = light;
- PointLightEx signLight = new PointLightEx();
- signLight.set(Color.PINK, new Vector3(2f, 6f, 2f), 80f, 100f);
+ float range = 1000f, intensity = 500f, y = 20f;
+
+ PointLightEx light1 = new PointLightEx();
+ light1.set(Color.YELLOW, new Vector3(-18f, y, -18f), intensity, range);
+
+ PointLightEx light2 = new PointLightEx();
+ light2.set(Color.YELLOW, new Vector3(5f, y, 28f), intensity, range);
- PointLightEx windowLight = new PointLightEx();
- windowLight.set(Color.BLUE, new Vector3(-1.1f, 7.3f, 0.5f), 80f, 100f);
+ PointLightEx light3 = new PointLightEx();
+ light3.set(Color.YELLOW, new Vector3(60f, y, 0f), intensity, range);
- sceneManager.environment.add(windowLight, signLight);
+ sceneManager.environment.add(light1, light2, light3);
// setup quick IBL (image based lighting)
IBLBuilder iblBuilder = IBLBuilder.createOutdoor(light);
@@ -166,7 +173,7 @@ public class GameScreen implements Screen {
Texture brdfLUT = new Texture(Gdx.files.classpath("net/mgsx/gltf/shaders/brdfLUT.png"));
- sceneManager.setAmbientLight(1f);
+ sceneManager.setAmbientLight(0.1f);
sceneManager.environment.set(new PBRTextureAttribute(PBRTextureAttribute.BRDFLUTTexture, brdfLUT));
sceneManager.environment.set(PBRCubemapAttribute.createSpecularEnv(specularCubemap));
sceneManager.environment.set(PBRCubemapAttribute.createDiffuseEnv(diffuseCubemap));