-
Sub-task
-
Resolution: Fixed
-
P3
-
internal
-
jfx-sandbox: metal branch
-
os_x
Currently we have single Phong vertex and fragment shader, which handle maximum 3 lights.
In scenarios when there is only one light, The shader ends up in causing more processing during rasterization when interpolating attributes that are passed from vertex shader to fragment shader.
Due to limitation of MSL, there cannot be an array of any type in the set of attributes that are passed from vertex to fragment shader.
Hence, the alternative is to have separate shaders based on number of lights.
In scenarios when there is only one light, The shader ends up in causing more processing during rasterization when interpolating attributes that are passed from vertex shader to fragment shader.
Due to limitation of MSL, there cannot be an array of any type in the set of attributes that are passed from vertex to fragment shader.
Hence, the alternative is to have separate shaders based on number of lights.