zoukankan      html  css  js  c++  java
  • hlsl SV_POSITION

    今绘制三角形一直不显示:

    后对比给出的例子发现是  PixelShader输入的Position应定义为 SV_POSITION而不是POSITION

     msdn上SV_POSITION的描述:

    1.When used in a pixel shader, SV_Position describes the pixel location.

    2.Available for read/write in the vertex shader and geometry shader.

    3.The pixel shader can use it as read only to get the pixel center with a 0.5 offset.

    1:SV_POSITION描述像素点的位置。  疑问:从VSShader变换WorldViewProjection,投影矩阵变换后,   归一化裁剪, 映射匹配长宽都是系统做的了?

    2.geometry shader的作用?

    3.在Pixel shader里权限是只读sv_position, 得到像素中心点(position的0.5偏移)

       读写是在vertexShader和geometryShader

  • 相关阅读:
    JAVA面试——设计模式
    CSS清除浮动
    CSS外边距
    baidu-ife
    笔记一则
    Atom
    校园网认证
    四月甘九-省
    Python sys.argv[]用法
    Python模块导入的方法
  • 原文地址:https://www.cnblogs.com/dust-fly/p/3659188.html
Copyright © 2011-2022 走看看