กลับมาเขียน Blog อีกครั้งหลังจากหยุดไปเป็นปีเนื่องจากข้ออ้างง่ายๆ คือ Blogger ใช้แล้วไม่ถูกใจ (+ขี้เกียจและอื่นๆ)
รอบนี้ไม่มีข้ออ้างแล้วเพราะเซ็ตเองกับมือด้วย WordPress
โปรดติดตามตอนต่อไป
กลับมาเขียน Blog อีกครั้งหลังจากหยุดไปเป็นปีเนื่องจากข้ออ้างง่ายๆ คือ Blogger ใช้แล้วไม่ถูกใจ (+ขี้เกียจและอื่นๆ)
รอบนี้ไม่มีข้ออ้างแล้วเพราะเซ็ตเองกับมือด้วย WordPress
โปรดติดตามตอนต่อไป
น้ำจิ้มสุกี้
- ซอสพริก แบบไม่เผ็ด ปกติใช้ยี่ห้อเด็กสมบูรณ์ 5 ส่วน
- ซอสมะเขือเทศ 2 ส่วน
- น้ำมันหอย 1 ส่วน
- น้ำมันงานิดหน่อย
- กระเทียมสับ 1 ส่วน
- กระเทียมดอง 1 ส่วน (ไม่ใส่ก็ได้)
- ผักชีสับ
- งาคั่ว
แต่คงจะแค่กินแล้วรู้สึกเหมือนมากกว่า
ประจำครับพี่น้อง
เตะๆอยู่ก็อยากชกมวยซะงั้น
http://www.qtsoftware.com/about/licensing
Vertex Shader
varying vec2 pos;
void main(void) {
pos = vec2(gl_Vertex.xy);
gl_Position = ftransform();
}
Fragment Shader
uniform sampler2D image;
uniform sampler3D lookup;
uniform float imageWidth;
uniform float imageHeight;
varying vec2 pos;
void main(void)
{
//find the texture coordinate corresponding to this fragment
vec2 texCoord = vec2(pos.x/imageWidth, pos.y/imageHeight);
//get the corresponding color
vec4 colorIn = texture2D(image, texCoord);
//apply look up tables
vec4 colorOut;
colorOut.rgb = texture3D(lookup, colorIn.rgb).rgb;
//final color
gl_FragColor = colorOut;
}
Multitexturing
glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, imageName); glActiveTexture(GL_TEXTURE1); glBindTexture(GL_TEXTURE_3D, lutName);
Set Texture in Shader Program
texLoc = glGetUniformLocation(programObj, "image"); glUniform1i(texLoc, 0); //texture0 texLoc = glGetUniformLocation(programObj, "lookup"); glUniform1i(texLoc, 1); //texture1
Note: