Guest User

Untitled

a guest
May 1st, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. shader:
  2. FRAG
  3. DCL IN[0].xy, GENERIC[9], PERSPECTIVE
  4. DCL OUT[0], COLOR
  5. DCL SAMP[0]
  6. DCL SVIEW[0], 2D, SINT
  7. DCL CONST[0..3]
  8. DCL TEMP[0], LOCAL
  9. 0: MOV TEMP[0].xy, IN[0].xyyy
  10. 1: TEX TEMP[0], TEMP[0], SAMP[0], 2D
  11. 2: I2F TEMP[0], TEMP[0]
  12. 3: MAD TEMP[0], TEMP[0], CONST[0], CONST[1]
  13. 4: MAD TEMP[0], TEMP[0], CONST[2], CONST[3]
  14. 5: MOV OUT[0], TEMP[0]
  15. 6: END
  16.  
  17. Current output:
  18.  
  19. GLSL:
  20. #version 140
  21. #extension GL_ARB_shader_bit_encoding : require
  22. smooth in vec4 vso_g9;
  23. out vec4 fsout_c0;
  24. vec4 temp0[1];
  25. uniform uvec4 fsconst0[4];
  26. uniform isampler2D fssamp0;
  27.  
  28. void main(void)
  29. {
  30. temp0[0].xy = vec2(((vso_g9.xyyy).xy));
  31. temp0[0] = vec4(intBitsToFloat(texture(fssamp0, temp0[0] .xy)));
  32. temp0[0] = vec4(ivec4(floatBitsToInt(temp0[0])));
  33. temp0[0] = vec4(( temp0[0] * uintBitsToFloat(fsconst0[0]) + uintBitsToFloat(fsconst0[1])));
  34. temp0[0] = vec4(( temp0[0] * uintBitsToFloat(fsconst0[2]) + uintBitsToFloat(fsconst0[3])));
  35. fsout_c0 = vec4(( temp0[0] ));
  36. }
  37.  
  38. Possible GLSL:
  39.  
  40. GLSL:
  41. #version 140
  42. #extension GL_ARB_shader_bit_encoding : require
  43. smooth in vec4 vso_g9;
  44. out vec4 fsout_c0;
  45. vec4 temp0_0;
  46. ivec4 temp0_1;
  47. uniform uvec4 fsconst0[4];
  48. uniform isampler2D fssamp0;
  49.  
  50. void main(void)
  51. {
  52. temp0_0 = vec2(((vso_g9.xyyy).xy));
  53. temp0_1 = texture(fssamp0, temp0[0] .xy);
  54. temp0_0 = vec4(temp0_1);
  55. temp0_0 = vec4(( temp0_0 * uintBitsToFloat(fsconst0[0]) + uintBitsToFloat(fsconst0[1])));
  56. temp0_0 = vec4(( temp0_0 * uintBitsToFloat(fsconst0[2]) + uintBitsToFloat(fsconst0[3])));
  57. fsout_c0 = vec4(( temp0_0 ));
  58. }
Advertisement
Add Comment
Please, Sign In to add comment