From 472c2258dbeca000a454ea1781f09df63477563e Mon Sep 17 00:00:00 2001 From: skal Date: Sat, 28 Feb 2026 02:39:04 +0100 Subject: replace wgsl type: vec4 -> vec4f .. --- src/tests/gpu/test_noise_functions.cc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/tests/gpu/test_noise_functions.cc') diff --git a/src/tests/gpu/test_noise_functions.cc b/src/tests/gpu/test_noise_functions.cc index d96a982..3c6cc52 100644 --- a/src/tests/gpu/test_noise_functions.cc +++ b/src/tests/gpu/test_noise_functions.cc @@ -21,16 +21,16 @@ static bool test_noise_shader_loading() { // Check for key function signatures const char* expected_funcs[] = { "fn hash_1f(x: f32) -> f32", - "fn hash_2f(p: vec2) -> f32", - "fn hash_3f(p: vec3) -> f32", - "fn hash_2f_2f(p: vec2) -> vec2", - "fn hash_3f_3f(p: vec3) -> vec3", + "fn hash_2f(p: vec2f) -> f32", + "fn hash_3f(p: vec3f) -> f32", + "fn hash_2f_2f(p: vec2f) -> vec2f", + "fn hash_3f_3f(p: vec3f) -> vec3f", "fn hash_1u(p: u32) -> f32", - "fn noise_2d(p: vec2) -> f32", - "fn noise_3d(p: vec3) -> f32", - "fn gyroid(p: vec3) -> f32", - "fn fbm_2d(p: vec2, octaves: i32) -> f32", - "fn fbm_3d(p: vec3, octaves: i32) -> f32", + "fn noise_2d(p: vec2f) -> f32", + "fn noise_3d(p: vec3f) -> f32", + "fn gyroid(p: vec3f) -> f32", + "fn fbm_2d(p: vec2f, octaves: i32) -> f32", + "fn fbm_3d(p: vec3f, octaves: i32) -> f32", }; int func_count = sizeof(expected_funcs) / sizeof(expected_funcs[0]); @@ -63,11 +63,11 @@ static bool test_noise_composition() { #include "math/noise" @fragment - fn fs_main(@location(0) uv: vec2) -> @location(0) vec4 { + fn fs_main(@location(0) uv: vec2f) -> @location(0) vec4f { let h = hash_2f(uv); let n = noise_2d(uv * 4.0); let fbm = fbm_2d(uv * 2.0, 3); - return vec4(fbm, fbm, fbm, 1.0); + return vec4f(fbm, fbm, fbm, 1.0); } )"; -- cgit v1.2.3