提交 0b621c65 编写于 作者: M Mr.doob

Revert "Share isPerspective code"

This reverts commit cfb584d9.
上级 649d51f4
......@@ -109,11 +109,5 @@ float linearToRelativeLuminance( const in vec3 color ) {
return dot( weights, color.rgb );
}
bool isPerspectiveMatrix( mat4 projectionMatrix ) {
return projectionMatrix[ 2 ][ 3 ] == - 1.0;
}
`;
......@@ -20,7 +20,7 @@ void main() {
#ifdef USE_SIZEATTENUATION
bool isPerspective = isPerspectiveMatrix( projectionMatrix );
bool isPerspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 );
if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );
......
......@@ -20,7 +20,7 @@ void main() {
#ifndef USE_SIZEATTENUATION
bool isPerspective = isPerspectiveMatrix( projectionMatrix );
bool isPerspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 );
if ( isPerspective ) scale *= - mvPosition.z;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册