1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Refactored shadowmapping.

- Made shadow bias size independent, so it will remain when changing light or camera size.
- Implemented normal offset bias, which greatly enhances quality.
- Added transmission to subsurface scattering
- Reimplemented shadow filter modes

Closes #17260
This commit is contained in:
Juan Linietsky
2020-04-07 22:51:52 -03:00
parent b2f79cac9a
commit 4ffc0d6b3f
34 changed files with 1032 additions and 291 deletions

View File

@@ -926,6 +926,14 @@ public:
return light->negative;
}
_FORCE_INLINE_ float light_get_transmittance_bias(RID p_light) const {
const Light *light = light_owner.getornull(p_light);
ERR_FAIL_COND_V(!light, 0.0);
return light->param[RS::LIGHT_PARAM_TRANSMITTANCE_BIAS];
}
bool light_get_use_gi(RID p_light);
uint64_t light_get_version(RID p_light) const;