Hi, I am using a custom GLSL shader with Urho3D (1.5). I have managed to get the shader to properly compile (taking some work to get around resource path handling for shaders…).
I have two “uniform sampler2D” parameters y_tex and uv_tex (in GLSL file sy_tex and suv_tex, per the convention of Urho3D).
I need to pass in image data I acquired elsewhere in to the shader as the value of these two parameters. What is the proper way to do so? I know it should be done via SetShaderParameter(“y_tex”, Variant(…));
but how do I create the Variant?
There are examples to pass in simple values like a Vector2 or Vector3. But
I see no example code to bind a two dimensional image, or just as a blob (a C char buffer), to such a GLSL shader parameter of type “uniform samplr2D”. Thanks for any information.