Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ ./essl_to_hlsl -b=h -o teapot.vert
- #### BEGIN COMPILER 0 INFO LOG ####
- #### END COMPILER 0 INFO LOG ####
- #### BEGIN COMPILER 0 OBJ CODE ####
- float4 vec4(float3 x0, float x1)
- {
- return float4(x0, x1);
- }
- // Attributes
- static float _aGeomIndex = {0};
- static float2 _aTextureCoord = {0, 0};
- static float3 _aVertexNormal = {0, 0, 0};
- static float3 _aVertexPosition = {0, 0, 0};
- static float4 gl_Position = float4(0, 0, 0, 0);
- // Varyings
- static float4 _vPosition = {0, 0, 0, 0};
- static float2 _vTextureCoord = {0, 0};
- static float3 _vTransformedNormal = {0, 0, 0};
- uniform float2 dx_HalfPixelSize;
- uniform float4x4 ar_uGeomMats[32];
- uniform float4x4 _uMVMatrix;
- uniform float3x3 _uNMatrix;
- uniform float4x4 _uPMatrix;
- ;
- ;
- ;
- ;
- ;
- ;
- ;
- ;
- ;
- ;
- ;
- void gl_main()
- {
- {
- float4x4 _model_view = transpose(mul(transpose(_uMVMatrix), transpose(ar_uGeomMats[int(_aGeomIndex)])));
- (_vPosition = mul(transpose(_model_view), vec4(_aVertexPosition.xyz, 1.0)));
- (gl_Position = mul(transpose(_uPMatrix), _vPosition));
- (_vTextureCoord = _aTextureCoord);
- (_vTransformedNormal = mul(transpose(_uNMatrix), _aVertexNormal));
- }
- }
- ;
- #### END COMPILER 0 OBJ CODE ####
- $ ./essl_to_hlsl -b=h -o teapot.frag
- #### BEGIN COMPILER 0 INFO LOG ####
- #### END COMPILER 0 INFO LOG ####
- #### BEGIN COMPILER 0 OBJ CODE ####
- float2 vec2(float x0, float x1)
- {
- return float2(x0, x1);
- }
- // Varyings
- static float2 _vTextureCoord = {0, 0};
- static float4 gl_Color[1] = {float4(0, 0, 0, 0)};
- uniform sampler2D _uSampler;
- float4 gl_texture2D(sampler2D s, float2 t)
- {
- return tex2D(s, float2(t.x, 1 - t.y));
- }
- ;
- ;
- ;
- ;
- void gl_main()
- {
- {
- (gl_Color[0] = gl_texture2D(_uSampler, vec2(_vTextureCoord[0], _vTextureCoord[1])));
- }
- }
- ;
- #### END COMPILER 0 OBJ CODE ####
Add Comment
Please, Sign In to add comment