From Mike Weiblen, "minor patches to osgFX consisting of changing from

"state.matrix.modelview[0]" to the equivalent "state.matrix.modelview".
Per ARB_vertex_program, the "[0]" syntax is supported only when
EXT_vertex_weighting or ARB_vertex_blend are supported."
This commit is contained in:
Robert Osfield
2005-03-18 09:37:46 +00:00
parent d801593d35
commit c30141d6be
3 changed files with 5 additions and 5 deletions

View File

@@ -144,7 +144,7 @@ namespace
"ATTRIB v16 = vertex.position;"
"PARAM s259[4] = { state.matrix.mvp };"
"PARAM s18 = state.light[" << lightnum_ << "].position;"
"PARAM s223[4] = { state.matrix.modelview[0] };"
"PARAM s223[4] = { state.matrix.modelview };"
"PARAM c0[4] = { program.local[0..3] };"
" DP4 result.position.x, s259[0], v16;"
" DP4 result.position.y, s259[1], v16;"

View File

@@ -256,7 +256,7 @@ namespace
"PARAM s77 = state.lightprod[0].specular;"
"PARAM s4 = state.material.shininess;"
"PARAM s75 = state.lightprod[0].ambient;"
"PARAM s223[4] = { state.matrix.modelview[0] };"
"PARAM s223[4] = { state.matrix.modelview };"
"PARAM c0[4] = { program.local[0..3] };"
" MOV result.texcoord[" << freeunit << "].xyz, s75.xyzx;"
" MOV result.texcoord[" << freeunit << "].w, s4.x;"
@@ -454,7 +454,7 @@ namespace
"ATTRIB v16 = vertex.position;"
"PARAM s259[4] = { state.matrix.mvp };"
"PARAM s18 = state.light[" << lightnum_ << "].position;"
"PARAM s223[4] = { state.matrix.modelview[0] };"
"PARAM s223[4] = { state.matrix.modelview };"
" MOV result.texcoord[" << diffuseunit_ << "].xy, v25;"
" MOV result.texcoord[" << normalunit_ << "].xy, v24;"
" DP3 R0.y, s223[0].xyzx, v3.xyzx;"
@@ -517,7 +517,7 @@ namespace
"ATTRIB v16 = vertex.position;"
"PARAM s259[4] = { state.matrix.mvp };"
"PARAM s18 = state.light[" << lightnum_ << "].position;"
"PARAM s631[4] = { state.matrix.modelview[0].invtrans };"
"PARAM s631[4] = { state.matrix.modelview.invtrans };"
" DP4 R0.x, s631[0], v18;"
" DP4 R0.y, s631[1], v18;"
" DP4 R0.z, s631[2], v18;"

View File

@@ -72,7 +72,7 @@ namespace
"PARAM s18 = state.light[" << lightnum_ << "].position;"
"PARAM s16 = state.light[" << lightnum_ << "].diffuse;"
"PARAM s1 = state.material.diffuse;"
"PARAM s631[4] = { state.matrix.modelview[0].invtrans };"
"PARAM s631[4] = { state.matrix.modelview.invtrans };"
"MOV R0, s1;"
"MUL result.color.front.primary, R0, s16;"
"DP4 R0.x, s18, s18;"