

The way this one works is that the scene blending mode is set to additive ("scene_blend add"). So three nearby lights means the mesh is redrawn 3 times over the top of the previous ambient pass (so we are now up to 4 passes total). Yep, iteration once_per_light means that pass will be repeated for every light near the mesh (there's a range you can set on each light, so distant lights don't cause passes to be drawn). Shadow_receiver_fragment_program_ref Examples/BumpMapFPShadowRcvġ、In the first ambient pass, It use a basic ambient lighting program instaead the fix-pipeline vetex function.Ģ、In ths second pass "perlight", what does "iteration once_per_light" mean? the pass will be render per every scene light? if my scene has three lights, the pass will be render three times? if so, how the three render result blend with the material? and this material will be render 5 times? Additive texture shadow receiver program Param_named_auto texViewProj texture_viewproj_matrix Param_named_auto worldMatrix world_matrix Shadow_receiver_vertex_program_ref Examples/BumpMapVPShadowRcv Param_named_auto lightDiffuse light_diffuse_colour 0 Param_named_auto lightPosition light_position_object_space 0 NB we don't do decal texture here because this is repeated per light Param_named_auto ambient ambient_light_colour Param_named_auto worldViewProj worldviewproj_matrix Vertex_program_ref Ogre/BasicVertexPrograms/AmbientOneTexture mixing fixed function and vertex programs, depth fighting can NB we don't use fixed function here because GL does not like to lighting pass categorisation routine base colours, not needed for rendering, but as information fragment programs, supports coloured lights This is the preferred technique which uses both vertex and Code: Select all material Examples/BumpMapping/MultiLight
