OpenGL

QT with OpenGL(Shadow Mapping)(平行光篇)-卡核

QT with OpenGL(Shadow Mapping)(平行光篇)

一. 给平行光添加阴影 1. 生成一张深度帧缓存 glwidget.h //-----------------测试参数 QOpenGLFramebufferObject* depthMapFBO; const unsigned int SHADOW_WIDTH = 1024, SHADOW_HEIGHT ...
Elsa的迷弟的头像-卡核Elsa的迷弟
1960
第十五课,混合-卡核

第十五课,混合

丢弃片段 将透明度小于一定阈值的片段完全丢弃。 vec4 texColor = texture(texture1, TexCoords); if(texColor.a < 0.1) discard; FragColor = texColor; discard将该点颜色完全丢...
Elsa的迷弟的头像-卡核Elsa的迷弟
1330