-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
todo: - fix transitions - make setting for generate/gen speed - make server executable - fix tiling seams for large mips? - add mip hash checks
- Loading branch information
Showing
19 changed files
with
1,295 additions
and
677 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#import boimp::shared::{ImposterVertexOut, unpack_pbrinput, pack_pbrinput}; | ||
#import boimp::bindings::sample_tile_material; | ||
|
||
@group(2) @binding(100) | ||
var<uniform> offset: f32; | ||
|
||
@fragment | ||
fn fragment(in: ImposterVertexOut) -> @location(0) vec2<u32> { | ||
let inv_rot = mat3x3( | ||
in.inverse_rotation_0c, | ||
in.inverse_rotation_1c, | ||
in.inverse_rotation_2c, | ||
); | ||
|
||
var props = sample_tile_material(clamp(in.uv_c, vec2(0.0001), vec2(17.0/18.0 - 0.0001)), vec2(0u,0u), vec2(offset, offset)); | ||
var pbr_input = unpack_pbrinput(props, in.position); | ||
pbr_input.N = inv_rot * normalize(pbr_input.N); | ||
pbr_input.world_normal = pbr_input.N; | ||
|
||
// write the imposter gbuffer | ||
return pack_pbrinput(pbr_input); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.