现在基本完善了光照,纹理,天空盒,顶点引索文件载入模块,关于碰撞阅读了一些资料,写了半天渣得不忍直视,更别说物理碰撞了,这部分以后再弄吧 对于blend说一下自己的心得,首先要创建混合状态描述来修改混合状态,只有设置了混合状态才能使用透明度管道,默认是不使用的,混合过程用HLSL写,而且重要的是,混合只作用于当前要渲染的像素点和当前后置缓存中的像素点,也就是说不同物体使用DrawIndexed的顺序不同是有影响的,简单的来说就是一个物体(A)渲染过了,再去渲染其他的物体(B),那么A不会对B进行混合,因为渲染B之前A已经渲染了。 We start rendering the frame by first drawing the terrain followed by the wooden crate, so that theterrain and crate pixels are on the back buffer. We then draw the water surface to the back buffer using blending, sothat the water pixels get blended with the terrain and crate pixels on the back buffer in such a way that the terrain andcrate shows through the water. In this chapter, we examine blending techniques which allow us to blend (combine) thepixels that we are currently rasterizing (so-called source pixels) with the pixels that were previously rasterized to theback buffer (so-called destination pixels). 一开始轻视了这段话,结果纠结了半天