You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
AO support for GIProbe (right on time for Godot Sprint!)
This commit is contained in:
committed by
Juan Linietsky
parent
76c6f39d99
commit
2c67cc654f
@@ -3771,6 +3771,32 @@ float RasterizerStorageRD::gi_probe_get_energy(RID p_gi_probe) const {
|
||||
return gi_probe->energy;
|
||||
}
|
||||
|
||||
void RasterizerStorageRD::gi_probe_set_ao(RID p_gi_probe, float p_ao) {
|
||||
GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe);
|
||||
ERR_FAIL_COND(!gi_probe);
|
||||
|
||||
gi_probe->ao = p_ao;
|
||||
}
|
||||
float RasterizerStorageRD::gi_probe_get_ao(RID p_gi_probe) const {
|
||||
GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe);
|
||||
ERR_FAIL_COND_V(!gi_probe, 0);
|
||||
return gi_probe->ao;
|
||||
}
|
||||
|
||||
void RasterizerStorageRD::gi_probe_set_ao_strength(RID p_gi_probe, float p_strength) {
|
||||
|
||||
GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe);
|
||||
ERR_FAIL_COND(!gi_probe);
|
||||
|
||||
gi_probe->ao_strength = p_strength;
|
||||
}
|
||||
|
||||
float RasterizerStorageRD::gi_probe_get_ao_strength(RID p_gi_probe) const {
|
||||
GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe);
|
||||
ERR_FAIL_COND_V(!gi_probe, 0);
|
||||
return gi_probe->ao_strength;
|
||||
}
|
||||
|
||||
void RasterizerStorageRD::gi_probe_set_bias(RID p_gi_probe, float p_bias) {
|
||||
GIProbe *gi_probe = gi_probe_owner.getornull(p_gi_probe);
|
||||
ERR_FAIL_COND(!gi_probe);
|
||||
|
||||
Reference in New Issue
Block a user