From dd40803458695abcd4100fffb874cc25a71ea758 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 23 Jan 2025 21:42:04 +0100 Subject: anisotropic texture filtering --- client/src/shaders/fragment_pbr.wgsl | 2 +- client/src/shaders/texture_copy.wgsl | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'client/src/shaders') 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 { 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 . + struct VertexOut { @builtin(position) clip: vec4, @location(0) texcoord: vec2, -- cgit v1.2.3-70-g09d2