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 ?
Custom GLSL shader
1535 3 2- Dronson
- Member
- 41 posts
- Joined: 6月 2009
- Offline
- EricSheng
- Member
- 159 posts
- Joined: 2月 2018
- Offline
- malexander
- スタッフ
- 5159 posts
- Joined: 7月 2005
- Online
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.
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
- Member
- 41 posts
- Joined: 6月 2009
- Offline
-
- Quick Links