Guest User

Untitled

a guest
Apr 21st, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. $ ./essl_to_hlsl -b=h -o teapot.vert
  2. #### BEGIN COMPILER 0 INFO LOG ####
  3.  
  4. #### END COMPILER 0 INFO LOG ####
  5.  
  6.  
  7. #### BEGIN COMPILER 0 OBJ CODE ####
  8. float4 vec4(float3 x0, float x1)
  9. {
  10. return float4(x0, x1);
  11. }
  12. // Attributes
  13. static float _aGeomIndex = {0};
  14. static float2 _aTextureCoord = {0, 0};
  15. static float3 _aVertexNormal = {0, 0, 0};
  16. static float3 _aVertexPosition = {0, 0, 0};
  17.  
  18. static float4 gl_Position = float4(0, 0, 0, 0);
  19.  
  20. // Varyings
  21. static float4 _vPosition = {0, 0, 0, 0};
  22. static float2 _vTextureCoord = {0, 0};
  23. static float3 _vTransformedNormal = {0, 0, 0};
  24.  
  25. uniform float2 dx_HalfPixelSize;
  26.  
  27. uniform float4x4 ar_uGeomMats[32];
  28. uniform float4x4 _uMVMatrix;
  29. uniform float3x3 _uNMatrix;
  30. uniform float4x4 _uPMatrix;
  31.  
  32. ;
  33. ;
  34. ;
  35. ;
  36. ;
  37. ;
  38. ;
  39. ;
  40. ;
  41. ;
  42. ;
  43. void gl_main()
  44. {
  45. {
  46. float4x4 _model_view = transpose(mul(transpose(_uMVMatrix), transpose(ar_uGeomMats[int(_aGeomIndex)])));
  47. (_vPosition = mul(transpose(_model_view), vec4(_aVertexPosition.xyz, 1.0)));
  48. (gl_Position = mul(transpose(_uPMatrix), _vPosition));
  49. (_vTextureCoord = _aTextureCoord);
  50. (_vTransformedNormal = mul(transpose(_uNMatrix), _aVertexNormal));
  51. }
  52. }
  53. ;
  54.  
  55. #### END COMPILER 0 OBJ CODE ####
  56.  
  57.  
  58. $ ./essl_to_hlsl -b=h -o teapot.frag
  59. #### BEGIN COMPILER 0 INFO LOG ####
  60.  
  61. #### END COMPILER 0 INFO LOG ####
  62.  
  63.  
  64. #### BEGIN COMPILER 0 OBJ CODE ####
  65. float2 vec2(float x0, float x1)
  66. {
  67. return float2(x0, x1);
  68. }
  69. // Varyings
  70. static float2 _vTextureCoord = {0, 0};
  71.  
  72. static float4 gl_Color[1] = {float4(0, 0, 0, 0)};
  73.  
  74.  
  75. uniform sampler2D _uSampler;
  76.  
  77. float4 gl_texture2D(sampler2D s, float2 t)
  78. {
  79. return tex2D(s, float2(t.x, 1 - t.y));
  80. }
  81.  
  82. ;
  83. ;
  84. ;
  85. ;
  86. void gl_main()
  87. {
  88. {
  89. (gl_Color[0] = gl_texture2D(_uSampler, vec2(_vTextureCoord[0], _vTextureCoord[1])));
  90. }
  91. }
  92. ;
  93.  
  94. #### END COMPILER 0 OBJ CODE ####
Add Comment
Please, Sign In to add comment