Show
Ignore:
Timestamp:
06/22/05 13:26:56 (10 years ago)
Author:
robert
Message:

From Mike Weiblen, fixes to shaders to correct modification of varying types

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgparametric/osgparametric.cpp

    r4349 r4352  
    2727    "\n" 
    2828    "    gl_TexCoord[0] = gl_Vertex; \n" 
    29     "    gl_Vertex.z = gl_Vertex.x*coeff[0] + gl_Vertex.x*gl_Vertex.x* coeff[1] + \n" 
    30     "                  gl_Vertex.y*coeff[2] + gl_Vertex.y*gl_Vertex.y* coeff[3]; \n" 
    31     "    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n" 
     29    "    vec4 vert = gl_Vertex; \n" 
     30    "    vert.z = gl_Vertex.x*coeff[0] + gl_Vertex.x*gl_Vertex.x* coeff[1] + \n" 
     31    "             gl_Vertex.y*coeff[2] + gl_Vertex.y*gl_Vertex.y* coeff[3]; \n" 
     32    "    gl_Position = gl_ModelViewProjectionMatrix * vert;\n" 
    3233    "}\n"; 
    3334   
     
    5657    "\n" 
    5758    "    gl_TexCoord[0] = gl_Vertex; \n" 
    58     "    gl_Vertex.z = texture2D( vertexTexture, gl_TexCoord[0].xy).x*0.0001; \n" 
    59     "    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n" 
     59    "    vec4 vert = gl_Vertex; \n" 
     60    "    vert.z = texture2D( vertexTexture, gl_TexCoord[0].xy).x*0.0001; \n" 
     61    "    gl_Position = gl_ModelViewProjectionMatrix * vert;\n" 
    6062    "}\n"; 
    6163