Advertisement
Guest User

Untitled

a guest
Jan 26th, 2025
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Example // shader name
  2. {
  3.     import "path/to/file.lesl"
  4.  
  5.     uniforms
  6.     {
  7.         // shared uniforms
  8.     }
  9.  
  10.     vertex
  11.     {
  12.         // vertex shader
  13.  
  14.         inputs
  15.         {
  16.             // inputs
  17.             // ex: "vec3 position;" will be automatically converted to attribute vec3 position (layout (location = n) in vec3 position;)
  18.         }
  19.  
  20.         outputs
  21.         {
  22.             // outputs
  23.             // ex: "vec3 WorldPosition;" will be automatically converted to "out vec3 WorldPosition";
  24.         }
  25.  
  26.         process
  27.         {
  28.             // main glsl code
  29.            
  30.             void main()
  31.             {
  32.                 // code
  33.             }
  34.         }
  35.     }
  36.  
  37.     fragment
  38.     {
  39.         // fragment shader
  40.  
  41.         inputs
  42.         {
  43.             // inputs
  44.             // ex: "vec3 WorldPosition;" will be automatically converted to "in vec3 WorldPosition;"
  45.         }
  46.  
  47.         outputs
  48.         {
  49.             // outputs
  50.             // ex: "vec4 color;" will be automatically converted to "out vec4 color;"
  51.         }
  52.  
  53.         process
  54.         {
  55.             // main glsl code
  56.  
  57.             void main()
  58.             {
  59.                 // code
  60.             }
  61.         }
  62.     }
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement