着色器与光照
基本信息
| 属性 | 值 |
|---|---|
| 着色器清单 | src/main/resources/shaders.txt(183 行,23 项) |
| 光照清单 | src/main/resources/lightings.txt(83 行,14 项) |
| 用户扩展 | custom-shaders.txt(3 行)、custom-lightings.txt(2 行),仓库内均仅注释 |
| 抽象基类 | org.dynmap.hdmap.HDShader / org.dynmap.hdmap.HDLighting |
着色器
23 项按实现类分布(shaders.txt 中 class: 字段去重计数):
| 实现类 | 项数 |
|---|---|
org.dynmap.hdmap.DefaultHDShader |
9 |
org.dynmap.hdmap.TopoHDShader |
5 |
org.dynmap.hdmap.TexturePackHDShader |
4 |
org.dynmap.hdmap.CaveHDShader |
3 |
org.dynmap.hdmap.InhabitedHDShader |
1 |
org.dynmap.hdmap.TexturePackHDCaveShader |
1 |
全部 23 个 id:
default、defaultscheme、ovocean、flames、sk89q、amidst、biome、temperature、rainfall、no_transparency、cave、lit-cave、cave-noplants、stdtexture、stdtexture-cave、stdtexture-nobiome、stdtexture-mcr-grid、topo、topo256、topo-noplants、topo256-noplants、TerraNetworkOrgTopo、inhabited
其中 amidst 是对第三方地图 mod Amidst 的兼容着色器,sk89q 对应 Super KyCraft,TerraNetworkOrgTopo 是上游 Dynmap 自带的社区着色器。
光照
14 项只有 2 个实现类:
| 实现类 | 项数 |
|---|---|
org.dynmap.hdmap.ShadowHDLighting |
13 |
org.dynmap.hdmap.DefaultHDLighting |
1 |
全部 14 个 id:
default、shadows、night、brightnight、nightandday、brightnightandday、nethershadows、shadows-smooth、night-smooth、brightnight-smooth、nightandday-smooth、brightnightandday-smooth、shadows-classic、nethershadows-classic
lightings.txt:5 注释标明 default 为 “Default lighting - no effects, shadows, day/night”。
交互
| 触发 | 行为 |
|---|---|
| 地图渲染 | 模板的 shader: / lighting: 指定 id |
shader 缺失或非法 |
回退 shaders.txt 中 default(其注释 “Default shader - used if shader not specified or invalid”) |
/dmap shaderlist / lightinglist |
列出可用项(两者均未登记进帮助表,见 /dmap) |
玩家编辑 custom-*.txt |
覆盖或新增,安装/升级不覆盖 |
数值
| 数值名 | 值 |
|---|---|
| 着色器项数 | 23 |
| 着色器实现类数 | 6 |
| 光照项数 | 14 |
| 光照实现类数 | 2 |
| 着色器行数 / 光照行数 | 183 / 83 |
计数交叉验证:grep -cE '^\s*- class:' 与 grep -cE '^\s*name:' 在两个文件中分别一致(23 与 14),实现类分布由对 class: 值去重计数得出。
与方块分组的关系
着色器按"方块组"而非单方块取贴图。blockgroups.yml 定义的 gtnh-all-plants / gtnh-all-ground 等聚合组即供着色器引用,见 worlds.txt 与 blockgroups.yml。
相关条目
- 透视 - 同一三件套的第三项(102 项)
- 地图模板 -
shader:/lighting:的引用方 - HDMap 渲染管线 -
HDShader/HDLighting接口与 21 个类 - 纹理包 -
stdtexture*系列消费的texturepack: