Skip to content

Commit 49aaa95

Browse files
mvaligurskyMartin Valigursky
andauthored
Small tweaks to anisotropy examples (#7700)
Co-authored-by: Martin Valigursky <[email protected]>
1 parent 1dc890c commit 49aaa95

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

examples/src/examples/materials/anisotropy-lamp.example.mjs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ assetListLoader.load(() => {
6060
// Setup skydome
6161
app.scene.envAtlas = assets.helipad.resource;
6262
app.scene.skyboxRotation = new pc.Quat().setFromEulerAngles(0, 70, 0);
63-
app.scene.skyboxIntensity = 1.5;
63+
app.scene.skyboxIntensity = 0.5;
6464

6565
const leftEntity = assets.model.resource.instantiateRenderEntity();
6666
leftEntity.setLocalEulerAngles(0, 0, 0);
@@ -85,16 +85,6 @@ assetListLoader.load(() => {
8585
camera.script.orbitCamera.yaw = 90;
8686
camera.script.orbitCamera.distance = 0.3;
8787
camera.camera.requestSceneColorMap(true);
88-
89-
const directionalLight = new pc.Entity();
90-
directionalLight.addComponent('light', {
91-
type: 'directional',
92-
color: pc.Color.YELLOW,
93-
castShadows: false,
94-
intensity: 1
95-
});
96-
directionalLight.setEulerAngles(45, 180, 0);
97-
app.root.addChild(directionalLight);
9888
});
9989

10090
export { app };

examples/src/examples/materials/anisotropy-strength.example.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ assetListLoader.load(() => {
6060
// Setup skydome
6161
app.scene.envAtlas = assets.helipad.resource;
6262
app.scene.skyboxRotation = new pc.Quat().setFromEulerAngles(0, 70, 0);
63-
app.scene.skyboxIntensity = 1.5;
63+
app.scene.skyboxIntensity = 0.5;
6464

6565
const leftEntity = assets.model.resource.instantiateRenderEntity();
6666
leftEntity.setLocalEulerAngles(40, 90, 0);

examples/src/examples/materials/material-anisotropic.example.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ assetListLoader.load(() => {
8787
material.metalness = 1.0;
8888
material.gloss = z / (NUM_SPHERES_Z - 1);
8989
material.useMetalness = true;
90-
material.anisotropy = ((2 * x) / (NUM_SPHERES_X - 1) - 1.0) * -1.0;
90+
material.anisotropyIntensity = x / (NUM_SPHERES_X - 1);
91+
9192
material.enableGGXSpecular = true;
9293
material.update();
9394

0 commit comments

Comments
 (0)