What's the difference between per-vertex lit and per-pixel lit in Forward Rendering
In my point of view, per-vertex lit calculates lighting color in vertex shader and then pass it to fragment shader after rasterization, while per-pixel lit calculates lighting color in fragment shader with interpolated normal passed from vertex shader.
In terms of unity's Forward Rendering, it's saying that:
Data of the 4 per-vertex lights are packed in built-in variables likeIn Forward rendering, some number of brightest lights that affect each object are rendered in fully per-pixel lit mode. Then, up to 4 point lights are calculated per-vertex.
unity_4LightPosX0
,
unity_LightColor
in ShaderLab.
What confuses me is that these variables can be access both in vertex and fragment shader, so isn't it the user's choice (calculating lights color in vertex or fragment shader) to implement per-vertex or per-pixel lit on the 4 unimportant lights?
Briefly:
- What's the meaning of 'per-vertex'/'per-pixel' in the description?
- What's the limitation of the 4 unimportant lights compared with the main per-pixel light?
Your answer
![](https://koobas.hobune.stream/wayback/20220613002737im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Forward rendering Shadow Arifact 0 Answers
Forward rendering, light and shadows to bleed through meshes 0 Answers
Transparent objects not in correct position with deferred rendering in Game view. 1 Answer
Post processing effects in scene view do not match game view. 1 Answer
Weird forward rendering glitch 0 Answers