* update: modify for 0.17 * update: enhance webview functionality and improve plugin implementation * update: refactor webview system and improve binding group usage * update: refactor command triggering for webview events and enhance Receive struct * update: refactor command triggering for webview dev tools * update: refactor render process handler and improve webview handling * update: refactor webview browser handling and improve IME caret management * clippy * fmt * update: improve README formatting and clarify version compatibility * update: support Bevy 0.17 and enhance permissions in settings * update: enhance CI configuration by adding Wayland and XKB dependencies * delete: settings.json * update: refactor shader imports and improve binding group definitions * update: refactor devtool command triggers for improved clarity * update: modify LibraryLoader initialization for improved path handling on macOS * fmt --------- Co-authored-by: not-elm <elmgameinfo@gmail.com>
21 lines
556 B
WebGPU Shading Language
21 lines
556 B
WebGPU Shading Language
#import bevy_pbr::{
|
|
forward_io::VertexOutput,
|
|
}
|
|
#import webview::util::{
|
|
surface_color,
|
|
}
|
|
|
|
@group(#{MATERIAL_BIND_GROUP}) @binding(0) var mask_texture: texture_2d<f32>;
|
|
@group(#{MATERIAL_BIND_GROUP}) @binding(1) var mask_sampler: sampler;
|
|
|
|
@fragment
|
|
fn fragment(
|
|
in: VertexOutput,
|
|
) -> @location(0) vec4<f32> {
|
|
// You can obtain the surface color.
|
|
var color = surface_color(in.uv);
|
|
// Blend the color with the mask texture.
|
|
color *= (textureSample(mask_texture, mask_sampler, in.uv) * vec4(vec3(1.0), 0.3));
|
|
return color;
|
|
}
|