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

librender: Proper homogenous clipping #68

Open
jbush001 opened this issue Jun 23, 2017 · 2 comments
Open

librender: Proper homogenous clipping #68

jbush001 opened this issue Jun 23, 2017 · 2 comments
Labels

Comments

@jbush001
Copy link
Owner

Currently the perspective transform does not divide z by w. The view volume is z (-1.0 -> -inf), which is nonstandard and will break non-floating point depth buffers.

http://fabiensanglard.net/polygon_codec/
http://research.microsoft.com/pubs/73937/p245-blinn.pdf
http://www.cs.unc.edu/~olano/papers/2dh-tri/
http://www.songho.ca/opengl/gl_projectionmatrix.html

@jbush001
Copy link
Owner Author

Also properly perform guard band clipping against all planes (currently is only near)

duvitech-llc pushed a commit to duvitech-llc/NyuziProcessor that referenced this issue Jan 14, 2018
- Disable packed structs, since Nyuzi doesn't support unaligned accesses
- Disable 64-bit types, per issue jbush001#68. Since my 64-bit host has a different
  size for (long int), this could result in different conversions.

[ci skip]
@jbush001
Copy link
Owner Author

jbush001 commented Apr 1, 2018

Here is clipping code in the SwiftShader project (this is done on polygons instead of triangles, but the concepts should be similar):

https://github.com/google/swiftshader/blob/master/src/Renderer/Clipper.cpp

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

No branches or pull requests

1 participant