diff options
author | metamuffin <metamuffin@disroot.org> | 2025-01-23 21:42:04 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-01-23 21:42:04 +0100 |
commit | dd40803458695abcd4100fffb874cc25a71ea758 (patch) | |
tree | 2ac174eb7d6c6414d32740b7f067b5c821ece176 /client/src/shaders | |
parent | 25280332af8dce146295b2dcb48c044c45a92eba (diff) | |
download | weareserver-dd40803458695abcd4100fffb874cc25a71ea758.tar weareserver-dd40803458695abcd4100fffb874cc25a71ea758.tar.bz2 weareserver-dd40803458695abcd4100fffb874cc25a71ea758.tar.zst |
anisotropic texture filtering
Diffstat (limited to 'client/src/shaders')
-rw-r--r-- | client/src/shaders/fragment_pbr.wgsl | 2 | ||||
-rw-r--r-- | client/src/shaders/texture_copy.wgsl | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/client/src/shaders/fragment_pbr.wgsl b/client/src/shaders/fragment_pbr.wgsl index 2908d6f..f3ed37e 100644 --- a/client/src/shaders/fragment_pbr.wgsl +++ b/client/src/shaders/fragment_pbr.wgsl @@ -48,7 +48,7 @@ fn main(vo: VertexOut) -> @location(0) vec4<f32> { let color = t_albedo.rgb * lighting; - // TODO better (and faster?) randomneess for alpha dither + // TODO better (and faster?) randomness for alpha dither if fract(dot(sin(vo.clip * 123.) * 1213., vec4(3., 2., 1., 4.))) > alpha { discard; } diff --git a/client/src/shaders/texture_copy.wgsl b/client/src/shaders/texture_copy.wgsl index ff58f87..be38a76 100644 --- a/client/src/shaders/texture_copy.wgsl +++ b/client/src/shaders/texture_copy.wgsl @@ -1,3 +1,18 @@ +// wearechat - generic multiplayer game with voip +// Copyright (C) 2025 metamuffin +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, version 3 of the License only. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see <https://www.gnu.org/licenses/>. + struct VertexOut { @builtin(position) clip: vec4<f32>, @location(0) texcoord: vec2<f32>, |