Added missing handling of lightnumber and associate lights

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15015 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield
2015-07-23 09:23:42 +00:00
parent b90bbdaebf
commit 71c6d27b57
2 changed files with 21 additions and 13 deletions

View File

@@ -258,10 +258,10 @@ namespace
"ATTRIB v18 = vertex.normal;"
"ATTRIB v16 = vertex.position;"
"PARAM s259[4] = { state.matrix.mvp };"
"PARAM s18 = state.light[0].position;"
"PARAM s77 = state.lightprod[0].specular;"
"PARAM s18 = state.light["<<_lightnum<<"].position;"
"PARAM s77 = state.lightprod["<<_lightnum<<"].specular;"
"PARAM s4 = state.material.shininess;"
"PARAM s75 = state.lightprod[0].ambient;"
"PARAM s75 = state.lightprod["<<_lightnum<<"].ambient;"
"PARAM s223[4] = { state.matrix.modelview };"
"PARAM c0[4] = { program.local[0..3] };"
" MOV result.texcoord[" << freeunit << "].xyz, s75.xyzx;"