Repository navigation
en rendering cameras lights
中文 | English | Docs | Repository
Cameras decide what is seen; lights decide how it is lit. Both are components, adjustable in the editor and drivable from scripts.
Scripting surface of CameraComponent:
| Member | Notes |
|---|---|
GetFov() / SetFov(float)
|
Perspective field of view |
GetNear() / SetNear(float)
|
Near clip plane |
GetFar() / SetFar(float)
|
Far clip plane |
GetSize() / SetSize(float)
|
Orthographic size |
GetProjectionMode() / SetProjectionMode(...)
|
Projection mode |
GetClearColor() / SetClearColor(Vector3&)
|
Clear color |
Switching between perspective and orthographic keeps the same clipping and visibility logic; Size only applies in orthographic mode.
The Scene View uses its own editor camera and never reads a CameraComponent from the scene. Entering Play makes the Game View use the scene camera, so "the angle I set up in the editor" and "the runtime image" are two different things.
Scripting surface of LightComponent:
| Member | Notes |
|---|---|
GetLightType() / SetLightType(...)
|
Light type |
GetColor() / SetColor(Vector3&)
|
Color |
GetIntensity() / SetIntensity(float)
|
Intensity |
GetRange() / SetRange(float)
|
Influence range |
GetOuterCutoff() / SetOuterCutoff(float)
|
Outer cone angle |
Lights enter clustered lighting according to their type. Directional lights relate to the main light shadow, while point and spot lights use Range and OuterCutoff to bound their influence volume.
Rendering output falls into three categories:
| Output | Notes |
|---|---|
| Swapchain | The final image presented to the window |
| Offscreen scene target | The scene renders to a texture and then goes through an output batch |
| Editor view target | Separate targets for the Scene View and Game View |
The forward path renders to an offscreen scene target before going through a separate swapchain output batch. That gives readbacks, screenshots, and later passes a stable input instead of depending on the current swapchain image.
Swapchain image readback starts before Present, which avoids the synchronization hazard of reading the same image after it was presented.
The camera clear color provides the background when no skybox is present. With a skybox, the skybox pass writes the background and the clear color becomes a fallback.
The skybox is its own pass drawn before transparent objects, so transparency blends correctly over the background.
UICanvasComponent interacts with cameras through its render mode:
| Mode | Notes |
|---|---|
ScreenOverlay |
Drawn over the screen without scene depth |
ScreenCamera |
Bound to a specific camera and able to participate in depth testing |
World |
Rendered in world space, using either the direct or render-target path |
World-space path selection, depth test, and depth write are documented in UI Overview.
Debugging > Debug Draw overlays helper shapes for cameras and lights so you can check orientation, range, and cone angles. These drawings exist only in the editor viewport.
- Materials and ShaderLab gives meshes their look.
- Graphics Backends and Large-Scene Features covers how backend capability gates features.
Nullus Engine
中文
- 认识 Nullus
- 安装与快速入门
- 使用编辑器
- 场景与对象
- Prefab 工作流
- 资产与内容管线
- 渲染、材质与光照
- 大场景与资源管理
- 游戏逻辑与脚本
- 用户界面
- 动画与角色
- 物理与交互
- 音频、特效与媒体
- AI 与联网
- 平台、构建与发布
- 扩展与引擎架构
- 调试、性能与质量
- 参考手册
- 示例与发展路线
English
- Getting to Know Nullus
- Install and Quick Start
- Using the Editor
- Scenes and Objects
- Prefab Workflow
- Assets and Content Pipeline
- Rendering, Materials, and Lighting
- Large Scenes and Resource Management
- Gameplay and Scripting
- User Interface
- Animation and Characters
- Physics and Interaction
- Audio, Visual Effects, and Media
- AI and Networking
- Platforms, Builds, and Releases
- Extending the Engine
- Debugging, Performance, and Quality
- Reference
- Examples and Roadmap