Show
Ignore:
Timestamp:
05/28/09 15:40:54 (5 years ago)
Author:
robert
Message:

From Wojciech Lewandowski, "I suppose this error is caused by using 4 component tex coord in texture2D call. I always forget about adding .xy swizzle at the end of tex coord. I have attached code (hopefully fixed). My NVidia seems to ignore such errors. Cannot test it myself. Simple example works because I actually use textture2Dproj there."

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgshadercompositor/CreateAdvancedHierachy.cpp

    r10271 r10284  
    391391            "void main(void)                                                         \n" 
    392392            "{                                                                       \n" 
    393             "    gl_FragColor = gl_Color * texture2D( baseTexture, gl_TexCoord[0] ); \n" 
     393            "    gl_FragColor = gl_Color * texture2D( baseTexture,gl_TexCoord[0].xy);\n" 
    394394            "}                                                                       \n" 
    395395            ); 
     
    578578"     specular += gl_LightSource[i].specular * pf;                          \n" //23 
    579579"}                                                                          \n";//24 
     580