Skip to content

Commit

Permalink
Make positionOffset more conservative to help with large scenes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nelarius committed Apr 27, 2024
1 parent be8f8fe commit 26030ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/pt/deferred_renderer_lighting_pass.wgsl
Expand Up @@ -386,8 +386,8 @@ fn rayIntersectTriangle(ray: Ray, tri: Positions, tmax: f32, hit: ptr<function,
}

const ORIGIN = 1f / 32f;
const FLOAT_SCALE = 1f / 65536f;
const INT_SCALE = 256f;
const FLOAT_SCALE = 1f / 16384f;
const INT_SCALE = 1024;

@must_use
fn offsetPosition(p: vec3f, n: vec3f) -> vec3f {
Expand Down
4 changes: 2 additions & 2 deletions src/pt/shader_source.hpp
Expand Up @@ -1141,8 +1141,8 @@ fn rayIntersectTriangle(ray: Ray, tri: Positions, tmax: f32, hit: ptr<function,
}
const ORIGIN = 1f / 32f;
const FLOAT_SCALE = 1f / 65536f;
const INT_SCALE = 256f;
const FLOAT_SCALE = 1f / 16384f;
const INT_SCALE = 1024;
@must_use
fn offsetPosition(p: vec3f, n: vec3f) -> vec3f {
Expand Down

0 comments on commit 26030ac

Please sign in to comment.