Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Example // shader name
- {
- import "path/to/file.lesl"
- uniforms
- {
- // shared uniforms
- }
- vertex
- {
- // vertex shader
- inputs
- {
- // inputs
- // ex: "vec3 position;" will be automatically converted to attribute vec3 position (layout (location = n) in vec3 position;)
- }
- outputs
- {
- // outputs
- // ex: "vec3 WorldPosition;" will be automatically converted to "out vec3 WorldPosition";
- }
- process
- {
- // main glsl code
- void main()
- {
- // code
- }
- }
- }
- fragment
- {
- // fragment shader
- inputs
- {
- // inputs
- // ex: "vec3 WorldPosition;" will be automatically converted to "in vec3 WorldPosition;"
- }
- outputs
- {
- // outputs
- // ex: "vec4 color;" will be automatically converted to "out vec4 color;"
- }
- process
- {
- // main glsl code
- void main()
- {
- // code
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement