GLSL Vertex Noise: Keep Kineme GL Spline Color?

jersmi's picture

Using the dev GLSL example vertex noise shader, I'd like to keep the original color of the spline in this comp. How can I do this?

PreviewAttachmentSize
splineNoise_GLSL.qtz23.33 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

cybero's picture
Re: GLSL Vertex Noise: Keep Kineme GL Spline Color?

I thought I'd twigged an answer, but only found that the Surface Color confounds your aim. GLSL code needs to be able to allow for the Spline objects colour settings to be rendered and included in the resulting final render. Almost all attempts at this end, once I'd figured that I'd misled myself earlier, failed to resolve the issue.

varying vec4 Color;
 
void main (void)
{
    gl_FragColor = Color * gl_Color;
}

this change to the fragment shader should move you closer, include some of the toneburst Color shader stuff within tb_VTF_vBomb_0.5.qtz to be found elsewhere upon this site and you should be making real leaps forward.

for instance the addition of the following into the vertex shader after the gl_Position would also help no end.

{.....
    gl_FrontColor = gl_Color;
}

with a nod of thanks to toneburt's noise bomb example, [also Rideout vertexnoise shader based]. Should also have emntioned the Lighthouse tutorials http://www.lighthouse3d.com/tutorials/glsl-tutorial/color-shader/ - good GLSL exemplar / tutorial set.

PreviewAttachmentSize
splineNoise_GLSL_1.qtz23.46 KB

jersmi's picture
Re: GLSL Vertex Noise: Keep Kineme GL Spline Color?

Thanks so much, cybero. I was looking at toneburst's vBomb but couldn't put the answer together.

cybero's picture
Re: GLSL Vertex Noise: Keep Kineme GL Spline Color?

The answer was found on Lighthouse's tutorial, whilst toneburst's GLSL example was also exploiting the Model Projection Matrix.

jersmi's picture
Re: GLSL Vertex Noise: Keep Kineme GL Spline Color?

Excellent! Thanks again for looking into it.