Force reload of GLSL .prog file for Viewport Shader?

   1035   2   0
User Avatar
Member
95 posts
Joined: Feb. 2020
Offline
Is there anyway to force a material VOP node to reload the .prog file specified in the ogl_glsl_shader
param? Right now i have to manually change the value, or reselect the file in order for the new shader code to get loaded.
Edited by wyhinton1 - Dec. 8, 2024 20:32:00

Attachments:
glslshaderfileparm.png (102.5 KB)

User Avatar
Staff
5295 posts
Joined: July 2005
Offline
No, there's currently no other way to do this if the files were externally changed.

In 20.0+, MaterialX is the recommended way to design surface shaders rather than direct GLSL (it automatically generates GLSL with all our conventions and required helper functions, and also works for Vulkan).
User Avatar
Member
95 posts
Joined: Feb. 2020
Offline
malexander
No, there's currently no other way to do this if the files were externally changed.

In 20.0+, MaterialX is the recommended way to design surface shaders rather than direct GLSL (it automatically generates GLSL with all our conventions and required helper functions, and also works for Vulkan).


I see, thanks for the reply, thats helpful!

You don't think there's some work around that would involve tricking houdini into thinking the param value changed by duplicating the "file selected" Qt event?


This is my work around atm, which makes updating a little better than typing in a new path.

A store button saves the .prog file path in the houdini session, a clear button sets the ogl_glsl_shader parm to an empty string, then the retrieve button sets it back to the original value. This causes the changes to show.
Edited by wyhinton1 - Dec. 9, 2024 03:31:01

Attachments:
PARM_BUTTON_WORKAROUND.png (35.6 KB)

  • Quick Links