Hi,
Is it possible to write and read SetVisualizer information in other applications? I tried adding SetVisualizer data to the LookDev USD layer but am unsure how to make Maya recognize the gl_surface_shaders.
Here’s the data written from Gaffer into my Look USD:
def Scope "gl_surface_shaders"
{
def Shader "surface"
{
uniform token info:id = "gl:SetVisualiserSurface"
color3f[] inputs:colors = [(0.07019112, 0.38683665, 0.30409783), (0, -5.3495846e32, 4.2e-43), (2.4e-44, 0, 2.5e-44), (0, 0, 0), (0.12881425, 2.0712247e29, -4.0125048e37), (2.7432184e-19, 1e-45, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0)]
string inputs:gl:fragmentSource = """#if __VERSION__ <= 120
#define in varying
#endif
uniform vec3 colors[9];uniform int numColors;uniform float stripeWidth;in vec3 fragmentN;in vec3 fragmentI;void main(){\tfloat f = abs( dot( normalize( fragmentI ), normalize( fragmentN ) ) );\tgl_FragColor = vec4( f, f, f, 1.0 );\tif( numColors > 0 )\t{\t\tfloat stripeIndex = floor( (gl_FragCoord.x - gl_FragCoord.y) / stripeWidth );\t\tstripeIndex = mod( stripeIndex, float(numColors) );\t\tgl_FragColor = ( gl_FragColor * 0.8 + 0.2 ) * vec4( colors[ int(stripeIndex) ], 1.0 );\t}}"""
int inputs:numColors = 1
float inputs:stripeWidth = 10
token outputs:DEFAULT_OUTPUT
}
}
How can I make Maya recognize this gl_surface_shaders data?
- Sudarshan