mirror of
https://github.com/godotengine/godot
synced 2024-09-16 03:27:40 +00:00
Merge pull request #53743 from williamd67/GPULightmapper-process-rays-to-sky
This commit is contained in:
commit
2c46a1f327
|
@ -420,7 +420,8 @@ void main() {
|
|||
|
||||
light = textureLod(sampler2DArray(source_light, linear_sampler), uvw, 0.0).rgb;
|
||||
active_rays += 1.0;
|
||||
} else if (trace_result == RAY_MISS && params.env_transform[0][3] == 0.0) { // Use env_transform[0][3] to indicate when we are computing the first bounce
|
||||
} else if (trace_result == RAY_MISS) {
|
||||
if (params.env_transform[0][3] == 0.0) { // Use env_transform[0][3] to indicate when we are computing the first bounce
|
||||
// Did not hit a triangle, reach out for the sky
|
||||
vec3 sky_dir = normalize(mat3(params.env_transform) * ray_dir);
|
||||
|
||||
|
@ -434,6 +435,7 @@ void main() {
|
|||
st /= vec2(PI * 2.0, PI);
|
||||
|
||||
light = textureLod(sampler2D(environment, linear_sampler), st, 0.0).rgb;
|
||||
}
|
||||
active_rays += 1.0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue