why need c_scr?
Closed this issue · 1 comments
Wu-Xiuchao commented
Hi~
I am reading the shader code now. And I have already been clear about most of them.
However , in attribure_vs.glsl
, I am confused about c_scr
, which is computed as follows:
Out.c_scr = vec2((p_scr.xy + 1.0) * viewport.zw * 0.5);
I know p_scr
is the point c
in screen space, so what does c_scr
mean? And what is the difference between them?
Wu-Xiuchao commented
OK, I think I have figured it out.
Because p_scr
is in the range [-1,1]
, and c_scr
use pixel
unit.