v0.1.0
This creates an adaptor layer for Brax, behaves very similarly to erwincoumans/tinyrenderer
Extracted change log
- For built-in fragment shader outputs, a new field
use_default_depth
is added (defaultFalse
) instead of relying on checking ifgl_FragDepth
isNaN
. - Change
ZBuffer
value meaning to OpenGL convention: all values are non-negative, and the smaller the value, the closer the point is to the camera. - Change default
Shader.mixer
behaviour: now it picks the fragment with minimum depth valuegl_FragDepth
. - Change
shadow.py::Shadow.render_shadow_map
according to the z-value definition change, to add into the shadow map instead of subtracting so to move shadow maps further away from the "camera" (light). - Change
shaders/phong_reflection_shadow
according to the z-value definition change. - Transform shadow coordinates in VS (world => NDC) and FS (NDC => screen) instead of transforming in FS (model's screen => world => screen) to avoid precision loss in inverse matrix computation.
- Fix issue of perspective-correction barycentric interpolation in
pipeline
. - Fix
shaders/phong*
so normals are correctly transformed into pre-projection eye coordinates, rather than being projected. - Rename
ModelView
=>View
,model_view
=>view
,model_view_matrix
=>view_matrix
as the matrix is actually view matrix that transforms from world to eye space, not model view matrix (model to eye space).
Full Changelog: https://github.com/JoeyTeng/jaxrenderer/commits/v0.1.0