I’m working on Fur effect. How to use multipass? And each pass can tell shader the pass_index.
Is this different with pass in filter?
This is a fur vert.
uniform float shell_distance;
uniform float pass_index;
varying vec2 vTexCoord;
vTexCoord = gl_MultiTexCoord0.xy;
vec4 Position = gl_Vertex;
Position.xyz += shell_distance * pass_index * gl_Normal;
gl_Position = gl_ModelViewProjectionMatrix * Position;
I tried a fur effect about a year ago or so. I’ve used instancing instead of multiple render passes. Maybe this would also be an option for you, because only one render call is needed.
Thank you very much. It working well after I switch opengl version. I think I can use for grass.
Although with the test of the fur, but I still want to know how to use multipass on a material?