You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m trying to implement a billboard effect via a custom shader and looked into MeshRenderFeature. The system seems quite extensive, and building a new RenderFeature appears challenging. I’ve drafted an alternative approach but would like some feedback.
I thought implementing a MaterialFeature might work, so I set up a local Stride deployment and made some experimental modifications—likely not elegant, but functional. I added a List<IMaterialFeature> to MaterialAttributes and inserted a loop in the relevant method: context.Visit(feature). This should allow injecting completely separate material features, I hope that.
This feature would be similar to Displacement, but also fetch the View matrix (from Transformation in the shader streams). I’m unsure which position value I should modify—from what I see in Displacement, it could be either Position or PositionWS (depending on MaterialShaderStage). Is that correct?
The documentation doesn’t explain how MaterialFeature works in depth, but I assume I need to implement GenerateShader to mix shaders into the pipeline and bind the necessary resources. I’ve seen various APIs used across official examples—is there a more systematic guide available?
I’m new to graphics programming, so apologies if this is a basic question. Any advice would be greatly appreciated!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I’m trying to implement a billboard effect via a custom shader and looked into
MeshRenderFeature. The system seems quite extensive, and building a newRenderFeatureappears challenging. I’ve drafted an alternative approach but would like some feedback.I thought implementing a
MaterialFeaturemight work, so I set up a local Stride deployment and made some experimental modifications—likely not elegant, but functional. I added aList<IMaterialFeature>toMaterialAttributesand inserted a loop in the relevant method:context.Visit(feature). This should allow injecting completely separate material features, I hope that.This feature would be similar to
Displacement, but also fetch theViewmatrix (fromTransformationin the shader streams). I’m unsure which position value I should modify—from what I see inDisplacement, it could be eitherPositionorPositionWS(depending onMaterialShaderStage). Is that correct?The documentation doesn’t explain how
MaterialFeatureworks in depth, but I assume I need to implementGenerateShaderto mix shaders into the pipeline and bind the necessary resources. I’ve seen various APIs used across official examples—is there a more systematic guide available?I’m new to graphics programming, so apologies if this is a basic question. Any advice would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions