-
Notifications
You must be signed in to change notification settings - Fork 203
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
MAYA-111691 cards draw mode #1463
Conversation
stReader.parameters[_tokens->varname] = _tokens->cardsUv; | ||
outNet.nodes.push_back(stReader); | ||
stPrimvarReader = &outNet.nodes.back(); | ||
outNet.primvars.push_back(_tokens->cardsUv); |
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.
This is only correct for the cards draw mode shader. I will have to think of a way to make this safe.
if (bufferData) { | ||
const VtIntArray& primvarData = value.UncheckedGet<VtIntArray>(); | ||
|
||
VtFloatArray convertedPrimvarData; |
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.
We need this because we can't properly create vertex buffers for integer types.
(UsdPrimvarReader_color) | ||
(UsdPrimvarReader_vector) | ||
); | ||
// clang-format on | ||
|
||
TfToken _DrawModeCards | ||
= TfToken("drawMode.glslfx"); //!< can't make a token the normal way because it has a '.' in it. |
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.
There is a syntax for that in the tokens. You need to use:
((drawMode, "drawMode.glslfx"))
// To use it:
_tokens->drawMode
@@ -837,6 +863,15 @@ void HdVP2Material::_ApplyVP2Fixes(HdMaterialNetwork& outNet, const HdMaterialNe | |||
tmpNet.nodes.reserve(numNodes); | |||
tmpNet.relationships.reserve(numRelationships); | |||
|
|||
// Some material networks require us to nodes and connections to the base |
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.
There is a verb missing in that sentence.
… cube shades differently.
This should be ready to merge tomorrow once the preflight issues get resolved. |
Add support to Vp2RenderDelegate for the "cards" drawing mode.
Issue #1382.
I'll add a test using either the file from the issue or I'll create some programmer art.