设备丢失状态:
- 程序在全屏状态下失去键盘焦点(全屏时按下Alt+Tab或Win+D键或Win+L键)
- 其他程序进入全屏状态
- 电源管理事件,比如屏保等
Present:
EndScene提交处理到显卡,如果还有没处理完成的指令,导致Present等待时间加长。
AA等操作导致Present时间加长
往往EndScene和Present之间有些Updata,来利用cpu。
BeginScene
Render
EndScene
LogicUpdata
FrameMove
Present
void Render()
{
if(frist render)
return
render......
}
//specular贴图
// Sample the pixel from the specular map texture.
specularIntensity = shaderTextures.Sample(SampleType, input.tex);
// Use the specular map to determine the intensity of specular light at this pixel.
specular = specular * specularIntensity;