vk/dx12: Enable/fix separate back and front lighting (#1927)

* vk: separate specular color

rsx: separate front color output from back color output

re-enable front-back diffuse lighting

vk: fix front face selection and actually enable face culling

* dx12: Hide constant-key blended visuals (by common use of factor, 1-factor)

* dx12: Fix 2 sided lighting when the shader does not compute both outputs

* vk/dx12: confirm that src register exists before copying for 2-sided lighting
This commit is contained in:
kd-11 2016-07-17 19:57:50 +03:00 committed by raven02
parent b2a7dac11b
commit 2337bf204c
9 changed files with 177 additions and 40 deletions

View file

@ -738,6 +738,8 @@ namespace rsx
result.front_back_color_enabled = !rsx::method_registers.two_side_light_en();
result.back_color_diffuse_output = !!(rsx::method_registers.vertex_attrib_output_mask() & CELL_GCM_ATTRIB_OUTPUT_MASK_BACKDIFFUSE);
result.back_color_specular_output = !!(rsx::method_registers.vertex_attrib_output_mask() & CELL_GCM_ATTRIB_OUTPUT_MASK_BACKSPECULAR);
result.front_color_diffuse_output = !!(rsx::method_registers.vertex_attrib_output_mask() & CELL_GCM_ATTRIB_OUTPUT_MASK_FRONTDIFFUSE);
result.front_color_specular_output = !!(rsx::method_registers.vertex_attrib_output_mask() & CELL_GCM_ATTRIB_OUTPUT_MASK_FRONTSPECULAR);
result.alpha_func = rsx::method_registers.alpha_func();
result.fog_equation = rsx::method_registers.fog_equation();
result.origin_mode = rsx::method_registers.shader_window_origin();