Advertisement
microwerx

example renderconfig

Dec 30th, 2017
365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.42 KB | None | 0 0
  1. # Render Configuration File for Fluxions Renderer
  2.  
  3. @DEFAULTWIDTH 1024
  4. @DEFAULTHEIGHT 1024
  5.  
  6. # ==== Paths ====
  7.  
  8. path ./
  9. path ../shaders/
  10. path ../textures/
  11.  
  12. # ==== Samplers =====
  13.  
  14. sampler default2dSampler
  15. sampler GL_TEXTURE_WRAP_S GL_REPEAT
  16. sampler GL_TEXTURE_WRAP_T GL_REPEAT
  17. sampler GL_TEXTURE_MIN_FILTER GL_LINEAR_MIPMAP_LINEAR
  18. sampler GL_TEXTURE_MAG_FILTER GL_LINEAR
  19.  
  20. sampler defaultShadowSampler
  21. sampler GL_TEXTURE_WRAP_S GL_REPEAT
  22. sampler GL_TEXTURE_WRAP_T GL_REPEAT
  23. sampler GL_TEXTURE_MIN_FILTER GL_LINEAR
  24. sampler GL_TEXTURE_MAG_FILTER GL_LINEAR
  25.  
  26. sampler defaultCubeSampler
  27. sampler GL_TEXTURE_WRAP_S GL_CLAMP_TO_EDGE
  28. sampler GL_TEXTURE_WRAP_T GL_CLAMP_TO_EDGE
  29. sampler GL_TEXTURE_WRAP_R GL_CLAMP_TO_EDGE
  30. sampler GL_TEXTURE_MIN_FILTER GL_LINEAR_MIPMAP_LINEAR
  31. sampler GL_TEXTURE_MAG_FILTER GL_LINEAR
  32.  
  33. # ==== Textures ====
  34.  
  35. texture enviroCubeTexture
  36. texture GL_TEXTURE_CUBE_MAP
  37. texture GL_TEXTURE_CUBE_MAP_POSITIVE_X "cube_pos_x.png"
  38. texture GL_TEXTURE_CUBE_MAP_POSITIVE_Y "cube_pos_y.png"
  39. texture GL_TEXTURE_CUBE_MAP_POSITIVE_Z "cube_pos_z.png"
  40. texture GL_TEXTURE_CUBE_MAP_NEGATIVE_X "cube_neg_x.png"
  41. texture GL_TEXTURE_CUBE_MAP_NEGATIVE_Y "cube_neg_y.png"
  42. texture GL_TEXTURE_CUBE_MAP_NEGATIVE_Z "cube_neg_z.png"
  43. texture GL_GENERATE_MIPMAP
  44.  
  45. texture enviroCubeTexture2
  46. texture GL_TEXTURE_CUBE_MAP
  47. texture GL_TEXTURE_CUBE_MAP_POSITIVE_X "free_cube_map_positive_x.png"
  48. texture GL_TEXTURE_CUBE_MAP_POSITIVE_Y "free_cube_map_positive_y.png"
  49. texture GL_TEXTURE_CUBE_MAP_POSITIVE_Z "free_cube_map_positive_z.png"
  50. texture GL_TEXTURE_CUBE_MAP_NEGATIVE_X "free_cube_map_negative_x.png"
  51. texture GL_TEXTURE_CUBE_MAP_NEGATIVE_Y "free_cube_map_negative_y.png"
  52. texture GL_TEXTURE_CUBE_MAP_NEGATIVE_Z "free_cube_map_negative_z.png"
  53. texture GL_GENERATE_MIPMAP
  54.  
  55. # ==== Render Configurations ====
  56.  
  57. renderconfig pb_monolithic
  58.  
  59. program DefaultSlowProgram
  60. vertshader default_slow_es30.vert
  61. fragshader default_slow_es30.frag
  62. vertattrib 0 vtxPosition
  63. vertattrib 1 vtxNormal
  64. vertattrib 2 vtxTexCoord
  65. vertattrib 3 vtxColor
  66. vertattrib 4 vtxAttrib
  67.  
  68. program DefaultFastProgram
  69. vertshader default_fast_vs.glsl
  70. fragshader default_fast_fs.glsl
  71. vertattrib 0 vtxPosition
  72. vertattrib 1 vtxNormal
  73. vertattrib 2 vtxTexCoord
  74. vertattrib 3 vtxColor
  75. vertattrib 4 vtxAttrib
  76. vertattrib 6 vtxTangent
  77. vertattrib 7 vtxBinormal
  78.  
  79. program DefaultZProgram
  80. vertshader default_z_vs.glsl
  81. fragshader default_z_fs.glsl
  82. vertattrib 0 vtxPosition
  83.  
  84. renderbuffer "rb_color0" GL_RGBA @DEFAULTWIDTH @DEFAULTHEIGHT
  85. fbo "renderToTexture"
  86. fbo attach GL_RENDERBUFFER GL_COLOR_ATTACHMENT0 rb_color0
  87.  
  88. renderconfig sphl
  89.  
  90. program sphl
  91. vertshader sphl.vert
  92. fragshader sphl.frag
  93. vertattrib 0 aPosition
  94. vertattrib 1 aNormal
  95. vertattrib 2 aTexCoord
  96.  
  97. renderconfig skybox
  98.  
  99. program skybox
  100. vertshader skybox.vert
  101. fragshader skybox.frag
  102. vertattrib 0 aPosition
  103. vertattrib 1 aNormal
  104. vertattrib 2 aTexCoord
  105.  
  106. renderconfig glut
  107.  
  108. program UnwrappedCubeMap
  109. vertshader glut_unwrapped_cubemap.vert
  110. fragshader glut_unwrapped_cubemap.frag
  111. vertattrib 0 aPosition
  112. vertattrib 1 aTexCoord
  113.  
  114. renderconfig cube_shadow
  115. program cube_shadow
  116. vertshader cube_shadow_gl330.vert
  117. geomshader cube_shadow_gl330.geom
  118. fragshader cube_shadow_gl330.frag
  119. vertattrib 0 aPosition
  120.  
  121. # ==== UniformLists ====
  122.  
  123. uniformlist defaultCamera
  124. uniformMatrix4f cameraMatrix @CAMERAMATRIX
  125. uniformMatrix4f shadowMatrix @SHADOWMATRIX
  126. uniformMatrix4f sunMatrix @SUNMATRIX
  127.  
  128. # ==== Render Commands ====
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement