glsl shaders

   394   2   1
User Avatar
Member
88 posts
Joined: July 2005
Offline
The documentation says it is possible, https://www.sidefx.com/docs/houdini/shade/glsl.html [www.sidefx.com]

I found a nice website stepping through the steps, https://serano-vfx-lab.hatenablog.com/entry/2020/05/11/160807 [serano-vfx-lab.hatenablog.com]

I followed and did everything exactly the same, but, it does not work. Attached is a very simple scene file and HDA, I edited the fragment shader, on line 243, I hardcode tex to be a bright purple:

tex = vec4(1.0, 0.0, 1.0, 1.0);

and it does nothing. It's shown working in the tutorial. Perhaps there was a change in the viewport since this tutorial? I don't see a lot of mention of glsl work being done,might it be broken in version 21.0.440? Is there a step I am missing?

Attachments:
glslProb.zip (947.8 KB)

User Avatar
Member
298 posts
Joined: July 2013
Offline
Are you sure you're running an OpenGL based viewport and not Vulkan one? This only works in opengl.
More code, less clicks.
User Avatar
Member
88 posts
Joined: July 2005
Offline
Hey! That worked!!

indeed, it was a vulkan viewport, when I switched there is a note that openGL viewport is deprecated.

It works, I can play around now, life is good.

However, will the option to use custom GLSL in the viewport be gone forever when the deprecated viewport is removed?
  • Quick Links