Closed Mirocos closed 2 years ago
I finally solved my confusion abount problem 2
, But still left with 1
& 3
ascl.x
and ascl.y
are horizontal/vertical scaling factors for bary differentials, and they depend on both triangle area and viewport resolution. For example, if the viewport resolution is doubled, the bary differentials are halved as they measure change per pixel. The uniform vec2 vp_scale
has the global scaling factors due to viewport resolution, and its value is set on line 478.I finally solved my confusion abount problem
2
, But still left with1
&3
Could you explain more about question 2?
Hi, I was confused when i read the geometry shader in
rasterize.cpp
. Also, I read the related issue #49. But I am still confused with some questions:both
d(u/w)dX
andd(1/w)
are constant over triangle, I can understand a lit why letu = (u/w) / (1/w)
by reading the reference thesis showed in #49, but what's the actually formulation?why
dudx = e1.y * ascl.x
?what is
ascl
?Those two questions have puzzled me so much that I can't find any helpful reference to get a true answer. So If you have a little bit time, can you help me with it?