Skip to content

Commit

Permalink
Fixed LXS parsing of UV inlined coordinates (#392)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dade916 committed Jun 17, 2020
1 parent 240dd57 commit c4e1ddd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions release-notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
* Fixed a bug causing fireflies when using light tracing for caustics in some case (#329)
* Fixed a crash when using RemoveUnusedTextures() with Volumes (issue #377)
* Fixed a banding problem when using sphere light sources with very small radius (issue LuxCoreRender/BlendLuxCore#477)
* Fixed LXS parsing of UV inlined coordinates (#392)

Note: due to Glossycoating updated support for bump mapping on GPUs, some old scene using this kind of material/bump map combination may require some fix.

Expand Down
3 changes: 2 additions & 1 deletion src/luxcore/luxparser/luxparse.y
Original file line number Diff line number Diff line change
Expand Up @@ -1602,7 +1602,8 @@ ri_stmt: ACCELERATOR STRING paramlist

if (props.IsDefined("uv")) {
Property uvsProps = props.Get("uv");
if ((uvsProps.GetSize() == 0) || (uvsProps.GetSize() != pointsProp.GetSize()))
if ((uvsProps.GetSize() == 0) || (uvsProps.GetSize() % 2 != 0) ||
(uvsProps.GetSize() / 2 != pointsProp.GetSize() / 3))
throw runtime_error("Wrong trianglemesh/mesh uv list length: " + objName);
// Copy all uvs
*sceneProps <<
Expand Down

0 comments on commit c4e1ddd

Please sign in to comment.