MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Samples / load_shaders

Method load_shaders

samples/general/mobile_nerf/mobile_nerf.cpp:352–381  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350}
351
352void MobileNerf::load_shaders()
353{
354 // Loading first pass shaders
355 if (use_deferred)
356 {
357 // Loading first pass shaders
358 shader_stages_first_pass[0] = load_shader("mobile_nerf/raster.vert.spv", VK_SHADER_STAGE_VERTEX_BIT);
359 shader_stages_first_pass[1] = load_shader(
360 combo_mode ?
361 (using_original_nerf_models[0] ? "mobile_nerf/raster_combo.frag.spv" : "mobile_nerf/raster_morpheus_combo.frag.spv") :
362 (using_original_nerf_models[0] ? "mobile_nerf/raster.frag.spv" : "mobile_nerf/raster_morpheus.frag.spv"),
363 VK_SHADER_STAGE_FRAGMENT_BIT);
364
365 // Loading second pass shaders
366 shader_stages_second_pass[0] = load_shader("mobile_nerf/quad.vert", VK_SHADER_STAGE_VERTEX_BIT);
367 shader_stages_second_pass[1] = load_shader(
368 combo_mode ?
369 (using_original_nerf_models[0] ? "mobile_nerf/mlp_combo.frag.spv" : "mobile_nerf/mlp_morpheus_combo.frag.spv") :
370 (using_original_nerf_models[0] ? "mobile_nerf/mlp.frag.spv" : "mobile_nerf/mlp_morpheus.frag.spv"),
371 VK_SHADER_STAGE_FRAGMENT_BIT);
372 }
373 else
374 {
375 // Loading one pass shaders
376 shader_stages_first_pass[0] = load_shader("mobile_nerf/raster.vert.spv", VK_SHADER_STAGE_VERTEX_BIT);
377 shader_stages_first_pass[1] = load_shader(
378 using_original_nerf_models[0] ? "mobile_nerf/merged.frag.spv" : "mobile_nerf/merged_morpheus.frag.spv",
379 VK_SHADER_STAGE_FRAGMENT_BIT);
380 }
381}
382
383bool MobileNerf::prepare(const vkb::ApplicationOptions &options)
384{

Callers

nothing calls this directly

Calls 1

load_shaderFunction · 0.50

Tested by

no test coverage detected