glslify / glslify/glsl-determinant

alternative formules

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5
Forks
0
PR merge metrics
No merged PRs in 30d

Description

here alternative formules:
```
float determinant(mat2 m) {
return cross(vec3(m[0],0),vec3(m[1],0)).z;
}
float determinant(mat3 m) {
return dot(m[0],cross(m[1],m[2]));
}
float determinant(mat4 m) {
vec4 b = vec4(determinant(mat3(m[1].yzw,m[2].yzw,m[3].yzw)),
-determinant(mat3(m[1].xzw,m[2].xzw,m[3].xzw)),
determinant(mat3(m[1].xyw,m[2].xyw,m[3].xyw)).
-determinant(mat3(m[1].xyz,m[2].xyz,m[3].xyz)));
return dot(m[0],b);
}
```
I hope you like it like me :)
Regards,
Antonino

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names no files, tests, or entry points. Start by locating the current determinant implementation in the repository and compare it with the supplied GLSL formulas; completion criteria are not stated, so confirm the expected implementation and validation with the maintainer.

Written by the indexing model from the issue text.

Assessment

Domain
computer-graphics
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.