Repository navigation
Render noisy_squares2d on OSL - #104
Merged
ppenenko merged 2 commits intoNov 12, 2026
Merged
Conversation
Bump contrib/metashade to the osl-vector2 branch, which models MaterialX's OSL vector2 as a vector type with arithmetic operators, and add the generated OSL noisy_squares2d library refs and shader baseline. Render the node on every backend with the _AllBackends mixin. Signed-off-by: Pavlo Penenko <pavlo.penenko@autodesk.com>
Member
Author
Looks different from #103: each color comes from a |
Signed-off-by: Pavlo Penenko <pavlo.penenko@autodesk.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Renders the Metashade
noisy_squares2dnode on OSL as well as GLSL. Companion to metashade/metashade#282, which lets Metashade generate the node for OSL.contrib/metashadeto the Fixes for static analysis warnings AcademySoftwareFoundation/MaterialX#282 branch. It models MaterialX's OSLvector2as a vector type with the arithmetic operators that MaterialX'svector2.hoverloads.metashade_ref/libraries/noisy_squares2d/, plus the OSL shader baseline.TestRenderMetashadeNoisySquares2duses the_AllBackendsmixin, likejulia2d, so it renders on GLSL and OSL.The OSL render shows the same warped cell layout as GLSL, but the cell colors differ. Each color comes from a
fract(sin(seed * k) * 43758.5453)hash, which turns tinysindifferences between the GPU and testrender into different colors. UV0's V also runs in opposite directions on the two renderers' spheres, as withjulia2d.The submodule should be bumped to the merged commit once metashade/metashade#282 is in.