WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 11-26-2007, 09:49 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
It seems like Mental Mill did not produce valid GLSL code. The warnings should not be a big deal. However, there is an error in the fragment shader. GLSL has no saturate function. Even without this error, you will still need to do a lot more to get the shader working. The vertex and fragment shaders depend on runtime uniforms, which you have not declared in your script. Your vertex shader requires the following uniforms:
Code:
uniform float flip_normal;
And your fragment shader requires these:
Code:
//
// The following are free parameters of the shader
// that should be set by the application at runtime.
//
uniform vec4 msl_light0_color;
uniform float msl_light0_intensity;
uniform float msl_light0_distance_falloff_exponent;
uniform float msl_light0_distance_falloff_start;
uniform float msl_light0_distance_falloff_limit;
uniform float msl_light0_distance_scale;
uniform vec3 msl_light0_position;
uniform sampler2D msl_Texture_lookup_2d_4_texture;
uniform sampler2D msl_Texture_lookup_2d_3_texture;
uniform sampler2D msl_Texture_lookup_2d_2_texture;
uniform sampler2D msl_Texture_lookup_2d_1_texture;
uniform float msl_Component_phong_1_specular_shininess;
uniform vec4 msl_Generator_blend_ramp_1_colors[4];
uniform float msl_Layer_posterize_1_steps;
uniform vec4 msl_Math_color_add_1_right;
uniform float msl_Generator_outline_1_threshold;
uniform vec4 msl_Generator_outline_1_line_color;
uniform vec4 msl_Generator_outline_1_fill_color;
The shader examples that come with Vizard show to create and apply shader uniforms.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:13 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC