From the existing glslfx examples in openusd repo, looks like there’s no direct way to connect a texture to asset file in glslfx shader. E.g., you can write this code below to sample texture in glslfx shader, but, you can’t connect a file to the diffuse_texture directly in glslfx, I have to connect using hydra material APIs, is there a simpler way like an file field to accept a file path directly.
– configuration
{
“textures”: {
“diffuse_texture”: {
“description”: “diffuse color texture”,
"file": "path/to/my/diffuse.jpg" <---Do we have such a field?
}
vec4 surfaceShader(vec4 Peye, vec3 Neye, vec4 color, vec4 patchCoord)
{
// Sample texture values
vec3 color3 = HdGet_diffuse_texture();
…
Keli