Skip to content

Commit

Permalink
Deploying to gh-pages from @ 0dec46e 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
evroon committed Mar 29, 2024
1 parent c090a22 commit 4f0abdb
Show file tree
Hide file tree
Showing 11 changed files with 89 additions and 0 deletions.
Binary file added assets/audio/flying.ogg
Binary file not shown.
Binary file added assets/fonts/FiraSans-Bold.ttf
Binary file not shown.
46 changes: 46 additions & 0 deletions assets/shaders/terrain_material.wgsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#import bevy_pbr::{
pbr_fragment::pbr_input_from_standard_material,
pbr_functions::alpha_discard,
}

#ifdef PREPASS_PIPELINE
#import bevy_pbr::{
prepass_io::{VertexOutput, FragmentOutput},
pbr_deferred_functions::deferred_output,
}
#else
#import bevy_pbr::{
forward_io::{VertexOutput, FragmentOutput},
pbr_functions::{apply_pbr_lighting, main_pass_post_lighting_processing},
}
#endif

struct MyExtendedMaterial {
quantize_steps: u32,
}

@group(1) @binding(100)
var<uniform> my_extended_material: MyExtendedMaterial;

@fragment
fn fragment(
in: VertexOutput,
@builtin(front_facing) is_front: bool,
) -> FragmentOutput {
var pbr_input = pbr_input_from_standard_material(in, is_front);

if (in.world_normal.y < 0.8) {
pbr_input.material.base_color.g /= 2.0;
}

pbr_input.material.base_color = alpha_discard(pbr_input.material, pbr_input.material.base_color);

#ifdef PREPASS_PIPELINE
let out = deferred_output(in, pbr_input);
#else
var out: FragmentOutput;
out.color = main_pass_post_lighting_processing(pbr_input, apply_pbr_lighting(pbr_input));
#endif

return out;
}
17 changes: 17 additions & 0 deletions assets/shaders/water_material.wgsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
struct WaterMaerial {
color: vec4<f32>,
};

@group(1) @binding(0)
var<uniform> material: WaterMaerial;
@group(1) @binding(1)
var base_color_texture: texture_2d<f32>;
@group(1) @binding(2)
var base_color_sampler: sampler;

@fragment
fn fragment(
#import bevy_pbr::mesh_vertex_output
) -> @location(0) vec4<f32> {
return material.color * textureSample(base_color_texture, base_color_sampler, uv);
}
Binary file added assets/textures/bevy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions bevy_hydrology-d84fda6fa6d1401e.js

Large diffs are not rendered by default.

Binary file added bevy_hydrology-d84fda6fa6d1401e_bg.wasm
Binary file not shown.
5 changes: 5 additions & 0 deletions credits/CREDITS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Credits

## Assets

* Bevy icon: [MIT License](licenses/Bevy_MIT_License.md);
19 changes: 19 additions & 0 deletions credits/licenses/Bevy_MIT_License.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Binary file added icon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!doctype html><html lang=en><meta charset=utf-8><title>Bevy hydrology</title><link href=icon.ico rel=icon><style>body,html{height:100%}body{background:#fff;margin:0}.game-container{justify-content:center;align-items:center;width:100%;height:100%;display:flex}#bevy{background-color:#fff;width:800px;height:600px}</style><link as=fetch crossorigin href=bevy-hydrology/bevy_hydrology-d84fda6fa6d1401e_bg.wasm integrity=sha384-FKsFOWwfYhRRoEuZdHlSsZcxYFGz2RHXK2FRmlTm9bjOvMJd_7dzXs3w9491WMqE rel=preload type=application/wasm><link crossorigin href=bevy-hydrology/bevy_hydrology-d84fda6fa6d1401e.js integrity=sha384-T6z4vXq2Rq6Dc_9UzaNtZJpVcOV76nY7yHTlN0arw_qSFgneXUmpptAzRaZEeWe- rel=modulepreload></head><body><script>(()=>{let d=0;var c=(e=>{let f=d;a.forEach(a=>{if(a.state!==`running`){a.resume()}else{f++}});if(f>d&&f===a.length){b.forEach(a=>{document.removeEventListener(a,c)})}});const a=[];const b=[`click`,`contextmenu`,`auxclick`,`dblclick`,`mousedown`,`mouseup`,`pointerup`,`touchend`,`keydown`,`keyup`];self.AudioContext=new Proxy(self.AudioContext,{construct(b,c){const d=new b(...c);a.push(d);return d}});b.forEach(a=>{document.addEventListener(a,c)})})()</script><div class=game-container><canvas id=bevy>Javascript and support for canvas is required</canvas></div><script type=module>import a,*as b from"bevy-hydrology/bevy_hydrology-d84fda6fa6d1401e.js";a(`bevy-hydrology/bevy_hydrology-d84fda6fa6d1401e_bg.wasm`);window.wasmBindings=b</script></body></html>

0 comments on commit 4f0abdb

Please sign in to comment.