-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cloud-picture): fix "if has two render geometries, the second on…
…e's tangents sended to vertex buffer is wrong" solution add get/set tangents api; compute tangents when create sphere/plane/triangle geometries; fix UpdatePathTracingCPJobEntity->_buildAndSetVertexBufferData: now get tangents from geometry po without compute;
- Loading branch information
Showing
20 changed files
with
281 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
.../domain_layer/domain/scene/scene_graph/service/geometry/ComputePointsGeometryDoService.re
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
open Js.Typed_array; | ||
|
||
let addTangents = ((vertices, texCoords, normals, indices)) => { | ||
let (vertices, texCoords, normals, indices) = ( | ||
Float32Array.make(vertices), | ||
Float32Array.make(texCoords), | ||
Float32Array.make(normals), | ||
Uint32Array.make(indices), | ||
); | ||
|
||
( | ||
vertices, | ||
texCoords, | ||
normals, | ||
TangentsGeometryDoService.computeTangents( | ||
vertices->VerticesVO.create, | ||
texCoords->TexCoordsVO.create, | ||
normals->NormalsVO.create, | ||
indices->IndicesVO.create, | ||
) | ||
->TangentsVO.value, | ||
indices, | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 14 additions & 17 deletions
31
.../domain_layer/domain/scene/scene_graph/service/geometry/CreateDefaultGeometryDoService.re
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.