Advertisement
Guest User

llvmpipe interpolation problem

a guest
Apr 9th, 2019
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. precision highp float;
  2. uniform highp sampler2D colorTex_; //16x16 8bit texture with values in [0,3] (lowest two bits). Using linear filtering.
  3. in vec2 frag_texcoord; //in [0,1] for each dimension, generated from full screen quad vertices
  4. out vec4 FragData0; // 500x500 output
  5.  
  6. void main() {
  7.     vec4 v = vec4(texture2D(colorTex_, frag_texcoord).x, vec2(0.0), 1.0);
  8.  
  9.     float umax = 255;
  10.     float uthreshold = 1;
  11.     if(v > 1.0/255) {
  12.         FragData0 = vec4(1.0, 1.0, 1.0, 1.0);
  13.     } else {
  14.         FragData0 = vec4(0.0, 0.0, 0.0, 1.0);
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement