mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
fix reflection probe box projection stretching
This commit is contained in:
parent
19bb18716e
commit
be01c7f5a4
2 changed files with 4 additions and 2 deletions
|
|
@ -1401,7 +1401,8 @@ void main() {
|
|||
vec3 bent_normal = normal;
|
||||
#endif
|
||||
vec3 ref_vec = normalize(reflect(-view, bent_normal));
|
||||
ref_vec = mix(ref_vec, bent_normal, roughness * roughness);
|
||||
// Interpolate between mirror and rough reflection by using linear_roughness * linear_roughness.
|
||||
ref_vec = mix(ref_vec, bent_normal, roughness * roughness * roughness * roughness);
|
||||
|
||||
uvec2 reflection_indices = instances.data[draw_call.instance_index].reflection_probes;
|
||||
for (uint i = 0; i < sc_reflection_probes(); i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue