박희찬
이동윤
임보경
박희찬
이동윤
임보경
blending filter 예제
1332288646.cpp
// Default (no blending) = Cs*1
glBlendFunc(GL_ONE, GL_ZERO)
// Draw background only = Cd*1
glBlendFunc(GL_ZERO, GL_ONE)
// Cs*1 + Cd*1
glBlendFunc(GL_ONE, GL_ONE)
// Alpha blending (back-to-front) = Cs*As + Cd*(1-As)
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
// Additive blending (brighten the scene) = Cs*As + Cd*1
glBlendFunc(GL_SRC_ALPHA, GL_ONE)
// Multiplicative blending = Cd*Cs
glBlendFunc(GL_ZERO, GL_SRC_COLOR)
// Invert all the colors = Cs*(1-Cd)
glBlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ZERO)
알파블렌딩, 알파텍스쳐, fade-in/out, fog, glDepthMask(GL_FALSE), glEnable(GL_CULL_FACE), 블렌딩시 draw order, filtering, lightmap 기법
http://dis.dankook.ac.kr/lectures/cg07/entry/blending-예제
OPENGL alpha blending, fog 예제
http://dis.dankook.ac.kr/lectures/cg07/entry/OpenGL-alpha-fog-예제