From 5e3bb454d50091e581d5d1d03af34e38277694b3 Mon Sep 17 00:00:00 2001 From: ladevieq Date: Thu, 12 Jan 2023 00:47:59 +0100 Subject: WIP new rendering api --- src/scene.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/scene.cpp') diff --git a/src/scene.cpp b/src/scene.cpp index f560d03..9980e75 100644 --- a/src/scene.cpp +++ b/src/scene.cpp @@ -142,24 +142,24 @@ scene::scene(const camera& cam, uint32_t width, uint32_t height) indices[triangle_offset + 2] = (submesh_level_index_3 + vertex_offset) | (0xff000000 & (materials.size() << 24)); } - const auto& albedo_image = vkrenderer::api.get_image(material.base_color_texture->device_image); - const auto& albedo_sampler = vkrenderer::api.get_sampler(material.base_color_texture->sampler->device_sampler); +// const auto& albedo_image = vkrenderer::api.get_image(material.base_color_texture->device_image); +// const auto& albedo_sampler = vkrenderer::api.get_sampler(material.base_color_texture->sampler->device_sampler); materials.emplace_back(gpu_material { .base_color = material.base_color, - .albedo_texture_id = albedo_image.bindless_sampled_index, - .albedo_texture_sampler_id = albedo_sampler.bindless_index, +// .albedo_texture_id = albedo_image.bindless_sampled_index, +// .albedo_texture_sampler_id = albedo_sampler.bindless_index, .metalness = material.metalness, .roughness = material.roughness }); if (material.metallic_roughness_texture != nullptr) { auto& gpu_material = materials.back(); - const auto& metallic_roughness_image = vkrenderer::api.get_image(material.metallic_roughness_texture->device_image); - const auto& metallic_roughness_sampler = vkrenderer::api.get_sampler(material.metallic_roughness_texture->sampler->device_sampler); +// const auto& metallic_roughness_image = vkrenderer::api.get_image(material.metallic_roughness_texture->device_image); +// const auto& metallic_roughness_sampler = vkrenderer::api.get_sampler(material.metallic_roughness_texture->sampler->device_sampler); - gpu_material.metallic_roughness_texture_id = metallic_roughness_image.bindless_sampled_index; - gpu_material.metallic_roughness_texture_sampler_id = metallic_roughness_sampler.bindless_index; +// gpu_material.metallic_roughness_texture_id = metallic_roughness_image.bindless_sampled_index; +// gpu_material.metallic_roughness_texture_sampler_id = metallic_roughness_sampler.bindless_index; } } -- cgit v1.3