Search - User list
Full Version: Custom GLSL shader
Root » Technical Discussion » Custom GLSL shader
Dronson
This aspect is not good explain in documentation.

May be i something not understand correctly but i have several question:

1. Can i create my own custom GL-tag, for use in Frag/Vertex context ? Or may be any other way for use custom user data from Houdini parameter's in GL shader context ?
2. How i can get correct name GL-tag in OpenGL context ?

For example:
If i use buil-in tag “ogl-emit” in OpenGL context variable name is: emission_color.
But i want use buit-in tag “ogl-emit_intensity” ? What is correct name this variable in OpenGL context ? Where i can find this info ?
EricSheng
Sadly, Houdini's OpenGL is as poor as the COP module.
malexander
It seems like some of the documentation for custom GLSL shaders may have been lost when GL tags were introduced. The tags are for binding parameters to our viewport shader. For a custom shader, you only need to name the OP parameter the same as your GLSL uniform, with the same structure (eg, vec3 = Color or Float Vector 3, float = float, sampler2D = File-Image). So you really don't need tags for custom shaders.

Geometry inputs are also named the same as their Houdini attributes (P, N, uv, Cd, etc. “in vec3 P”). It becomes a little tricky if you're accessing Vertex or Primitive attributes as they aren't supported by GL, so they are emulated with a geometry shader and a TBO. You can see how this works in the ogl3_default_glsl_shader.vert/geom files in $HFS/houdini/glsl/asset.
Dronson
twod - thankyou very much! Its so simple )) and all works fine!
Thankyou!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB