Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: I dont understand the position variable in shader? #48

Open
zhanglq2024 opened this issue Mar 29, 2024 · 0 comments
Open

Question: I dont understand the position variable in shader? #48

zhanglq2024 opened this issue Mar 29, 2024 · 0 comments

Comments

@zhanglq2024
Copy link

zhanglq2024 commented Mar 29, 2024

const triangleVertices = new Float32Array([-2, -2, 2, -2, 2, 2, -2, 2]);

Why they are +-2?

position -> vPosition value never changed?

and what is meaning of the fragment shader

    float A = -dot(vPosition, vPosition);
    if (A < -4.0) discard;

Can some one give a brief explaination, appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant