How exactly does fragment shader work for texturing?

后端 未结 2 421
南旧
南旧 2021-01-14 20:12

I am learning opengl and I thought I pretty much understand fragment shader. My intuition is that fragment shader gets applied once to every pixel but recently when working

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-14 20:32

    first : in core context you still can use gl_FragColor.

    second : you have texel ,fragment and real_monitor_pixel.These are different things. say this line is about convert texel to fragment(or to pixel idk exactly what it does):

    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
    

    when texel is less then fragment(pixel)

提交回复
热议问题