Hi,
I am looking deeply into the implementation of the Hydra plugin.
One thing I found out about USD 20.08, I will describe it.
For example, when using the Hydra plugin for Blender Cycles, an error occurs in the selection operation.
Coding Error (secondary thread): in SetProgram at line 163 of xxx\pxr\imaging\hdx\fullscreenShader.cpp -- Failed to create HdxFullscreenShader shader program
Coding Error (secondary thread): in HgiGLShaderProgram at line 51 of xxx\pxr\imaging\hgiGL\shaderProgram.cpp -- Failed verification: ' id>0 ' -- Invalid shader provided to program
I am looking into the implementation of the Hydra plugin and have found that the implementation to get around this would take a tremendous amount of man-hours.
(if resolved within the Hydra plugin)
Note that Storm does not seem to go through the path that causes this error.
Upon investigation, it seems to be due to the use of “gl_FragColor” in the GLSL Shader in Hydra’s hdx, which is legacy.
proposed amendment
Fix fullscreen.glslfx and outline.glslfx in hdx.
I replaced it with an implementation that does not use gl_FragColor.
out vec4 out_color; // Here!
void main(void)
{
float depth = texture(depth, uv).r;
//gl_FragColor = texture(color, uv);
out_color = texture(color, uv); // Here!
gl_FragDepth = depth;
}
(I am not sure if fullscreen.glslfx is receiving the color of the output)
I have uploaded the modified glslfx file here.
fullscreen_outline_glslfx.zip (4.0 KB)
GLSL Shader seemed to be good enough to adjust the files in the following folder.
create-2022.1.5/kit/extscore/omni.usd.libs/bin/usd/hdx/resources/shaders
With this modification, Blender Cycles now works as follows.
In the Hydra plugin implementation, the difficulty level seemed to increase dramatically when implementing our own highlighting process for this selection.
I am experiencing the same issue with USDView in USD 20.08.
This is just a workaround, but could you please work around this error in the highlighting process on the Omniverse Hydra side?
Confirmation environment
- Windows 10
- Omniverse Create 2022.1.5