-
-
Notifications
You must be signed in to change notification settings - Fork 29
Shaders
Shaders in RaZ must be written in GLSL, OpenGL's Shading Language.
RaZ does not add specific definitions to shaders yet. Should that change, this section will be updated.
Unless you need a specific version, specifying a #version
tag is unnecessary: it will automatically be added when loading the shader if missing. For example, when loading a shader with OpenGL 4.6, #version 460
will be added at the top of the shader. Likewise, with OpenGL ES 3.0, #version 300 es
will be set. If this tag does exist at the beginning of your shader, it will be left as-is.
This does mean that you can write a single shader for both APIs (standard & ES), but it is your responsibility to make it compatible with the two of them: a shader compiling with standard OpenGL does not mean it is compatible with ES; the other way around seems much less common.
- Home
- How to build RaZ
- Getting started
- General usage knowledge
- Some examples...
- Playground
- Tutorials
- File formats
- Modules
- Debug