This commit is contained in:
1 parent
f29712d158
commit
3e053a81ab
123 files changed
+31930
-1404
No files matched your search
@@ -0,0 +1,24 @@
|
||||
#import bevy_pbr::forward_io::VertexOutput
|
||||
|
||||
struct ActorIconOverlayMaterial {
|
||||
brightness: f32,
|
||||
}
|
||||
|
||||
@group(#{MATERIAL_BIND_GROUP}) @binding(0)
|
||||
var icon_texture: texture_2d<f32>;
|
||||
|
||||
@group(#{MATERIAL_BIND_GROUP}) @binding(1)
|
||||
var icon_sampler: sampler;
|
||||
|
||||
@group(#{MATERIAL_BIND_GROUP}) @binding(2)
|
||||
var<uniform> material: ActorIconOverlayMaterial;
|
||||
|
||||
@fragment
|
||||
fn fragment(in: VertexOutput) -> @location(0) vec4<f32> {
|
||||
let texel = textureSample(icon_texture, icon_sampler, in.uv);
|
||||
if texel.a < 0.01 {
|
||||
discard;
|
||||
}
|
||||
|
||||
return vec4(texel.rgb * material.brightness, texel.a);
|
||||
}
|
||||
Reference in new issue
Block a user