Sending an array (of structs) to a usf shader

anonymous_user_c8cdff6f
Sun, 27 Nov 2016 18:30:26 +0000
Rendering

I’m trying to send an array of positions (and other info) to a usf pixel shader.
I know I can send float, FMatrix, FVector stuff to the shader via the following macros:

BEGIN_UNIFORM_BUFFER_STRUCT(FMyPixelShaderVarParams

DECLARE_UNIFORM_BUFFER_STRUCT_MEMBER

DECLARE_UNIFORM_BUFFER_STRUCT_MEMBER_ARRAY

Can I send an array of floats to this FMyPixelShaderVarParams struct? - Yes, by using DECLARE_UNIFORM_BUFFER_STRUCT_MEMBER_ARRAY(float, varName, [10])

Can I send a custom struct inside this FMyPixelShaderVarParams struct? - NO? What exactly makes FVector struct eligible and mine not?

Can I send an array of structs inside FMyPixelShaderVarParams? - Same

7 posts - 6 participants