diff options
| author | ladevieq <ladevie.quentin@gmail.com> | 2025-01-26 22:14:47 +0100 |
|---|---|---|
| committer | ladevieq <ladevie.quentin@gmail.com> | 2025-01-26 22:14:47 +0100 |
| commit | 2b2d374eb642edf345f93fa559e8cd7d76a0c9d1 (patch) | |
| tree | fbc1440dc1514a55d14f72a773b0ea962eb93dd0 /shaders/compute.comp | |
| parent | f63be3ecc79499a9a362ce38d0f3be44033c37fc (diff) | |
Fix mesh loading for new API
Diffstat (limited to 'shaders/compute.comp')
| -rw-r--r-- | shaders/compute.comp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/shaders/compute.comp b/shaders/compute.comp index 92fa9db..14f1238 100644 --- a/shaders/compute.comp +++ b/shaders/compute.comp @@ -142,13 +142,15 @@ vec3 ray_color(ray r, uint seed) { vec3 diffuse_color = srgb_to_linear(texture( sampler2D( textures[nonuniformEXT(tri.mat.base_color_texture.texture_id)], - samplers[nonuniformEXT(tri.mat.base_color_texture.sampler_id)] + // samplers[nonuniformEXT(tri.mat.base_color_texture.sampler_id)] + samplers[1] ), uv ).xyz) * tri.mat.base_color.xyz; vec2 metalness_roughness = texture( sampler2D( textures[nonuniformEXT(tri.mat.metallic_roughness_texture.texture_id)], - samplers[nonuniformEXT(tri.mat.metallic_roughness_texture.sampler_id)] + // samplers[nonuniformEXT(tri.mat.metallic_roughness_texture.sampler_id)] + samplers[1] ), uv ).xy * vec2(tri.mat.metalness, tri.mat.roughness); @@ -281,9 +283,10 @@ void main() { vec3 acc_color = srgb_to_linear(imageLoad(images[nonuniformEXT(bufs.accumulation_image_index)], coords).xyz); out_color = linear_to_srgb(mix(acc_color, out_color, spp_scale)); - for (uint i = 0; i < bufs.scene.downscale_factor; i++) { - for (uint j = 0; j < bufs.scene.downscale_factor; j++) { - imageStore(images[nonuniformEXT(bufs.output_image_index)], coords + ivec2(i, j), vec4(out_color, 1.0)); - } - } + // for (uint i = 0; i < bufs.scene.downscale_factor; i++) { + // for (uint j = 0; j < bufs.scene.downscale_factor; j++) { + // imageStore(images[nonuniformEXT(bufs.output_image_index)], coords + ivec2(i, j), vec4(out_color, 1.0)); + // } + // } + imageStore(images[nonuniformEXT(bufs.output_image_index)], coords, vec4(out_color, 1.0)); } |
