Skip to content

Commit

Permalink
add camera_layer
Browse files Browse the repository at this point in the history
  • Loading branch information
robtfm committed Jan 24, 2025
1 parent d727a8b commit 494a63d
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 12 deletions.
30 changes: 30 additions & 0 deletions proto/decentraland/sdk/components/camera_layer.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
syntax = "proto3";

package decentraland.sdk.components;

import "decentraland/sdk/components/common/id.proto";
import "decentraland/common/colors.proto";

option (common.ecs_component_id) = 1210;

message PBCameraLayer {
// layer to which these settings apply. must be > 0
// Layer 0 is the default "real world" layer viewed by the player and cannot be modified.
uint32 layer = 1;

// should the sun light affect this layer? default false
optional bool directional_light = 2;

// should this layer show player avatars? default false
optional bool show_avatars = 3;

// should this layer show the sky? default false
optional bool show_skybox = 4;

// should this layer show distance fog? default false
optional bool show_fog = 5;

// ambient light overrides for this layer. default -> use same as main camera
optional decentraland.common.Color3 ambient_color_override = 6;
optional float ambient_brightness_override = 7;
}
3 changes: 0 additions & 3 deletions proto/decentraland/sdk/components/global_light.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,4 @@ message PBGlobalLight {
// ambient light intensity. the explorer default ambient brightness is multiplied by this non-physical quantity.
// default 1
optional float ambient_brightness = 3;

// camera layers to apply global light to. defaults to 0 only
repeated uint32 layers = 4;
}
10 changes: 1 addition & 9 deletions proto/decentraland/sdk/components/texture_camera.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,11 @@ message PBTextureCamera {
// defaults to 0
optional uint32 layer = 3;

// default false
optional bool disable_fog = 4;
// default false
optional bool disable_skybox = 5;
// default black
optional decentraland.common.Color4 clear_color = 6;
// default infinity
optional float far_plane = 7;

// ambient light overrides for this camera
optional decentraland.common.Color3 ambient_color_override = 11;
optional float ambient_brightness_override = 12;

oneof mode {
Perspective perspective = 8;
Orthographic orthographic = 9;
Expand All @@ -46,4 +38,4 @@ message Orthographic {
// vertical extent of the visible range in meters
// defaults to 4m
optional float vertical_range = 1;
}
}

0 comments on commit 494a63d

Please sign in to comment.