Skip to content

Commit

Permalink
fix(AtmosphericScattering): fix sky Rendering error in the IMAC envir…
Browse files Browse the repository at this point in the history
…onment (Orillusion#254)

fix sky Rendering error in the IMAC environment.
  • Loading branch information
hellmor authored Jul 24, 2023
1 parent b5ec057 commit 5b57016
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/assets/shader/compute/ErpImage2CubeMapCreateCube_cs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export let ErpImage2CubeMapCreateCube_cs: string = /*wgsl*/ `
fn convertIdToDir3(uv_i32:vec2<i32>, quaternion:vec4<f32>) -> vec3<f32>{
var uv_f32:vec2<f32> = vec2<f32>(uv_i32.xy);
var halfSize:f32 = f32(size.dstWidth / 2);
var halfSize:f32 = f32(size.dstWidth / 2) - 0.5;
var worldDirection:vec3<f32> = vec3<f32>(uv_f32.x - halfSize, uv_f32.y - halfSize, -halfSize);
worldDirection = normalize(worldDirection);
worldDirection = applyQuaternion(worldDirection, quaternion);
Expand Down

0 comments on commit 5b57016

Please sign in to comment.