mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-13 00:07:24 +00:00
Color support
This commit is contained in:
parent
980d791028
commit
0a4b8ef70e
@ -2,10 +2,11 @@ varying vec3 pos;
|
||||
uniform vec3 StripeDir;
|
||||
uniform float Fuzz=.1;
|
||||
uniform float Width=0.5;
|
||||
uniform float Scale=1.0;
|
||||
void main (void)
|
||||
{
|
||||
vec4 color;
|
||||
float scalar_pos=dot(StripeDir,pos);
|
||||
float scalar_pos=dot(Scale*StripeDir,pos);
|
||||
float scaled_pos=fract(scalar_pos*10.0) ;
|
||||
color = gl_Color;
|
||||
|
||||
@ -16,6 +17,5 @@ void main (void)
|
||||
frac1 = frac1 * frac1 * (3.0 - (2.0 * frac1));
|
||||
|
||||
color.a=mix(0,1,frac1);
|
||||
|
||||
gl_FragColor = color;
|
||||
}
|
||||
|
||||
@ -21,19 +21,16 @@
|
||||
</FPCount>
|
||||
<TexturesPlugins NumberOfPlugins="0" />
|
||||
<TexturedUsed NumberUsedTU="0" />
|
||||
<UniformVariables NumberOfVariables="4">
|
||||
<Uniform0 Type="5" Name="Scale" ArraySize="1" Widget="0" Min="0" Max="1" Step="0.001">
|
||||
<Values Value0="10" />
|
||||
<UniformVariables NumberOfVariables="3">
|
||||
<Uniform0 Type="5" Name="Scale" ArraySize="1" Widget="0" Min="0" Max="100" Step="0.1">
|
||||
<Values Value0="1" />
|
||||
</Uniform0>
|
||||
<Uniform1 Type="7" Name="Ambient" ArraySize="1" Widget="0" Min="0" Max="1" Step="0.001">
|
||||
<Values Value0="0.2" Value1="0.2" Value2="0.2" />
|
||||
<Uniform1 Type="5" Name="Width" ArraySize="1" Widget="0" Min="0" Max="1" Step="0.01">
|
||||
<Values Value0="0.5" Value1="0.5" Value2="0.5" />
|
||||
</Uniform1>
|
||||
<Uniform2 Type="5" Name="Kd" ArraySize="1" Widget="0" Min="0" Max="1" Step="0.001">
|
||||
<Values Value0="0.8" />
|
||||
</Uniform2>
|
||||
<Uniform3 Type="7" Name="StripeDir" ArraySize="1" Widget="0" Min="0" Max="1" Step="0.001">
|
||||
<Uniform2 Type="7" Name="StripeDir" ArraySize="1" Widget="0" Min="0" Max="1" Step="0.001">
|
||||
<Values Value0="0" Value1="1" Value2="0" />
|
||||
</Uniform3>
|
||||
</Uniform2>
|
||||
</UniformVariables>
|
||||
<FogParameters FogColorR="0" FogColorG="0" FogColorB="0" FogColorA="1" Density="1" Start="0" End="1" />
|
||||
<VertexProcessor CullFace="False" PolygonMode="DummieField" PolygonModeBack="6914" PolygonModeFront="6914" LocalValue="1" TwoSidedValue="1" ColorControlValue="33273" />
|
||||
|
||||
@ -47,8 +47,10 @@ varying vec3 pos;
|
||||
directionalLight(0, normal);
|
||||
|
||||
color = gl_FrontLightModelProduct.sceneColor +
|
||||
Ambient * gl_FrontMaterial.ambient +
|
||||
Diffuse * gl_FrontMaterial.diffuse;
|
||||
// Ambient * gl_FrontMaterial.ambient +
|
||||
// Diffuse * gl_FrontMaterial.diffuse;
|
||||
Ambient * gl_Color +
|
||||
Diffuse * gl_Color;
|
||||
color += Specular * gl_FrontMaterial.specular;
|
||||
color = clamp( color, 0.0, 1.0 );
|
||||
gl_FrontColor = color;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user