ユーザ用ツール

サイト用ツール


opengl:glsl_hlsl

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
次のリビジョン両方とも次のリビジョン
opengl:glsl_hlsl [2014/07/02 19:07] – [GLSL/HLSL 命令対応表] ogaopengl:glsl_hlsl [2014/07/02 19:18] – [GLSL/HLSL 命令対応表] oga
行 52: 行 52:
  
  
 +^ GLSL                                       ^ HLSL                                  ^ MT                                                       ^
 +| sampler2D samplerobj                       | Texture2D<type> texobj                | texture2d<type> texobj                   | sampler type    |
 +| sampler2DShadow depthobj                   | Texture2D<type> depthobj              | depth2d<type> depthobj                   | sampler type    |
 +| v= texture( samplerobj, texcoord.. );      | v= texobj.Sample( texcoord.. );       | v= texobj.sample( sampler, texcoord .. ) | sampling        |
 +| v= texture2D( sampleobj, texcoord.. );     | v= tex2D( sampler, texcoord.. );      | --                                       | legacy syntax   |
 +| v= textureGather( depthobj, texcoord.. );  | v= depthobj.SampleCmp( texcoord.. );  | v= depthobj.sample_compare( ... )        | pcf shadow map  |
  
-^ GLSL                                       ^ HLSL                                  ^                 ^ 
-| sampler2D samplerobj                       | Texture2D<type> textureobj            | sampler type    | 
-| sampler2DShadow shadowobj                  | Texture2D<type> shadowobj             | sampler type    | 
-| v= texture( samplerobj, texcoord.. );      | v= textureobj.Sample( texcoord.. );   | sampling        | 
-| v= texture2D( sampleobj, texcoord.. );     | v= tex2D( sampler, texcoord.. );      | legacy syntax   | 
-| v= textureGather( sadowobj, texcoord.. );  | v= shadowobj.SampleCmp( texcoord.. ); | pcf shadow map  | 
  
  
-^ shader  ^ GLSL                                  ^ HLSL                                    ^                 ^ 
-| vsh     | in int gl_VertexID;                   | uint var_name : SV_VertexID ;                  | 
-| :::     | in int gl_InstanceID;                 | uint var_name : SV_InstanceID ;                | 
-| fsh/psh | out vec4 color; (GL2: gl_FragColor)   | float4  ... : SV_Target ; (DX9: COLOR)  |        | 
-|  :::    | out float gl_FragDepth;               | float ... : SV_Depth ; (DX9: DEPTH)            | 
  
 +^ shader  ^ GLSL                                  ^ HLSL                                    ^ MT                             ^
 +| vsh     | in int gl_VertexID;                   | uint var_name : SV_VertexID ;           | <nowiki>uint var_name [[vertex_id]];</nowiki>    |
 +| :::     | in int gl_InstanceID;                 | uint var_name : SV_InstanceID ;         | <nowiki>uint var_name [[instance_id]];</nowiki>  |
 +| :::     | out vec4 gl_Position;                 | float4 ... : SV_Position ;              | <nowiki>float4 ... [[position]];</nowiki>    |
 +| fsh/psh | out vec4 color; (GL2: gl_FragColor)   | float4  ... : SV_Target ; (DX9: COLOR)  | <nowiki>half4 ... [[color(0)]];</nowiki>     |
 +|  :::    | out float gl_FragDepth;               | float ... : SV_Depth ; (DX9: DEPTH)     | <nowiki>float ... [[depth(less)]];</nowiki>  |
  
  
opengl/glsl_hlsl.txt · 最終更新: 2016/09/12 14:53 by oga

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki