Open ThatNintendoNerd opened 1 year ago
This would require checking the decompiled shaders to see if there is a specific attribute or uniform parameter used for effect lighting. The shader labels themselves are just strings. I don't have any rendering for effect lighting, so this isn't a big priority for me at the moment. I've outlined the steps below if anyone wants to make an attempt at figuring it out.
sizeof(Vec4<f32>)
or 16
. You can see an example in code here. The c9_data
buffer has material uniforms. Stage data is typically stored in c10_data
or c11_data
.fs_c9_data[offset].x
write fs_c9_data[offset].x*0.0
.This should be a lot easier with the dump of annotated decompiled shaders. You should be able to just diff the vertex or fragment shaders for the two shader labels in the annotated dump and check for missing parameters. Check the nufxlb JSON for which vertex and fragment shaders match up with each shader label.
It looks like SFX_PBS_0000000000004100_VS
doesn't have the PerFrame
buffer. The only missing parameters that are actually used in SFX_PBS_0000000000000100_VS
are PerFrame_effect_light_param0
, PerFrame_effect_light_param1
, and PerFrame_effect_light_param2
. This is probably a decent heuristic for whether a shader has effect lighting or not.
You should be able to put together a script that maps shader labels to vertex shaders using the nufx JSON and checks the annotated dump for effect lighting params. I don't plan to add effect lighting to the info JSON yet since it hasn't been researched very much and isn't part of ssbh_wgpu's rendering.
Some shaders have a unique attribute to disable receival of effect lighting. The following two shader labels are emission only, but only the latter shader label disables receival of effect lighting:
The following picture demonstrates when this attribute is enabled and when it is disabled. The stage's uppermost pink surface is a separate mesh from the rest of the stage, and as a result is what is affected by the changes.