Differential D15753 Diff 55618 source/blender/draw/engines/eevee_next/shaders/infos/eevee_material_info.hh
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/eevee_next/shaders/infos/eevee_material_info.hh
| Show First 20 Lines • Show All 86 Lines • ▼ Show 20 Lines | |||||
| GPU_SHADER_CREATE_INFO(eevee_render_pass_out) | GPU_SHADER_CREATE_INFO(eevee_render_pass_out) | ||||
| .define("MAT_RENDER_PASS_SUPPORT") | .define("MAT_RENDER_PASS_SUPPORT") | ||||
| .image_out(RBUFS_NORMAL_SLOT, Qualifier::READ_WRITE, GPU_RGBA16F, "rp_normal_img") | .image_out(RBUFS_NORMAL_SLOT, Qualifier::READ_WRITE, GPU_RGBA16F, "rp_normal_img") | ||||
| .image_array_out(RBUFS_LIGHT_SLOT, Qualifier::READ_WRITE, GPU_RGBA16F, "rp_light_img") | .image_array_out(RBUFS_LIGHT_SLOT, Qualifier::READ_WRITE, GPU_RGBA16F, "rp_light_img") | ||||
| .image_out(RBUFS_DIFF_COLOR_SLOT, Qualifier::READ_WRITE, GPU_RGBA16F, "rp_diffuse_color_img") | .image_out(RBUFS_DIFF_COLOR_SLOT, Qualifier::READ_WRITE, GPU_RGBA16F, "rp_diffuse_color_img") | ||||
| .image_out(RBUFS_SPEC_COLOR_SLOT, Qualifier::READ_WRITE, GPU_RGBA16F, "rp_specular_color_img") | .image_out(RBUFS_SPEC_COLOR_SLOT, Qualifier::READ_WRITE, GPU_RGBA16F, "rp_specular_color_img") | ||||
| .image_out(RBUFS_EMISSION_SLOT, Qualifier::READ_WRITE, GPU_RGBA16F, "rp_emission_img"); | .image_out(RBUFS_EMISSION_SLOT, Qualifier::READ_WRITE, GPU_RGBA16F, "rp_emission_img"); | ||||
| GPU_SHADER_CREATE_INFO(eevee_cryptomatte_out) | |||||
| .storage_buf(7, Qualifier::READ, "vec2", "cryptomatte_object_buf[]", Frequency::PASS) | |||||
| .image_out(7, Qualifier::WRITE, GPU_RGBA32F, "rp_cryptomatte_img"); | |||||
| GPU_SHADER_CREATE_INFO(eevee_surf_deferred) | GPU_SHADER_CREATE_INFO(eevee_surf_deferred) | ||||
| .vertex_out(eevee_surf_iface) | .vertex_out(eevee_surf_iface) | ||||
fclem: merge into one (keep `eevee_cryptomatte_out`). even if this causes more unused binds for the… | |||||
| /* NOTE: This removes the possibility of using gl_FragDepth. */ | /* NOTE: This removes the possibility of using gl_FragDepth. */ | ||||
| // .early_fragment_test(true) | // .early_fragment_test(true) | ||||
| /* Direct output. */ | /* Direct output. */ | ||||
| .fragment_out(0, Type::VEC4, "out_radiance", DualBlend::SRC_0) | .fragment_out(0, Type::VEC4, "out_radiance", DualBlend::SRC_0) | ||||
| .fragment_out(0, Type::VEC4, "out_transmittance", DualBlend::SRC_1) | .fragment_out(0, Type::VEC4, "out_transmittance", DualBlend::SRC_1) | ||||
| /* Gbuffer. */ | /* Gbuffer. */ | ||||
| // .image_out(0, Qualifier::WRITE, GPU_R11F_G11F_B10F, "gbuff_transmit_color") | // .image_out(0, Qualifier::WRITE, GPU_R11F_G11F_B10F, "gbuff_transmit_color") | ||||
| // .image_out(1, Qualifier::WRITE, GPU_R11F_G11F_B10F, "gbuff_transmit_data") | // .image_out(1, Qualifier::WRITE, GPU_R11F_G11F_B10F, "gbuff_transmit_data") | ||||
| Show All 11 Lines | |||||
| GPU_SHADER_CREATE_INFO(eevee_surf_forward) | GPU_SHADER_CREATE_INFO(eevee_surf_forward) | ||||
| .vertex_out(eevee_surf_iface) | .vertex_out(eevee_surf_iface) | ||||
| /* Early fragment test is needed for render passes support for forward surfaces. */ | /* Early fragment test is needed for render passes support for forward surfaces. */ | ||||
| /* NOTE: This removes the possibility of using gl_FragDepth. */ | /* NOTE: This removes the possibility of using gl_FragDepth. */ | ||||
| .early_fragment_test(true) | .early_fragment_test(true) | ||||
| .fragment_out(0, Type::VEC4, "out_radiance", DualBlend::SRC_0) | .fragment_out(0, Type::VEC4, "out_radiance", DualBlend::SRC_0) | ||||
| .fragment_out(0, Type::VEC4, "out_transmittance", DualBlend::SRC_1) | .fragment_out(0, Type::VEC4, "out_transmittance", DualBlend::SRC_1) | ||||
| .fragment_source("eevee_surf_forward_frag.glsl") | .fragment_source("eevee_surf_forward_frag.glsl") | ||||
| .additional_info("eevee_light_data", "eevee_utility_texture", "eevee_sampling_data" | .additional_info("eevee_cryptomatte_out", | ||||
| "eevee_light_data", | |||||
| "eevee_utility_texture", | |||||
| "eevee_sampling_data" | |||||
| // "eevee_lightprobe_data", | // "eevee_lightprobe_data", | ||||
| // "eevee_shadow_data" | // "eevee_shadow_data" | ||||
| /* Optionally added depending on the material. */ | /* Optionally added depending on the material. */ | ||||
| // "eevee_raytrace_data", | // "eevee_raytrace_data", | ||||
| // "eevee_transmittance_data", | // "eevee_transmittance_data", | ||||
| // "eevee_aov_out", | // "eevee_aov_out", | ||||
| // "eevee_render_pass_out", | // "eevee_render_pass_out", | ||||
| ); | ); | ||||
| GPU_SHADER_CREATE_INFO(eevee_surf_depth) | GPU_SHADER_CREATE_INFO(eevee_surf_depth) | ||||
| .vertex_out(eevee_surf_iface) | .vertex_out(eevee_surf_iface) | ||||
| .fragment_source("eevee_surf_depth_frag.glsl") | .fragment_source("eevee_surf_depth_frag.glsl") | ||||
| .additional_info("eevee_sampling_data", "eevee_utility_texture"); | .additional_info("eevee_sampling_data", "eevee_utility_texture"); | ||||
| GPU_SHADER_CREATE_INFO(eevee_surf_world) | GPU_SHADER_CREATE_INFO(eevee_surf_world) | ||||
| .vertex_out(eevee_surf_iface) | .vertex_out(eevee_surf_iface) | ||||
| .push_constant(Type::FLOAT, "world_opacity_fade") | .push_constant(Type::FLOAT, "world_opacity_fade") | ||||
| .fragment_out(0, Type::VEC4, "out_background") | .fragment_out(0, Type::VEC4, "out_background") | ||||
| .fragment_source("eevee_surf_world_frag.glsl") | .fragment_source("eevee_surf_world_frag.glsl") | ||||
| .additional_info("eevee_aov_out", "eevee_render_pass_out", "eevee_utility_texture"); | .additional_info("eevee_aov_out", | ||||
| "eevee_cryptomatte_out", | |||||
| "eevee_render_pass_out", | |||||
| "eevee_utility_texture"); | |||||
| #undef image_out | #undef image_out | ||||
| #undef image_array_out | #undef image_array_out | ||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Volume | /** \name Volume | ||||
| ▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines | |||||
merge into one (keep eevee_cryptomatte_out). even if this causes more unused binds for the world.