-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[macOS] Fix Metal RHI 3D viewer crashes and enable qtAliceVision plugins #3030
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
base: develop
Are you sure you want to change the base?
Changes from all commits
748437d
d4c6408
926ba92
c250f24
a2513cf
517ff1d
1cc3f83
167a26c
6bd7eb7
4097642
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -95,9 +95,9 @@ Entity { | |
| DiffuseMapMaterial { | ||
| id: textured | ||
| objectName: "TexturedMaterial" | ||
| ambient: root.ambient | ||
| shininess: root.shininess | ||
| specular: root.specular | ||
| ambient: "#111" | ||
| shininess: 1.0 | ||
| specular: "#000" | ||
|
Comment on lines
-98
to
+100
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the reason to change that?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually the mesh preview is looking a bit phased off, like whiteish. I tried to make it look like full saturated colour but it didn't worked either and I was feeling very happy about the app is working, I directly go into PR. Tldr; it just a mess I forgot to revert |
||
| diffuse: TextureLoader { | ||
| magnificationFilter: Texture.Linear | ||
| mirrored: false | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| #version 330 core | ||
|
|
||
| in vec3 worldPos; | ||
|
|
||
| out vec4 fragColor; | ||
|
|
||
| uniform vec3 shCoeffs[9]; | ||
| uniform bool displayNormals; | ||
|
|
||
| vec3 resolveSH_Opt(vec3 premulCoefficients[9], vec3 dir) | ||
| { | ||
| vec3 result = premulCoefficients[0] * dir.x; | ||
| result += premulCoefficients[1] * dir.y; | ||
| result += premulCoefficients[2] * dir.z; | ||
| result += premulCoefficients[3]; | ||
| vec3 dirSq = dir * dir; | ||
| result += premulCoefficients[4] * (dir.x * dir.y); | ||
| result += premulCoefficients[5] * (dir.x * dir.z); | ||
| result += premulCoefficients[6] * (dir.y * dir.z); | ||
| result += premulCoefficients[7] * (dirSq.x - dirSq.y); | ||
| result += premulCoefficients[8] * (3.0 * dirSq.z - 1.0); | ||
| return result; | ||
| } | ||
|
|
||
| void main() | ||
| { | ||
| // Compute flat face normal from screen-space position derivatives | ||
| vec3 normal = normalize(cross(dFdx(worldPos), dFdy(worldPos))); | ||
|
|
||
| if (displayNormals) { | ||
| fragColor = vec4(normal, 1.0); | ||
| } | ||
| else { | ||
| fragColor = vec4(resolveSH_Opt(shCoeffs, normal), 1.0); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| #version 330 core | ||
|
|
||
| in vec3 vertexPosition; | ||
|
|
||
| out vec3 worldPos; | ||
|
|
||
| uniform mat4 modelMatrix; | ||
| uniform mat4 mvp; | ||
|
|
||
| void main() | ||
| { | ||
| worldPos = (modelMatrix * vec4(vertexPosition, 1.0)).xyz; | ||
| gl_Position = mvp * vec4(vertexPosition, 1.0); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.