Ignore:
Timestamp:
Nov 19, 2012, 1:45:47 AM (10 years ago)
Author:
sam
Message:

neercs: do not pass the texture coordinates from the application to
the GL server; instead, simply deduce them from the vertex coordinates
and interpolate them in the fragment shader.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/neercs/video/copper.lolfx

    r1978 r2092  
    33#version 120
    44
     5varying vec2 pass_TexCoord;
     6
    57void main()
    68{
    79    gl_Position = gl_Vertex;
    8     gl_TexCoord[0] = gl_MultiTexCoord0;
     10    pass_TexCoord = vec2(0.5, 0.5) + 0.5 * gl_Vertex.xy;
    911}
    1012
     
    1214
    1315#version 120
     16
     17varying vec2 pass_TexCoord;
    1418
    1519uniform sampler2D texture;
     
    2125void main(void)
    2226{
    23     vec2 p = gl_TexCoord[0].xy;
     27    vec2 p = pass_TexCoord;
    2428    vec3 source = texture2D(texture, p).xyz;
    2529
Note: See TracChangeset for help on using the changeset viewer.